[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 03/32] target/arm/cpu64: allow fp16 to be dis
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 03/32] target/arm/cpu64: allow fp16 to be disabled |
Date: |
Tue, 13 Feb 2018 14:26:20 +0000 |
On 8 February 2018 at 17:31, Alex Bennée <address@hidden> wrote:
> While for CONFIG_USER_ONLY it is policy for the "cpu" to be the most
> capable is can be this does cause problems. For example legacy RISU
> runs would fail as there are a bunch of implemented instructions which
> would have caused failures that now trigger actual calculations.
>
> Signed-off-by: Alex Bennée <address@hidden>
> static void aarch64_cpu_initfn(Object *obj)
> {
> object_property_add_bool(obj, "aarch64", aarch64_cpu_get_aarch64,
> @@ -283,6 +303,13 @@ static void aarch64_cpu_initfn(Object *obj)
> "Set on/off to enable/disable aarch64 "
> "execution state ",
> NULL);
> +#ifdef CONFIG_USER_ONLY
> + object_property_add_bool(obj, "fp16", aarch64_cpu_get_fp16,
> + aarch64_cpu_set_fp16, NULL);
> + object_property_set_description(obj, "fp16",
> + "Set on/off to enable/disable FP16
> extensions ",
> + NULL);
> +#endif
> }
Good news everybody -- this is an opportunity for a naming bikeshed
discussion!
The property names we use here are effectively ABI because they'll
be available to the user on the command line, so we want to get the
right names. This is the first of these, but we can reasonably
assume we'll have more feature switches in the future for various
other optional instruction set extensions.
There are two obvious choices here:
* use the architecture extension names from the Arm ARM A1.7.4
(in this case that's "ARMv8.2-FP16", which we could reasonably
abbreviate to fp16)
* use the hwcaps names that Linux defines and prints in /proc/cpuinfo
(in this case that would be a combination of "fphp" and "asimdhp",
since hwcaps reflects the ID register setup that allows a CPU
to report support for one and not the other)
Whatever we do, we should have a comment describing our naming
conventions, so we can follow it next time we add one of these...
thanks
-- PMM
- [Qemu-devel] [PATCH v2 00/32] Add ARMv8.2 half-precision functions, Alex Bennée, 2018/02/08
- [Qemu-devel] [PATCH v2 01/32] include/exec/helper-head.h: support f16 in helper calls, Alex Bennée, 2018/02/08
- [Qemu-devel] [PATCH v2 06/32] target/arm/helper: pass explicit fpst to set_rmode, Alex Bennée, 2018/02/08
- [Qemu-devel] [PATCH v2 05/32] target/arm/cpu.h: add additional float_status flags, Alex Bennée, 2018/02/08
- [Qemu-devel] [PATCH v2 04/32] target/arm/cpu.h: update comment for half-precision values, Alex Bennée, 2018/02/08
- [Qemu-devel] [PATCH v2 11/32] arm/translate-a64: add FP16 F[A]C[EQ/GE/GT] to simd_three_reg_same_fp16, Alex Bennée, 2018/02/08