On 08/07/2026 11:16, 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://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.com_qemu-2Dproject_qemu_-2D_work-5Fitems_3254&d=DwIBaQ&c=s883GpUCOChKOHiocYtGcg&r=c23RpsaH4D2MKyD3EPJTDa0BAxz6tV8aUJqVSoytEiY&m=aFRMA31BRpUGFc6oz2sysTVC7X4XLweNq3bWaZ-Qe2X0DjWynbeE9wH6KkOxdVV9&s=cLTzhO_XGkGotBc8X71KHVkE1UNW_8uTVosqAi0gBa8&e=
(which is a report that "qemu-system-x86_64 -machine pc-q35,help"
doesn't list these properties) ?
Yes, I can confirm that it does:
Before this series:
$ ./build/qemu-system-x86_64 -M q35,help | grep pflash
$
After this series:
$ ./build/qemu-system-x86_64 -M q35,help | grep pflash
pflash0=<str> - Node name or ID of a block device to use as
a backend
pflash1=<str> - Node name or ID of a block device to use as
a backend
$
ATB,
Mark.