qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Eric Blake" <eblake@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-arm@nongnu.org, "Luc Michel" <luc.michel@amd.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Frederic Konrad" <fkonrad@amd.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>
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	[thread overview]
Message-ID: <CAFEAcA-qyLf_ACX-pD2nR8h+EcipqK_=re05wmBJBa93AOeg_Q@mail.gmail.com> (raw)
In-Reply-To: <20240102160455.68612-5-philmd@linaro.org>

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


  reply	other threads:[~2024-01-12 16:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 16:04 [RFC PATCH 0/5] qdev-properties: Try to improve use of dynamic property introspection Philippe Mathieu-Daudé
2024-01-02 16:04 ` [RFC PATCH 1/5] qdev-properties: Add qdev_property_del_static() Philippe Mathieu-Daudé
2024-01-02 16:04 ` [RFC PATCH 2/5] qdev-properties: Add OptionalBool QAPI type Philippe Mathieu-Daudé
2024-01-02 22:44   ` Richard Henderson
2024-01-03  9:12     ` Philippe Mathieu-Daudé
2024-01-02 16:04 ` [RFC PATCH 3/5] hw/arm/armv7m: Convert ARMv7MState::vfp from bool to OptionalBool Philippe Mathieu-Daudé
2024-01-02 16:04 ` [RFC PATCH 4/5] hw/arm/armv7m: Error if trying to set unavailable ARMCPU::vfp property Philippe Mathieu-Daudé
2024-01-12 16:41   ` Peter Maydell [this message]
2024-01-02 16:04 ` [RFC PATCH 5/5] hw/arm/armv7m: Do not expose 'vfp' property if ARM CPU doesn't have it Philippe Mathieu-Daudé
2024-01-09 10:47 ` [RFC PATCH 0/5] qdev-properties: Try to improve use of dynamic property introspection Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA-qyLf_ACX-pD2nR8h+EcipqK_=re05wmBJBa93AOeg_Q@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=fkonrad@amd.com \
    --cc=kwolf@redhat.com \
    --cc=luc.michel@amd.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).