On Wed, Jul 08, 2026 at 11:16:30AM +0100, Peter Maydell wrote:
> On Fri, 3 Jul 2026 at 10:09, Mark Cave-Ayland
> <[email protected]> wrote:
> >
> > Signed-off-by: Mark Cave-Ayland <[email protected]>
> > ---
> >  include/hw/i386/pc.h | 2 ++
> >  hw/i386/pc.c         | 8 ++++++++
> >  hw/i386/pc_sysfw.c   | 7 +------
> >  3 files changed, 11 insertions(+), 6 deletions(-)
> >
> > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> > index 309de2eda1..16cb0ec01f 100644
> > --- a/include/hw/i386/pc.h
> > +++ b/include/hw/i386/pc.h
> > @@ -40,6 +40,8 @@ typedef struct PCMachineState {
> >
> >      Object *alias_pcspk;
> >      Object *alias_rtc_time;
> > +    Object *alias_pflash0;
> > +    Object *alias_pflash1;
> >
> >      /* Configuration options: */
> >      uint64_t max_ram_below_4g;
> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> > index 13c9c1bfc8..11eef176f4 100644
> > --- a/hw/i386/pc.c
> > +++ b/hw/i386/pc.c
> > @@ -1762,6 +1762,14 @@ static void pc_machine_class_init(ObjectClass *oc, 
> > const void *data)
> >                                     offsetof(X86MachineState, acpi_dev),
> >                                     object_property_allow_set_link,
> >                                     OBJ_PROP_LINK_STRONG);
> > +    object_class_property_add_alias(oc, "pflash0",
> > +                                    offsetof(PCMachineState, 
> > alias_pflash0),
> > +                                    TYPE_PFLASH_CFI01,
> > +                                    "drive");
> > +    object_class_property_add_alias(oc, "pflash1",
> > +                                    offsetof(PCMachineState, 
> > alias_pflash1),
> > +                                    TYPE_PFLASH_CFI01,
> > +                                    "drive");
> 
> Does making these class properties fix
> https://gitlab.com/qemu-project/qemu/-/work_items/3254
> (which is a report that "qemu-system-x86_64 -machine pc-q35,help"
> doesn't list these properties) ?

Yes, it ought to, as that CLI logic iterates over class properties.

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|


Reply via email to