All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	Linisha <linisha232@gmail.com>,
	qemu-devel@nongnu.org, pbonzini@redhat.com, mjt@tls.msk.ru,
	philmd@mailo.com
Subject: Re: [PATCH] docs/system: clarify pflash0 and pflash1 are virt-only options
Date: Wed, 24 Jun 2026 11:28:34 +0100	[thread overview]
Message-ID: <87v7b8kzal.fsf@draig.linaro.org> (raw)
In-Reply-To: <CAFEAcA9GSZXV5z=KDMLvM7enC1EqHwBt--=YOYb8HW6m=EHnqQ@mail.gmail.com> (Peter Maydell's message of "Wed, 24 Jun 2026 09:47:54 +0100")

Peter Maydell <peter.maydell@linaro.org> writes:

> On Wed, 24 Jun 2026 at 08:15, Daniel P. Berrangé <berrange@redhat.com> wrote:
>>
>> On Wed, Jun 24, 2026 at 02:28:39AM +0530, Linisha wrote:
>> > The pflash0 and pflash1 machine options shown in the Aarch64 virt
>> > example are only available for virt machine types on Arm, RISC-V,
>> > and LoongArch architectures. Add a note to clarify this for users
>> > who may try these options on x86 machines and be confused when
>> > they are not available.
>> >
>> > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3254
>> > Signed-off-by: Linisha <linisha232@gmail.com>
>> > ---
>> >  docs/system/introduction.rst | 6 ++++++
>> >  1 file changed, 6 insertions(+)
>> >
>> > diff --git a/docs/system/introduction.rst b/docs/system/introduction.rst
>> > index bec7291e47..0c400aefb6 100644
>> > --- a/docs/system/introduction.rst
>> > +++ b/docs/system/introduction.rst
>> > @@ -158,6 +158,12 @@ virtualisation so we can use KVM inside the emulated guest. As the
>> >  ``virt`` machine comes with some built in pflash devices we give them
>> >  names so we can override the defaults later.
>> >
>> > +.. note::
>> > +   The ``pflash0`` and ``pflash1`` machine options are specific to the
>> > +   ``virt`` machine type on Arm, RISC-V, and LoongArch architectures.
>> > +   They are not available on x86 machines, which use ``-bios`` or
>> > +   ``-pflash`` for firmware instead.
>>
>> No this is wrong.
>>
>> The pflash0 and pflash1 properties apply to x86 pc & q35 machines too.
>>
>> -pflash is a legacy syntax which remaps to pflash0 and pflash1 internally,
>> but also applies to other machines which don't use the new pflash0/pflash1
>> properties.
>
> I think it is probably worth having something in the intro text that
> makes the point that for QEMU all architectures and machines are
> potentially different, and that options and command lines that work
> on for example an x86 PC machine will not necessarily work on
> an Arm machine, and so on. But we should do that as a kind of
> general warning somewhere near the start.

That was the intention with the wording:

  QEMU provides a rich and complex API which can be overwhelming to
  understand. While some architectures can boot something with just a
  disk image, those examples elide a lot of details with defaults that
  may not be optimal for modern systems.

  For a non-x86 system where we emulate a broad range of machine types,
  the command lines are generally more explicit in defining the machine
  and boot behaviour.

but it could probably be improved. Aside from working mostly on Arm I
chose the example because the default PC command lines are very prone to
using the old legacy shortcuts.

>
> The bug report notes that "./build/x86/qemu-system-x86_64 -M pc,help"
> does not list the pflash0 and pflash1 options. I think this is because
> we set these up as alias properties on the actual flash device object
> in pc_pflash_create(), so they don't exist as class properties that
> "help" can introspect on.
>
> -- PMM

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


      parent reply	other threads:[~2026-06-24 10:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 20:58 [PATCH] docs/system: clarify pflash0 and pflash1 are virt-only options Linisha
2026-06-24  7:15 ` Daniel P. Berrangé
2026-06-24  8:47   ` Peter Maydell
2026-06-24  9:21     ` linisha
2026-06-24 10:28     ` Alex Bennée [this message]

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=87v7b8kzal.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=linisha232@gmail.com \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@mailo.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.