[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 4/5] hw/arm/armv7m: Error if trying to set unavailable AR
From: |
Peter Maydell |
Subject: |
Re: [RFC PATCH 4/5] hw/arm/armv7m: Error if trying to set unavailable ARMCPU::vfp property |
Date: |
Fri, 12 Jan 2024 16:41:30 +0000 |
On Tue, 2 Jan 2024 at 16:05, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Do not ignore impossible configuration requested by the user.
> For example, when trying to enable VFP on a Cortex-M33 we now get:
>
> qemu-system-arm: 'cortex-m33-arm-cpu' does not support VFP
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/arm/armv7m.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
> index 3610f6f4a1..12cdad09f9 100644
> --- a/hw/arm/armv7m.c
> +++ b/hw/arm/armv7m.c
> @@ -328,6 +328,9 @@ static void armv7m_realize(DeviceState *dev, Error **errp)
> if (!object_property_set_bool(OBJECT(s->cpu), "vfp", s->vfp, errp)) {
> return;
> }
> + } else if (s->vfp == OPTIONAL_BOOL_TRUE) {
> + error_setg(errp, "'%s' does not support VFP", s->cpu_type);
> + return;
> }
I'm not sure exactly what this series is trying to do, but
this isn't the right error message, at least at the moment.
Our Cortex-M33 model does support VFP -- in fact, there's
currently no way to turn it off, since we only expose the vfp
property for AArch64 CPUs.
I think we broke this in commit 4315f7c61474 last year,
accidentally restricting the definition of the "vfp"
property to ARM_FEATURE_AARCH64 CPUs only.
(filed https://gitlab.com/qemu-project/qemu/-/issues/2098
to track that)
I suppose if we fixed that regression then the error message
would become correct again, since we'd be back to exposing
the 'vfp' property only if the CPU did support VFP.
-- PMM
- [RFC PATCH 0/5] qdev-properties: Try to improve use of dynamic property introspection, Philippe Mathieu-Daudé, 2024/01/02
- [RFC PATCH 1/5] qdev-properties: Add qdev_property_del_static(), Philippe Mathieu-Daudé, 2024/01/02
- [RFC PATCH 2/5] qdev-properties: Add OptionalBool QAPI type, Philippe Mathieu-Daudé, 2024/01/02
- [RFC PATCH 3/5] hw/arm/armv7m: Convert ARMv7MState::vfp from bool to OptionalBool, Philippe Mathieu-Daudé, 2024/01/02
- [RFC PATCH 4/5] hw/arm/armv7m: Error if trying to set unavailable ARMCPU::vfp property, Philippe Mathieu-Daudé, 2024/01/02
- Re: [RFC PATCH 4/5] hw/arm/armv7m: Error if trying to set unavailable ARMCPU::vfp property,
Peter Maydell <=
- [RFC PATCH 5/5] hw/arm/armv7m: Do not expose 'vfp' property if ARM CPU doesn't have it, Philippe Mathieu-Daudé, 2024/01/02
- Re: [RFC PATCH 0/5] qdev-properties: Try to improve use of dynamic property introspection, Kevin Wolf, 2024/01/09