* [PULL 00/32] Misc HW patches for 2025-02-10
@ 2025-02-10 20:41 Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 01/32] backends/tpm: Use qemu_hexdump_line() to avoid sprintf() Philippe Mathieu-Daudé
` (32 more replies)
0 siblings, 33 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé
The following changes since commit 54e91d1523b412b4cff7cb36c898fa9dc133e886:
Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/armbru into staging (2025-02-10 10:47:31 -0500)
are available in the Git repository at:
https://github.com/philmd/qemu.git tags/hw-misc-20250210
for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
hw/net/smc91c111: Ignore attempt to pop from empty RX fifo (2025-02-10 21:30:44 +0100)
----------------------------------------------------------------
Misc HW patches
- Use qemu_hexdump_line() in TPM backend (Philippe)
- Make various Xilinx devices endianness configurable (Philippe)
- Remove magic number in APIC (Phil)
- Disable thread-level cache topology (Zhao)
- Xen QOM style cleanups (Bernhard)
- Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
- Invert logic of machine no_sdcard flag (Philippe)
- Housekeeping in MicroBlaze functional tests (Philippe)
- Prevent out-of-bound access in SMC91C111 RX path (Peter)
----------------------------------------------------------------
Bernhard Beschow (1):
hw/xen: Prefer QOM cast for XenLegacyDevice
Peter Maydell (1):
hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
Phil Dennis-Jordan (1):
hw/intc/apic: Fixes magic number use, removes outdated comment
Philippe Mathieu-Daudé (28):
backends/tpm: Use qemu_hexdump_line() to avoid sprintf()
hw/intc/xilinx_intc: Make device endianness configurable
hw/net/xilinx_ethlite: Make device endianness configurable
hw/timer/xilinx_timer: Make device endianness configurable
hw/char/xilinx_uartlite: Make device endianness configurable
hw/ssi/xilinx_spi: Make device endianness configurable
hw/arm/xlnx-zynqmp: Use &error_abort for programming errors
hw/sysbus: Use sizeof(BusState) in main_system_bus_create()
hw/sysbus: Declare QOM types using DEFINE_TYPES() macro
hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE
hw/vfio: Have VFIO_PLATFORM devices inherit from
DYNAMIC_SYS_BUS_DEVICE
hw/display: Have RAMFB device inherit from DYNAMIC_SYS_BUS_DEVICE
hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS_BUS_DEVICE
hw/net: Have eTSEC device inherit from DYNAMIC_SYS_BUS_DEVICE
hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE
hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE
hw/boards: Convert no_sdcard flag to OnOffAuto tri-state
hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF
hw/boards: Rename no_sdcard -> auto_create_sdcard
hw/boards: Do not create unusable default if=sd drives
hw/arm: Remove all invalid uses of auto_create_sdcard=true
hw/riscv: Remove all invalid uses of auto_create_sdcard=true
hw/boards: Ensure machine setting auto_create_sdcard expose a SD Bus
tests/functional: Explicit endianness of microblaze assets
tests/functional: Allow microblaze tests to take a machine name
argument
tests/functional: Remove sleep() kludges from microblaze tests
tests/functional: Have microblaze tests inherit common parent class
hw/riscv/opentitan: Include missing 'exec/address-spaces.h' header
Zhao Liu (1):
hw/core/machine: Reject thread level cache
include/hw/boards.h | 2 +-
include/hw/sysbus.h | 2 +
include/hw/xen/xen_pvdev.h | 5 +-
backends/tpm/tpm_util.c | 24 ++++----
hw/arm/aspeed.c | 20 +++++++
hw/arm/bananapi_m2u.c | 1 +
hw/arm/cubieboard.c | 1 +
hw/arm/exynos4_boards.c | 2 +
hw/arm/fby35.c | 1 +
hw/arm/imx25_pdk.c | 1 +
hw/arm/integratorcp.c | 1 +
hw/arm/mcimx6ul-evk.c | 1 +
hw/arm/mcimx7d-sabre.c | 1 +
hw/arm/npcm7xx_boards.c | 5 ++
hw/arm/omap_sx1.c | 2 +
hw/arm/orangepi.c | 1 +
hw/arm/raspi.c | 5 ++
hw/arm/raspi4b.c | 1 +
hw/arm/realview.c | 4 ++
hw/arm/sabrelite.c | 1 +
hw/arm/stellaris.c | 1 +
hw/arm/versatilepb.c | 2 +
hw/arm/vexpress.c | 2 +
hw/arm/xilinx_zynq.c | 1 -
hw/arm/xlnx-versal-virt.c | 1 +
hw/arm/xlnx-zcu102.c | 1 +
hw/arm/xlnx-zynqmp.c | 38 ++++--------
hw/char/xilinx_uartlite.c | 27 +++++----
hw/core/machine-smp.c | 7 +++
hw/core/null-machine.c | 1 -
hw/core/sysbus.c | 54 ++++++++++-------
hw/display/ramfb-standalone.c | 3 +-
hw/i386/amd_iommu.c | 2 -
hw/i386/intel_iommu.c | 2 -
hw/i386/x86-iommu.c | 2 +-
hw/intc/apic.c | 3 +-
hw/intc/xilinx_intc.c | 52 +++++++++++-----
hw/microblaze/petalogix_ml605_mmu.c | 3 +
hw/microblaze/petalogix_s3adsp1800_mmu.c | 4 ++
hw/net/fsl_etsec/etsec.c | 4 +-
hw/net/smc91c111.c | 9 +++
hw/net/xilinx_ethlite.c | 20 +++++--
hw/ppc/virtex_ml507.c | 1 +
hw/riscv/microchip_pfsoc.c | 1 +
hw/riscv/opentitan.c | 1 +
hw/riscv/sifive_u.c | 1 +
hw/s390x/s390-virtio-ccw.c | 1 -
hw/ssi/xilinx_spi.c | 24 +++++---
hw/timer/xilinx_timer.c | 35 +++++++----
hw/tpm/tpm_tis_sysbus.c | 3 +-
hw/usb/xen-usb.c | 6 +-
hw/vfio/amd-xgbe.c | 2 -
hw/vfio/calxeda-xgmac.c | 2 -
hw/vfio/platform.c | 4 +-
hw/xen/xen-legacy-backend.c | 9 +--
hw/xen/xen_pvdev.c | 2 +-
system/vl.c | 24 ++++++--
.../functional/test_microblaze_s3adsp1800.py | 34 +++++++++--
.../test_microblazeel_s3adsp1800.py | 32 ++--------
tests/qemu-iotests/172.out | 60 -------------------
60 files changed, 314 insertions(+), 248 deletions(-)
--
2.47.1
^ permalink raw reply [flat|nested] 50+ messages in thread
* [PULL 01/32] backends/tpm: Use qemu_hexdump_line() to avoid sprintf()
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 02/32] hw/intc/xilinx_intc: Make device endianness configurable Philippe Mathieu-Daudé
` (31 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Stefan Berger, Richard Henderson
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1.
Using qemu_hexdump_line() both fixes the deprecation warning and
simplifies the code base.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
[rth: Keep the linebreaks every 16 bytes]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240412073346.458116-12-richard.henderson@linaro.org>
[PMD: Rebased]
---
backends/tpm/tpm_util.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c
index 32946251060..0a428eaf756 100644
--- a/backends/tpm/tpm_util.c
+++ b/backends/tpm/tpm_util.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "qemu/error-report.h"
+#include "qemu/cutils.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "tpm_int.h"
@@ -336,8 +337,8 @@ void tpm_sized_buffer_reset(TPMSizedBuffer *tsb)
void tpm_util_show_buffer(const unsigned char *buffer,
size_t buffer_size, const char *string)
{
- size_t len, i;
- char *line_buffer, *p;
+ g_autoptr(GString) str = NULL;
+ size_t len, i, l;
if (!trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER_CONTENT)) {
return;
@@ -345,19 +346,14 @@ void tpm_util_show_buffer(const unsigned char *buffer,
len = MIN(tpm_cmd_get_size(buffer), buffer_size);
trace_tpm_util_show_buffer_header(string, len);
- /*
- * allocate enough room for 3 chars per buffer entry plus a
- * newline after every 16 chars and a final null terminator.
- */
- line_buffer = g_malloc(len * 3 + (len / 16) + 1);
-
- for (i = 0, p = line_buffer; i < len; i++) {
- if (i && !(i % 16)) {
- p += sprintf(p, "\n");
+ for (i = 0; i < len; i += l) {
+ if (str) {
+ g_string_append_c(str, '\n');
}
- p += sprintf(p, "%.2X ", buffer[i]);
+ l = MIN(len, 16);
+ str = qemu_hexdump_line(str, buffer, l, 1, 0);
}
- trace_tpm_util_show_buffer_content(line_buffer);
- g_free(line_buffer);
+ g_string_ascii_up(str);
+ trace_tpm_util_show_buffer_content(str->str);
}
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 02/32] hw/intc/xilinx_intc: Make device endianness configurable
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 01/32] backends/tpm: Use qemu_hexdump_line() to avoid sprintf() Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 03/32] hw/net/xilinx_ethlite: " Philippe Mathieu-Daudé
` (30 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Richard Henderson
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
Add the "little-endian" property to select the device
endianness, defaulting to little endian.
Set the proper endianness for each machine using the device.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20250206131052.30207-2-philmd@linaro.org>
---
hw/intc/xilinx_intc.c | 52 +++++++++++++++++-------
hw/microblaze/petalogix_ml605_mmu.c | 1 +
hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
3 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c
index 6930f83907a..cd79ac4d4ff 100644
--- a/hw/intc/xilinx_intc.c
+++ b/hw/intc/xilinx_intc.c
@@ -3,6 +3,9 @@
*
* Copyright (c) 2009 Edgar E. Iglesias.
*
+ * https://docs.amd.com/v/u/en-US/xps_intc
+ * DS572: LogiCORE IP XPS Interrupt Controller (v2.01a)
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@@ -49,6 +52,7 @@ struct XpsIntc
{
SysBusDevice parent_obj;
+ bool little_endian_model;
MemoryRegion mmio;
qemu_irq parent_irq;
@@ -140,18 +144,29 @@ static void pic_write(void *opaque, hwaddr addr,
update_irq(p);
}
-static const MemoryRegionOps pic_ops = {
- .read = pic_read,
- .write = pic_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
- .impl = {
- .min_access_size = 4,
- .max_access_size = 4,
+static const MemoryRegionOps pic_ops[2] = {
+ [0 ... 1] = {
+ .read = pic_read,
+ .write = pic_write,
+ .endianness = DEVICE_BIG_ENDIAN,
+ .impl = {
+ .min_access_size = 4,
+ .max_access_size = 4,
+ },
+ .valid = {
+ /*
+ * All XPS INTC registers are accessed through the PLB interface.
+ * The base address for these registers is provided by the
+ * configuration parameter, C_BASEADDR. Each register is 32 bits
+ * although some bits may be unused and is accessed on a 4-byte
+ * boundary offset from the base address.
+ */
+ .min_access_size = 4,
+ .max_access_size = 4,
+ },
},
- .valid = {
- .min_access_size = 4,
- .max_access_size = 4
- }
+ [0].endianness = DEVICE_BIG_ENDIAN,
+ [1].endianness = DEVICE_LITTLE_ENDIAN,
};
static void irq_handler(void *opaque, int irq, int level)
@@ -174,13 +189,21 @@ static void xilinx_intc_init(Object *obj)
qdev_init_gpio_in(DEVICE(obj), irq_handler, 32);
sysbus_init_irq(SYS_BUS_DEVICE(obj), &p->parent_irq);
-
- memory_region_init_io(&p->mmio, obj, &pic_ops, p, "xlnx.xps-intc",
- R_MAX * 4);
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &p->mmio);
}
+static void xilinx_intc_realize(DeviceState *dev, Error **errp)
+{
+ XpsIntc *p = XILINX_INTC(dev);
+
+ memory_region_init_io(&p->mmio, OBJECT(dev),
+ &pic_ops[p->little_endian_model],
+ p, "xlnx.xps-intc",
+ R_MAX * 4);
+}
+
static const Property xilinx_intc_properties[] = {
+ DEFINE_PROP_BOOL("little-endian", XpsIntc, little_endian_model, true),
DEFINE_PROP_UINT32("kind-of-intr", XpsIntc, c_kind_of_intr, 0),
};
@@ -188,6 +211,7 @@ static void xilinx_intc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ dc->realize = xilinx_intc_realize;
device_class_set_props(dc, xilinx_intc_properties);
}
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index 8b44be75a22..cf3b9574db3 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -111,6 +111,7 @@ petalogix_ml605_init(MachineState *machine)
dev = qdev_new("xlnx.xps-intc");
+ qdev_prop_set_bit(dev, "little-endian", true);
qdev_prop_set_uint32(dev, "kind-of-intr", 1 << TIMER_IRQ);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, INTC_BASEADDR);
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index 2c0d8c34cd2..0506497ad0a 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -95,6 +95,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
64 * KiB, 1, 0x89, 0x18, 0x0000, 0x0, 1);
dev = qdev_new("xlnx.xps-intc");
+ qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
qdev_prop_set_uint32(dev, "kind-of-intr",
1 << ETHLITE_IRQ | 1 << UARTLITE_IRQ);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 03/32] hw/net/xilinx_ethlite: Make device endianness configurable
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 01/32] backends/tpm: Use qemu_hexdump_line() to avoid sprintf() Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 02/32] hw/intc/xilinx_intc: Make device endianness configurable Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 04/32] hw/timer/xilinx_timer: " Philippe Mathieu-Daudé
` (29 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth, Richard Henderson
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
Add the "little-endian" property to select the device
endianness, defaulting to little endian.
Set the proper endianness on the single machine using the
device.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250206131052.30207-3-philmd@linaro.org>
---
hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
hw/net/xilinx_ethlite.c | 20 ++++++++++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index 0506497ad0a..fbf52ba8f2f 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -121,6 +121,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[TIMER_IRQ]);
dev = qdev_new("xlnx.xps-ethernetlite");
+ qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
qemu_configure_nic_device(dev, true, NULL);
qdev_prop_set_uint32(dev, "tx-ping-pong", 0);
qdev_prop_set_uint32(dev, "rx-ping-pong", 0);
diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c
index 14bf2b2e17a..103e53831a7 100644
--- a/hw/net/xilinx_ethlite.c
+++ b/hw/net/xilinx_ethlite.c
@@ -90,6 +90,7 @@ struct XlnxXpsEthLite
NICState *nic;
NICConf conf;
+ bool little_endian_model;
uint32_t c_tx_pingpong;
uint32_t c_rx_pingpong;
unsigned int port_index; /* dual port RAM index */
@@ -183,10 +184,10 @@ static void port_tx_write(void *opaque, hwaddr addr, uint64_t value,
}
}
-static const MemoryRegionOps eth_porttx_ops = {
+static const MemoryRegionOps eth_porttx_ops[2] = {
+ [0 ... 1] = {
.read = port_tx_read,
.write = port_tx_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
.impl = {
.min_access_size = 4,
.max_access_size = 4,
@@ -195,6 +196,9 @@ static const MemoryRegionOps eth_porttx_ops = {
.min_access_size = 4,
.max_access_size = 4,
},
+ },
+ [0].endianness = DEVICE_BIG_ENDIAN,
+ [1].endianness = DEVICE_LITTLE_ENDIAN,
};
static uint64_t port_rx_read(void *opaque, hwaddr addr, unsigned int size)
@@ -232,10 +236,10 @@ static void port_rx_write(void *opaque, hwaddr addr, uint64_t value,
}
}
-static const MemoryRegionOps eth_portrx_ops = {
+static const MemoryRegionOps eth_portrx_ops[2] = {
+ [0 ... 1] = {
.read = port_rx_read,
.write = port_rx_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
.impl = {
.min_access_size = 4,
.max_access_size = 4,
@@ -244,6 +248,9 @@ static const MemoryRegionOps eth_portrx_ops = {
.min_access_size = 4,
.max_access_size = 4,
},
+ },
+ [0].endianness = DEVICE_BIG_ENDIAN,
+ [1].endianness = DEVICE_LITTLE_ENDIAN,
};
static bool eth_can_rx(NetClientState *nc)
@@ -328,7 +335,7 @@ static void xilinx_ethlite_realize(DeviceState *dev, Error **errp)
BUFSZ_MAX, &error_abort);
memory_region_add_subregion(&s->container, 0x0800 * i, &s->port[i].txbuf);
memory_region_init_io(&s->port[i].txio, OBJECT(dev),
- ð_porttx_ops, s,
+ ð_porttx_ops[s->little_endian_model], s,
i ? "ethlite.tx[1]io" : "ethlite.tx[0]io",
4 * TX_MAX);
memory_region_add_subregion(&s->container, i ? A_TX_BASE1 : A_TX_BASE0,
@@ -340,7 +347,7 @@ static void xilinx_ethlite_realize(DeviceState *dev, Error **errp)
memory_region_add_subregion(&s->container, 0x1000 + 0x0800 * i,
&s->port[i].rxbuf);
memory_region_init_io(&s->port[i].rxio, OBJECT(dev),
- ð_portrx_ops, s,
+ ð_portrx_ops[s->little_endian_model], s,
i ? "ethlite.rx[1]io" : "ethlite.rx[0]io",
4 * RX_MAX);
memory_region_add_subregion(&s->container, i ? A_RX_BASE1 : A_RX_BASE0,
@@ -363,6 +370,7 @@ static void xilinx_ethlite_init(Object *obj)
}
static const Property xilinx_ethlite_properties[] = {
+ DEFINE_PROP_BOOL("little-endian", XlnxXpsEthLite, little_endian_model, true),
DEFINE_PROP_UINT32("tx-ping-pong", XlnxXpsEthLite, c_tx_pingpong, 1),
DEFINE_PROP_UINT32("rx-ping-pong", XlnxXpsEthLite, c_rx_pingpong, 1),
DEFINE_NIC_PROPERTIES(XlnxXpsEthLite, conf),
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2025-02-10 20:41 ` [PULL 03/32] hw/net/xilinx_ethlite: " Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-12 8:27 ` Thomas Huth
2025-02-10 20:41 ` [PULL 05/32] hw/char/xilinx_uartlite: " Philippe Mathieu-Daudé
` (28 subsequent siblings)
32 siblings, 1 reply; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Richard Henderson
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
Add the "little-endian" property to select the device
endianness, defaulting to little endian.
Set the proper endianness for each machine using the device.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20250206131052.30207-5-philmd@linaro.org>
---
hw/microblaze/petalogix_ml605_mmu.c | 1 +
hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
hw/ppc/virtex_ml507.c | 1 +
hw/timer/xilinx_timer.c | 35 +++++++++++++++---------
4 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index cf3b9574db3..bbda70aa93b 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -127,6 +127,7 @@ petalogix_ml605_init(MachineState *machine)
/* 2 timers at irq 2 @ 100 Mhz. */
dev = qdev_new("xlnx.xps-timer");
+ qdev_prop_set_bit(dev, "little-endian", true);
qdev_prop_set_uint32(dev, "one-timer-only", 0);
qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index fbf52ba8f2f..9d4316b4036 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -114,6 +114,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
/* 2 timers at irq 2 @ 62 Mhz. */
dev = qdev_new("xlnx.xps-timer");
+ qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
qdev_prop_set_uint32(dev, "one-timer-only", 0);
qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 23238119273..f87c221d076 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -230,6 +230,7 @@ static void virtex_init(MachineState *machine)
/* 2 timers at irq 2 @ 62 Mhz. */
dev = qdev_new("xlnx.xps-timer");
+ qdev_prop_set_bit(dev, "little-endian", false);
qdev_prop_set_uint32(dev, "one-timer-only", 0);
qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c
index 6595cf5f517..d942ac226e6 100644
--- a/hw/timer/xilinx_timer.c
+++ b/hw/timer/xilinx_timer.c
@@ -3,6 +3,9 @@
*
* Copyright (c) 2009 Edgar E. Iglesias.
*
+ * DS573: https://docs.amd.com/v/u/en-US/xps_timer
+ * LogiCORE IP XPS Timer/Counter (v1.02a)
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@@ -69,6 +72,7 @@ struct XpsTimerState
{
SysBusDevice parent_obj;
+ bool little_endian_model;
MemoryRegion mmio;
qemu_irq irq;
uint8_t one_timer_only;
@@ -189,18 +193,21 @@ timer_write(void *opaque, hwaddr addr,
timer_update_irq(t);
}
-static const MemoryRegionOps timer_ops = {
- .read = timer_read,
- .write = timer_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
- .impl = {
- .min_access_size = 4,
- .max_access_size = 4,
+static const MemoryRegionOps timer_ops[2] = {
+ [0 ... 1] = {
+ .read = timer_read,
+ .write = timer_write,
+ .impl = {
+ .min_access_size = 4,
+ .max_access_size = 4,
+ },
+ .valid = {
+ .min_access_size = 4,
+ .max_access_size = 4,
+ },
},
- .valid = {
- .min_access_size = 4,
- .max_access_size = 4
- }
+ [0].endianness = DEVICE_BIG_ENDIAN,
+ [1].endianness = DEVICE_LITTLE_ENDIAN,
};
static void timer_hit(void *opaque)
@@ -233,8 +240,9 @@ static void xilinx_timer_realize(DeviceState *dev, Error **errp)
ptimer_transaction_commit(xt->ptimer);
}
- memory_region_init_io(&t->mmio, OBJECT(t), &timer_ops, t, "xlnx.xps-timer",
- R_MAX * 4 * num_timers(t));
+ memory_region_init_io(&t->mmio, OBJECT(t),
+ &timer_ops[t->little_endian_model], t,
+ "xlnx.xps-timer", R_MAX * 4 * num_timers(t));
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &t->mmio);
}
@@ -247,6 +255,7 @@ static void xilinx_timer_init(Object *obj)
}
static const Property xilinx_timer_properties[] = {
+ DEFINE_PROP_BOOL("little-endian", XpsTimerState, little_endian_model, true),
DEFINE_PROP_UINT32("clock-frequency", XpsTimerState, freq_hz, 62 * 1000000),
DEFINE_PROP_UINT8("one-timer-only", XpsTimerState, one_timer_only, 0),
};
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 05/32] hw/char/xilinx_uartlite: Make device endianness configurable
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2025-02-10 20:41 ` [PULL 04/32] hw/timer/xilinx_timer: " Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 06/32] hw/ssi/xilinx_spi: " Philippe Mathieu-Daudé
` (27 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Richard Henderson
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
Add the "little-endian" property to select the device
endianness, defaulting to little endian.
Set the proper endianness on the single machine using the
device.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20250206131052.30207-6-philmd@linaro.org>
---
hw/char/xilinx_uartlite.c | 27 ++++++++++++++----------
hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c
index 56955e0d74a..948da4263b9 100644
--- a/hw/char/xilinx_uartlite.c
+++ b/hw/char/xilinx_uartlite.c
@@ -57,6 +57,7 @@
struct XilinxUARTLite {
SysBusDevice parent_obj;
+ bool little_endian_model;
MemoryRegion mmio;
CharBackend chr;
qemu_irq irq;
@@ -166,17 +167,21 @@ uart_write(void *opaque, hwaddr addr,
uart_update_irq(s);
}
-static const MemoryRegionOps uart_ops = {
- .read = uart_read,
- .write = uart_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
- .valid = {
- .min_access_size = 1,
- .max_access_size = 4
- }
+static const MemoryRegionOps uart_ops[2] = {
+ [0 ... 1] = {
+ .read = uart_read,
+ .write = uart_write,
+ .valid = {
+ .min_access_size = 1,
+ .max_access_size = 4,
+ },
+ },
+ [0].endianness = DEVICE_BIG_ENDIAN,
+ [1].endianness = DEVICE_LITTLE_ENDIAN,
};
static const Property xilinx_uartlite_properties[] = {
+ DEFINE_PROP_BOOL("little-endian", XilinxUARTLite, little_endian_model, true),
DEFINE_PROP_CHR("chardev", XilinxUARTLite, chr),
};
@@ -214,6 +219,9 @@ static void xilinx_uartlite_realize(DeviceState *dev, Error **errp)
{
XilinxUARTLite *s = XILINX_UARTLITE(dev);
+ memory_region_init_io(&s->mmio, OBJECT(dev),
+ &uart_ops[s->little_endian_model],
+ s, "xlnx.xps-uartlite", R_MAX * 4);
qemu_chr_fe_set_handlers(&s->chr, uart_can_rx, uart_rx,
uart_event, NULL, s, NULL, true);
}
@@ -223,9 +231,6 @@ static void xilinx_uartlite_init(Object *obj)
XilinxUARTLite *s = XILINX_UARTLITE(obj);
sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq);
-
- memory_region_init_io(&s->mmio, obj, &uart_ops, s,
- "xlnx.xps-uartlite", R_MAX * 4);
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
}
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index 9d4316b4036..96aed4ed1a3 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -107,6 +107,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
}
dev = qdev_new(TYPE_XILINX_UARTLITE);
+ qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
qdev_prop_set_chr(dev, "chardev", serial_hd(0));
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, UARTLITE_BASEADDR);
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 06/32] hw/ssi/xilinx_spi: Make device endianness configurable
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2025-02-10 20:41 ` [PULL 05/32] hw/char/xilinx_uartlite: " Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 07/32] hw/arm/xlnx-zynqmp: Use &error_abort for programming errors Philippe Mathieu-Daudé
` (26 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Richard Henderson
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
Add the "little-endian" property to select the device
endianness, defaulting to little endian.
Set the proper endianness on the single machine using the
device.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20250206131052.30207-7-philmd@linaro.org>
---
hw/microblaze/petalogix_ml605_mmu.c | 1 +
hw/ssi/xilinx_spi.c | 24 +++++++++++++++---------
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index bbda70aa93b..a795c6385b4 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -175,6 +175,7 @@ petalogix_ml605_init(MachineState *machine)
SSIBus *spi;
dev = qdev_new("xlnx.xps-spi");
+ qdev_prop_set_bit(dev, "little-endian", true);
qdev_prop_set_uint8(dev, "num-ss-bits", NUM_SPI_FLASHES);
busdev = SYS_BUS_DEVICE(dev);
sysbus_realize_and_unref(busdev, &error_fatal);
diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c
index fd1ff12eb1d..299004ff36d 100644
--- a/hw/ssi/xilinx_spi.c
+++ b/hw/ssi/xilinx_spi.c
@@ -83,6 +83,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(XilinxSPI, XILINX_SPI)
struct XilinxSPI {
SysBusDevice parent_obj;
+ bool little_endian_model;
MemoryRegion mmio;
qemu_irq irq;
@@ -313,14 +314,17 @@ done:
xlx_spi_update_irq(s);
}
-static const MemoryRegionOps spi_ops = {
- .read = spi_read,
- .write = spi_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
- .valid = {
- .min_access_size = 4,
- .max_access_size = 4
- }
+static const MemoryRegionOps spi_ops[2] = {
+ [0 ... 1] = {
+ .read = spi_read,
+ .write = spi_write,
+ .valid = {
+ .min_access_size = 4,
+ .max_access_size = 4,
+ },
+ },
+ [0].endianness = DEVICE_BIG_ENDIAN,
+ [1].endianness = DEVICE_LITTLE_ENDIAN,
};
static void xilinx_spi_realize(DeviceState *dev, Error **errp)
@@ -339,7 +343,8 @@ static void xilinx_spi_realize(DeviceState *dev, Error **errp)
sysbus_init_irq(sbd, &s->cs_lines[i]);
}
- memory_region_init_io(&s->mmio, OBJECT(s), &spi_ops, s,
+ memory_region_init_io(&s->mmio, OBJECT(s),
+ &spi_ops[s->little_endian_model], s,
"xilinx-spi", R_MAX * 4);
sysbus_init_mmio(sbd, &s->mmio);
@@ -362,6 +367,7 @@ static const VMStateDescription vmstate_xilinx_spi = {
};
static const Property xilinx_spi_properties[] = {
+ DEFINE_PROP_BOOL("little-endian", XilinxSPI, little_endian_model, true),
DEFINE_PROP_UINT8("num-ss-bits", XilinxSPI, num_cs, 1),
};
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 07/32] hw/arm/xlnx-zynqmp: Use &error_abort for programming errors
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2025-02-10 20:41 ` [PULL 06/32] hw/ssi/xilinx_spi: " Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 08/32] hw/intc/apic: Fixes magic number use, removes outdated comment Philippe Mathieu-Daudé
` (25 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Richard Henderson, Anton Johansson
When a property value is static (not provided by QMP or CLI),
error shouldn't happen, otherwise it is a programming error.
Therefore simplify and use &error_abort as this can't fail.
Reported-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20241108154317.12129-11-philmd@linaro.org>
---
hw/arm/xlnx-zynqmp.c | 38 ++++++++++++--------------------------
1 file changed, 12 insertions(+), 26 deletions(-)
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index bd5b0dd5e76..d6022ff2d3d 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -689,16 +689,10 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
* - SDIO Specification Version 3.0
* - eMMC Specification Version 4.51
*/
- if (!object_property_set_uint(sdhci, "sd-spec-version", 3, errp)) {
- return;
- }
- if (!object_property_set_uint(sdhci, "capareg", SDHCI_CAPABILITIES,
- errp)) {
- return;
- }
- if (!object_property_set_uint(sdhci, "uhs", UHS_I, errp)) {
- return;
- }
+ object_property_set_uint(sdhci, "sd-spec-version", 3, &error_abort);
+ object_property_set_uint(sdhci, "capareg", SDHCI_CAPABILITIES,
+ &error_abort);
+ object_property_set_uint(sdhci, "uhs", UHS_I, &error_abort);
if (!sysbus_realize(SYS_BUS_DEVICE(sdhci), errp)) {
return;
}
@@ -763,14 +757,10 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
xlnx_zynqmp_create_unimp_mmio(s);
for (i = 0; i < XLNX_ZYNQMP_NUM_GDMA_CH; i++) {
- if (!object_property_set_uint(OBJECT(&s->gdma[i]), "bus-width", 128,
- errp)) {
- return;
- }
- if (!object_property_set_link(OBJECT(&s->gdma[i]), "dma",
- OBJECT(system_memory), errp)) {
- return;
- }
+ object_property_set_uint(OBJECT(&s->gdma[i]), "bus-width", 128,
+ &error_abort);
+ object_property_set_link(OBJECT(&s->gdma[i]), "dma",
+ OBJECT(system_memory), &error_abort);
if (!sysbus_realize(SYS_BUS_DEVICE(&s->gdma[i]), errp)) {
return;
}
@@ -811,10 +801,8 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
sysbus_connect_irq(SYS_BUS_DEVICE(&s->qspi_dma), 0,
qdev_get_gpio_in(DEVICE(&s->qspi_irq_orgate), 0));
- if (!object_property_set_link(OBJECT(&s->qspi), "stream-connected-dma",
- OBJECT(&s->qspi_dma), errp)) {
- return;
- }
+ object_property_set_link(OBJECT(&s->qspi), "stream-connected-dma",
+ OBJECT(&s->qspi_dma), &error_abort);
if (!sysbus_realize(SYS_BUS_DEVICE(&s->qspi), errp)) {
return;
}
@@ -833,10 +821,8 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
}
for (i = 0; i < XLNX_ZYNQMP_NUM_USB; i++) {
- if (!object_property_set_link(OBJECT(&s->usb[i].sysbus_xhci), "dma",
- OBJECT(system_memory), errp)) {
- return;
- }
+ object_property_set_link(OBJECT(&s->usb[i].sysbus_xhci), "dma",
+ OBJECT(system_memory), &error_abort);
qdev_prop_set_uint32(DEVICE(&s->usb[i].sysbus_xhci), "intrs", 4);
qdev_prop_set_uint32(DEVICE(&s->usb[i].sysbus_xhci), "slots", 2);
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 08/32] hw/intc/apic: Fixes magic number use, removes outdated comment
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (6 preceding siblings ...)
2025-02-10 20:41 ` [PULL 07/32] hw/arm/xlnx-zynqmp: Use &error_abort for programming errors Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 09/32] hw/core/machine: Reject thread level cache Philippe Mathieu-Daudé
` (24 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Phil Dennis-Jordan, Philippe Mathieu-Daudé
From: Phil Dennis-Jordan <phil@philjordan.eu>
This changes replaces the use of an explicit literal constant for
the APIC base address mask with the existing symbolic constant
intended for this purpose.
Additionally, we remove the comment about not being able to
re-enable the APIC after disabling it. This is no longer
the case after the APIC implementation's state machine was
modified in 9.0.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241209203629.74436-11-phil@philjordan.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/intc/apic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index d1d343d4216..d18c1dbf2cb 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -350,9 +350,8 @@ static int apic_set_base(APICCommonState *s, uint64_t val)
return -1;
}
- s->apicbase = (val & 0xfffff000) |
+ s->apicbase = (val & MSR_IA32_APICBASE_BASE) |
(s->apicbase & (MSR_IA32_APICBASE_BSP | MSR_IA32_APICBASE_ENABLE));
- /* if disabled, cannot be enabled again */
if (!(val & MSR_IA32_APICBASE_ENABLE)) {
s->apicbase &= ~MSR_IA32_APICBASE_ENABLE;
cpu_clear_apic_feature(&s->cpu->env);
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 09/32] hw/core/machine: Reject thread level cache
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (7 preceding siblings ...)
2025-02-10 20:41 ` [PULL 08/32] hw/intc/apic: Fixes magic number use, removes outdated comment Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 10/32] hw/sysbus: Use sizeof(BusState) in main_system_bus_create() Philippe Mathieu-Daudé
` (23 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Zhao Liu, Michael S. Tsirkin, Philippe Mathieu-Daudé
From: Zhao Liu <zhao1.liu@intel.com>
Currently, neither i386 nor ARM have real hardware support for per-
thread cache, and there is no clear demand for this specific cache
topology.
Additionally, since ARM even can't support this special cache topology
in device tree, it is unnecessary to support it at this moment, even
though per-thread cache might have potential scheduling benefits for
VMs without CPU affinity.
Therefore, disable thread-level cache topology in the general machine
part. At present, i386 has not enabled SMP cache, so disabling the
thread parameter does not pose compatibility issues.
In the future, if there is a clear demand for this feature, the correct
approach would be to add a new control field in MachineClass.smp_props
and enable it only for the machines that require it.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250110145115.1574345-2-zhao1.liu@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/core/machine-smp.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/core/machine-smp.c b/hw/core/machine-smp.c
index b954eb84902..4e020c358b6 100644
--- a/hw/core/machine-smp.c
+++ b/hw/core/machine-smp.c
@@ -321,6 +321,13 @@ bool machine_parse_smp_cache(MachineState *ms,
return false;
}
+ if (props->topology == CPU_TOPOLOGY_LEVEL_THREAD) {
+ error_setg(errp,
+ "%s level cache not supported by this machine",
+ CpuTopologyLevel_str(props->topology));
+ return false;
+ }
+
if (!machine_check_topo_support(ms, props->topology, errp)) {
return false;
}
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 10/32] hw/sysbus: Use sizeof(BusState) in main_system_bus_create()
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (8 preceding siblings ...)
2025-02-10 20:41 ` [PULL 09/32] hw/core/machine: Reject thread level cache Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 11/32] hw/sysbus: Declare QOM types using DEFINE_TYPES() macro Philippe Mathieu-Daudé
` (22 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Richard Henderson, Alexander Graf,
Clément Mathieu--Drif
Rather than using the obscure system_bus_info.instance_size,
directly use sizeof(BusState).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Clément Mathieu--Drif<clement.mathieu--drif@eviden.com>
Message-Id: <20250125181343.59151-2-philmd@linaro.org>
---
hw/core/sysbus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index 9355849ff0a..f713bbfe04f 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -323,8 +323,8 @@ static void main_system_bus_create(void)
* assign main_system_bus before qbus_init()
* in order to make "if (bus != sysbus_get_default())" work
*/
- main_system_bus = g_malloc0(system_bus_info.instance_size);
- qbus_init(main_system_bus, system_bus_info.instance_size,
+ main_system_bus = g_new0(BusState, 1);
+ qbus_init(main_system_bus, sizeof(BusState),
TYPE_SYSTEM_BUS, NULL, "main-system-bus");
OBJECT(main_system_bus)->free = g_free;
}
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 11/32] hw/sysbus: Declare QOM types using DEFINE_TYPES() macro
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (9 preceding siblings ...)
2025-02-10 20:41 ` [PULL 10/32] hw/sysbus: Use sizeof(BusState) in main_system_bus_create() Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 12/32] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
` (21 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Richard Henderson, Alexander Graf,
Clément Mathieu--Drif, Bernhard Beschow
When multiple QOM types are registered in the same file,
it is simpler to use the the DEFINE_TYPES() macro. In
particular because type array declared with such macro
are easier to review.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20250125181343.59151-3-philmd@linaro.org>
---
hw/core/sysbus.c | 40 +++++++++++++++++-----------------------
1 file changed, 17 insertions(+), 23 deletions(-)
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index f713bbfe04f..075c7dfd69b 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -19,7 +19,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "qemu/module.h"
#include "hw/sysbus.h"
#include "monitor/monitor.h"
#include "exec/address-spaces.h"
@@ -80,13 +79,6 @@ static void system_bus_class_init(ObjectClass *klass, void *data)
k->get_fw_dev_path = sysbus_get_fw_dev_path;
}
-static const TypeInfo system_bus_info = {
- .name = TYPE_SYSTEM_BUS,
- .parent = TYPE_BUS,
- .instance_size = sizeof(BusState),
- .class_init = system_bus_class_init,
-};
-
/* Check whether an IRQ source exists */
bool sysbus_has_irq(SysBusDevice *dev, int n)
{
@@ -306,15 +298,6 @@ static void sysbus_device_class_init(ObjectClass *klass, void *data)
k->user_creatable = false;
}
-static const TypeInfo sysbus_device_type_info = {
- .name = TYPE_SYS_BUS_DEVICE,
- .parent = TYPE_DEVICE,
- .instance_size = sizeof(SysBusDevice),
- .abstract = true,
- .class_size = sizeof(SysBusDeviceClass),
- .class_init = sysbus_device_class_init,
-};
-
static BusState *main_system_bus;
static void main_system_bus_create(void)
@@ -337,10 +320,21 @@ BusState *sysbus_get_default(void)
return main_system_bus;
}
-static void sysbus_register_types(void)
-{
- type_register_static(&system_bus_info);
- type_register_static(&sysbus_device_type_info);
-}
+static const TypeInfo sysbus_types[] = {
+ {
+ .name = TYPE_SYSTEM_BUS,
+ .parent = TYPE_BUS,
+ .instance_size = sizeof(BusState),
+ .class_init = system_bus_class_init,
+ },
+ {
+ .name = TYPE_SYS_BUS_DEVICE,
+ .parent = TYPE_DEVICE,
+ .instance_size = sizeof(SysBusDevice),
+ .abstract = true,
+ .class_size = sizeof(SysBusDeviceClass),
+ .class_init = sysbus_device_class_init,
+ },
+};
-type_init(sysbus_register_types)
+DEFINE_TYPES(sysbus_types)
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 12/32] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (10 preceding siblings ...)
2025-02-10 20:41 ` [PULL 11/32] hw/sysbus: Declare QOM types using DEFINE_TYPES() macro Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 13/32] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
` (20 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Richard Henderson, Alexander Graf,
Clément Mathieu--Drif
Some TYPE_SYS_BUS_DEVICEs can be optionally dynamically
plugged on the TYPE_PLATFORM_BUS_DEVICE.
Rather than sometimes noting that with comment around
the 'user_creatable = true' line in each DeviceRealize
handler, introduce an abstract TYPE_DYNAMIC_SYS_BUS_DEVICE
class.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250125181343.59151-4-philmd@linaro.org>
---
include/hw/sysbus.h | 2 ++
hw/core/sysbus.c | 14 ++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h
index c9b1e0e90e3..81bbda10d37 100644
--- a/include/hw/sysbus.h
+++ b/include/hw/sysbus.h
@@ -19,6 +19,8 @@ DECLARE_INSTANCE_CHECKER(BusState, SYSTEM_BUS,
OBJECT_DECLARE_TYPE(SysBusDevice, SysBusDeviceClass,
SYS_BUS_DEVICE)
+#define TYPE_DYNAMIC_SYS_BUS_DEVICE "dynamic-sysbus-device"
+
/**
* SysBusDeviceClass:
*
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index 075c7dfd69b..98819d5dc61 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -320,6 +320,14 @@ BusState *sysbus_get_default(void)
return main_system_bus;
}
+static void dynamic_sysbus_device_class_init(ObjectClass *klass, void *data)
+{
+ DeviceClass *k = DEVICE_CLASS(klass);
+
+ k->user_creatable = true;
+ k->hotpluggable = false;
+}
+
static const TypeInfo sysbus_types[] = {
{
.name = TYPE_SYSTEM_BUS,
@@ -335,6 +343,12 @@ static const TypeInfo sysbus_types[] = {
.class_size = sizeof(SysBusDeviceClass),
.class_init = sysbus_device_class_init,
},
+ {
+ .name = TYPE_DYNAMIC_SYS_BUS_DEVICE,
+ .parent = TYPE_SYS_BUS_DEVICE,
+ .class_init = dynamic_sysbus_device_class_init,
+ .abstract = true,
+ }
};
DEFINE_TYPES(sysbus_types)
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 13/32] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (11 preceding siblings ...)
2025-02-10 20:41 ` [PULL 12/32] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 14/32] hw/display: Have RAMFB device " Philippe Mathieu-Daudé
` (19 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Richard Henderson, Alexander Graf
Do not explain why VFIO_PLATFORM devices are user_creatable,
have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to make explicit
that they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alexander Graf <graf@amazon.com>
Message-Id: <20250125181343.59151-5-philmd@linaro.org>
---
hw/vfio/amd-xgbe.c | 2 --
hw/vfio/calxeda-xgmac.c | 2 --
hw/vfio/platform.c | 4 +---
3 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/hw/vfio/amd-xgbe.c b/hw/vfio/amd-xgbe.c
index 96bd608b8dd..aaa96903db0 100644
--- a/hw/vfio/amd-xgbe.c
+++ b/hw/vfio/amd-xgbe.c
@@ -41,8 +41,6 @@ static void vfio_amd_xgbe_class_init(ObjectClass *klass, void *data)
&vcxc->parent_realize);
dc->desc = "VFIO AMD XGBE";
dc->vmsd = &vfio_platform_amd_xgbe_vmstate;
- /* Supported by TYPE_VIRT_MACHINE */
- dc->user_creatable = true;
}
static const TypeInfo vfio_amd_xgbe_dev_info = {
diff --git a/hw/vfio/calxeda-xgmac.c b/hw/vfio/calxeda-xgmac.c
index 87c382e7361..b016d42b496 100644
--- a/hw/vfio/calxeda-xgmac.c
+++ b/hw/vfio/calxeda-xgmac.c
@@ -41,8 +41,6 @@ static void vfio_calxeda_xgmac_class_init(ObjectClass *klass, void *data)
&vcxc->parent_realize);
dc->desc = "VFIO Calxeda XGMAC";
dc->vmsd = &vfio_platform_calxeda_xgmac_vmstate;
- /* Supported by TYPE_VIRT_MACHINE */
- dc->user_creatable = true;
}
static const TypeInfo vfio_calxeda_xgmac_dev_info = {
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 1070a2113a1..f491f4dc954 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -672,13 +672,11 @@ static void vfio_platform_class_init(ObjectClass *klass, void *data)
dc->desc = "VFIO-based platform device assignment";
sbc->connect_irq_notifier = vfio_start_irqfd_injection;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
- /* Supported by TYPE_VIRT_MACHINE */
- dc->user_creatable = true;
}
static const TypeInfo vfio_platform_dev_info = {
.name = TYPE_VFIO_PLATFORM,
- .parent = TYPE_SYS_BUS_DEVICE,
+ .parent = TYPE_DYNAMIC_SYS_BUS_DEVICE,
.instance_size = sizeof(VFIOPlatformDevice),
.instance_init = vfio_platform_instance_init,
.class_init = vfio_platform_class_init,
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 14/32] hw/display: Have RAMFB device inherit from DYNAMIC_SYS_BUS_DEVICE
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (12 preceding siblings ...)
2025-02-10 20:41 ` [PULL 13/32] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 15/32] hw/i386: Have X86_IOMMU devices " Philippe Mathieu-Daudé
` (18 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Richard Henderson, Alexander Graf,
Clément Mathieu--Drif
Because the RAM FB device can be optionally plugged on the
TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250125181343.59151-6-philmd@linaro.org>
---
hw/display/ramfb-standalone.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
index 6c35028965d..1be106b57f2 100644
--- a/hw/display/ramfb-standalone.c
+++ b/hw/display/ramfb-standalone.c
@@ -72,13 +72,12 @@ static void ramfb_class_initfn(ObjectClass *klass, void *data)
dc->vmsd = &ramfb_dev_vmstate;
dc->realize = ramfb_realizefn;
dc->desc = "ram framebuffer standalone device";
- dc->user_creatable = true;
device_class_set_props(dc, ramfb_properties);
}
static const TypeInfo ramfb_info = {
.name = TYPE_RAMFB_DEVICE,
- .parent = TYPE_SYS_BUS_DEVICE,
+ .parent = TYPE_DYNAMIC_SYS_BUS_DEVICE,
.instance_size = sizeof(RAMFBStandaloneState),
.class_init = ramfb_class_initfn,
};
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 15/32] hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS_BUS_DEVICE
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (13 preceding siblings ...)
2025-02-10 20:41 ` [PULL 14/32] hw/display: Have RAMFB device " Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 16/32] hw/net: Have eTSEC device " Philippe Mathieu-Daudé
` (17 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Richard Henderson, Alexander Graf,
Clément Mathieu--Drif
Do not explain why _X86_IOMMU devices are user_creatable,
have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to explicit
they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250125181343.59151-7-philmd@linaro.org>
---
hw/i386/amd_iommu.c | 2 --
hw/i386/intel_iommu.c | 2 --
hw/i386/x86-iommu.c | 2 +-
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 6b13ce894b1..e8e084c7cf8 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1687,8 +1687,6 @@ static void amdvi_sysbus_class_init(ObjectClass *klass, void *data)
dc->hotpluggable = false;
dc_class->realize = amdvi_sysbus_realize;
dc_class->int_remap = amdvi_int_remap;
- /* Supported by the pc-q35-* machine types */
- dc->user_creatable = true;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->desc = "AMD IOMMU (AMD-Vi) DMA Remapping device";
device_class_set_props(dc, amdvi_properties);
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index f366c223d0e..7fde0603bfe 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -4871,8 +4871,6 @@ static void vtd_class_init(ObjectClass *klass, void *data)
dc->hotpluggable = false;
x86_class->realize = vtd_realize;
x86_class->int_remap = vtd_int_remap;
- /* Supported by the pc-q35-* machine types */
- dc->user_creatable = true;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->desc = "Intel IOMMU (VT-d) DMA Remapping device";
}
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
index fed34b2fcfa..5cdd165af0d 100644
--- a/hw/i386/x86-iommu.c
+++ b/hw/i386/x86-iommu.c
@@ -146,7 +146,7 @@ bool x86_iommu_ir_supported(X86IOMMUState *s)
static const TypeInfo x86_iommu_info = {
.name = TYPE_X86_IOMMU_DEVICE,
- .parent = TYPE_SYS_BUS_DEVICE,
+ .parent = TYPE_DYNAMIC_SYS_BUS_DEVICE,
.instance_size = sizeof(X86IOMMUState),
.class_init = x86_iommu_class_init,
.class_size = sizeof(X86IOMMUClass),
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 16/32] hw/net: Have eTSEC device inherit from DYNAMIC_SYS_BUS_DEVICE
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (14 preceding siblings ...)
2025-02-10 20:41 ` [PULL 15/32] hw/i386: Have X86_IOMMU devices " Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 17/32] hw/tpm: Have TPM TIS sysbus " Philippe Mathieu-Daudé
` (16 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Richard Henderson, Alexander Graf,
Clément Mathieu--Drif, Bernhard Beschow
Because the network eTSEC device can be optionally plugged on the
TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Tested-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20250125181343.59151-8-philmd@linaro.org>
---
hw/net/fsl_etsec/etsec.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c
index 781b9003954..3ce4fa2662d 100644
--- a/hw/net/fsl_etsec/etsec.c
+++ b/hw/net/fsl_etsec/etsec.c
@@ -425,14 +425,12 @@ static void etsec_class_init(ObjectClass *klass, void *data)
dc->realize = etsec_realize;
device_class_set_legacy_reset(dc, etsec_reset);
device_class_set_props(dc, etsec_properties);
- /* Supported by ppce500 machine */
- dc->user_creatable = true;
}
static const TypeInfo etsec_types[] = {
{
.name = TYPE_ETSEC_COMMON,
- .parent = TYPE_SYS_BUS_DEVICE,
+ .parent = TYPE_DYNAMIC_SYS_BUS_DEVICE,
.instance_size = sizeof(eTSEC),
.class_init = etsec_class_init,
.instance_init = etsec_instance_init,
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 17/32] hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (15 preceding siblings ...)
2025-02-10 20:41 ` [PULL 16/32] hw/net: Have eTSEC device " Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 18/32] hw/xen: Prefer QOM cast for XenLegacyDevice Philippe Mathieu-Daudé
` (15 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Richard Henderson, Alexander Graf,
Clément Mathieu--Drif, Stefan Berger
Because the TPM TIS sysbus device can be optionally plugged on the
TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-Id: <20250125181343.59151-9-philmd@linaro.org>
---
hw/tpm/tpm_tis_sysbus.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c
index ee0bfe9538e..4f187690a28 100644
--- a/hw/tpm/tpm_tis_sysbus.c
+++ b/hw/tpm/tpm_tis_sysbus.c
@@ -133,7 +133,6 @@ static void tpm_tis_sysbus_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_tpm_tis_sysbus;
tc->model = TPM_MODEL_TPM_TIS;
dc->realize = tpm_tis_sysbus_realizefn;
- dc->user_creatable = true;
device_class_set_legacy_reset(dc, tpm_tis_sysbus_reset);
tc->request_completed = tpm_tis_sysbus_request_completed;
tc->get_version = tpm_tis_sysbus_get_tpm_version;
@@ -142,7 +141,7 @@ static void tpm_tis_sysbus_class_init(ObjectClass *klass, void *data)
static const TypeInfo tpm_tis_sysbus_info = {
.name = TYPE_TPM_TIS_SYSBUS,
- .parent = TYPE_SYS_BUS_DEVICE,
+ .parent = TYPE_DYNAMIC_SYS_BUS_DEVICE,
.instance_size = sizeof(TPMStateSysBus),
.instance_init = tpm_tis_sysbus_initfn,
.class_init = tpm_tis_sysbus_class_init,
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 18/32] hw/xen: Prefer QOM cast for XenLegacyDevice
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (16 preceding siblings ...)
2025-02-10 20:41 ` [PULL 17/32] hw/tpm: Have TPM TIS sysbus " Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 19/32] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
` (14 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Bernhard Beschow, Philippe Mathieu-Daudé
From: Bernhard Beschow <shentey@gmail.com>
Makes the code less sensitive regarding changes in the class hierarchy which
will be performed in the next patch.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250127094129.15941-1-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/usb/xen-usb.c | 6 +++---
hw/xen/xen-legacy-backend.c | 2 +-
hw/xen/xen_pvdev.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c
index 13b065b0faa..fa46a7da01c 100644
--- a/hw/usb/xen-usb.c
+++ b/hw/usb/xen-usb.c
@@ -755,10 +755,10 @@ static void usbback_portid_add(struct usbback_info *usbif, unsigned port,
qdict = qdict_new();
qdict_put_str(qdict, "driver", "usb-host");
- tmp = g_strdup_printf("%s.0", usbif->xendev.qdev.id);
+ tmp = g_strdup_printf("%s.0", DEVICE(&usbif->xendev)->id);
qdict_put_str(qdict, "bus", tmp);
g_free(tmp);
- tmp = g_strdup_printf("%s-%u", usbif->xendev.qdev.id, port);
+ tmp = g_strdup_printf("%s-%u", DEVICE(&usbif->xendev)->id, port);
qdict_put_str(qdict, "id", tmp);
g_free(tmp);
qdict_put_int(qdict, "port", port);
@@ -1022,7 +1022,7 @@ static void usbback_alloc(struct XenLegacyDevice *xendev)
usbif = container_of(xendev, struct usbback_info, xendev);
usb_bus_new(&usbif->bus, sizeof(usbif->bus), &xen_usb_bus_ops,
- DEVICE(&xendev->qdev));
+ DEVICE(xendev));
for (i = 0; i < USBBACK_MAXPORTS; i++) {
p = &(usbif->ports[i].port);
usb_register_port(&usbif->bus, p, usbif, i, &xen_usb_port_ops,
diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c
index 118c571b3a7..ca2fe0e6b36 100644
--- a/hw/xen/xen-legacy-backend.c
+++ b/hw/xen/xen-legacy-backend.c
@@ -163,7 +163,7 @@ static struct XenLegacyDevice *xen_be_get_xendev(const char *type, int dom,
/* init new xendev */
xendev = g_malloc0(ops->size);
- object_initialize(&xendev->qdev, ops->size, TYPE_XENBACKEND);
+ object_initialize(xendev, ops->size, TYPE_XENBACKEND);
OBJECT(xendev)->free = g_free;
qdev_set_id(DEVICE(xendev), g_strdup_printf("xen-%s-%d", type, dev),
&error_fatal);
diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c
index c9143ba259e..fe95b62d133 100644
--- a/hw/xen/xen_pvdev.c
+++ b/hw/xen/xen_pvdev.c
@@ -273,7 +273,7 @@ void xen_pv_del_xendev(struct XenLegacyDevice *xendev)
QTAILQ_REMOVE(&xendevs, xendev, next);
- qdev_unplug(&xendev->qdev, NULL);
+ qdev_unplug(DEVICE(xendev), NULL);
}
void xen_pv_insert_xendev(struct XenLegacyDevice *xendev)
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 19/32] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (17 preceding siblings ...)
2025-02-10 20:41 ` [PULL 18/32] hw/xen: Prefer QOM cast for XenLegacyDevice Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 20/32] hw/boards: Convert no_sdcard flag to OnOffAuto tri-state Philippe Mathieu-Daudé
` (13 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Alexander Graf, Bernhard Beschow
Because the legacy Xen backend devices can optionally be plugged on the
TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE.
Remove the implicit TYPE_XENSYSDEV instance_size.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alexander Graf <graf@amazon.com>
Tested-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20250125181343.59151-10-philmd@linaro.org>
---
include/hw/xen/xen_pvdev.h | 5 +++--
hw/xen/xen-legacy-backend.c | 7 ++-----
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h
index 0c984440476..629bec90d09 100644
--- a/include/hw/xen/xen_pvdev.h
+++ b/include/hw/xen/xen_pvdev.h
@@ -1,7 +1,7 @@
#ifndef QEMU_HW_XEN_PVDEV_H
#define QEMU_HW_XEN_PVDEV_H
-#include "hw/qdev-core.h"
+#include "hw/sysbus.h"
#include "hw/xen/xen_backend_ops.h"
/* ------------------------------------------------------------- */
@@ -32,7 +32,8 @@ struct XenDevOps {
};
struct XenLegacyDevice {
- DeviceState qdev;
+ SysBusDevice parent_obj;
+
const char *type;
int dom;
int dev;
diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c
index ca2fe0e6b36..bf58db0ca68 100644
--- a/hw/xen/xen-legacy-backend.c
+++ b/hw/xen/xen-legacy-backend.c
@@ -640,16 +640,14 @@ static void xendev_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
- /* xen-backend devices can be plugged/unplugged dynamically */
- dc->user_creatable = true;
dc->bus_type = TYPE_XENSYSBUS;
}
static const TypeInfo xendev_type_info = {
.name = TYPE_XENBACKEND,
- .parent = TYPE_DEVICE,
+ .parent = TYPE_DYNAMIC_SYS_BUS_DEVICE,
.class_init = xendev_class_init,
- .instance_size = sizeof(struct XenLegacyDevice),
+ .instance_size = sizeof(XenLegacyDevice),
};
static void xen_sysbus_class_init(ObjectClass *klass, void *data)
@@ -672,7 +670,6 @@ static const TypeInfo xensysbus_info = {
static const TypeInfo xensysdev_info = {
.name = TYPE_XENSYSDEV,
.parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(SysBusDevice),
};
static void xenbe_register_types(void)
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 20/32] hw/boards: Convert no_sdcard flag to OnOffAuto tri-state
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (18 preceding siblings ...)
2025-02-10 20:41 ` [PULL 19/32] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 21/32] hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF Philippe Mathieu-Daudé
` (12 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth
MachineClass::no_sdcard is initialized as false by default.
To catch all uses, convert it to a tri-state, having the
current default (false) becoming AUTO.
No logical change intended.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250204200934.65279-2-philmd@linaro.org>
---
include/hw/boards.h | 2 +-
hw/arm/xilinx_zynq.c | 2 +-
hw/core/null-machine.c | 2 +-
hw/s390x/s390-virtio-ccw.c | 2 +-
system/vl.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index e1f41b2a533..d61b0a47780 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -283,9 +283,9 @@ struct MachineClass {
no_parallel:1,
no_floppy:1,
no_cdrom:1,
- no_sdcard:1,
pci_allow_0_address:1,
legacy_fw_cfg_order:1;
+ OnOffAuto no_sdcard;
bool is_default;
const char *default_machine_opts;
const char *default_boot_order;
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 8477b828745..12418094f9d 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -463,7 +463,7 @@ static void zynq_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Xilinx Zynq Platform Baseboard for Cortex-A9";
mc->init = zynq_init;
mc->max_cpus = ZYNQ_MAX_CPUS;
- mc->no_sdcard = 1;
+ mc->no_sdcard = ON_OFF_AUTO_ON;
mc->ignore_memory_transaction_failures = true;
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_id = "zynq.ext_ram";
diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
index f586a4bef54..b93056c0f7b 100644
--- a/hw/core/null-machine.c
+++ b/hw/core/null-machine.c
@@ -53,7 +53,7 @@ static void machine_none_machine_init(MachineClass *mc)
mc->no_parallel = 1;
mc->no_floppy = 1;
mc->no_cdrom = 1;
- mc->no_sdcard = 1;
+ mc->no_sdcard = ON_OFF_AUTO_ON;
}
DEFINE_MACHINE("none", machine_none_machine_init)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index d9e683c5b49..5f78c8d20ff 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -817,7 +817,7 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
mc->no_cdrom = 1;
mc->no_floppy = 1;
mc->no_parallel = 1;
- mc->no_sdcard = 1;
+ mc->no_sdcard = ON_OFF_AUTO_ON;
mc->max_cpus = S390_MAX_CPUS;
mc->has_hotpluggable_cpus = true;
mc->smp_props.books_supported = true;
diff --git a/system/vl.c b/system/vl.c
index ff91af8eca6..a845f692af1 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -1346,7 +1346,7 @@ static void qemu_disable_default_devices(void)
if (!has_defaults || machine_class->no_cdrom) {
default_cdrom = 0;
}
- if (!has_defaults || machine_class->no_sdcard) {
+ if (!has_defaults || machine_class->no_sdcard == ON_OFF_AUTO_ON) {
default_sdcard = 0;
}
if (!has_defaults) {
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 21/32] hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (19 preceding siblings ...)
2025-02-10 20:41 ` [PULL 20/32] hw/boards: Convert no_sdcard flag to OnOffAuto tri-state Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 22/32] hw/boards: Rename no_sdcard -> auto_create_sdcard Philippe Mathieu-Daudé
` (11 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth
Update MachineClass::no_sdcard default implicit AUTO
initialization to explicit OFF. This flag is consumed
in system/vl.c::qemu_disable_default_devices(). Use
this place to assert we don't have anymore AUTO state.
In hw/ppc/e500.c we add the ppce500_machine_class_init()
method to initialize once all the inherited classes.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250204200934.65279-3-philmd@linaro.org>
---
hw/alpha/dp264.c | 1 +
hw/arm/aspeed.c | 21 +++++++++++++++++++++
hw/arm/b-l475e-iot01a.c | 1 +
hw/arm/bananapi_m2u.c | 1 +
hw/arm/collie.c | 1 +
hw/arm/cubieboard.c | 1 +
hw/arm/digic_boards.c | 1 +
hw/arm/exynos4_boards.c | 2 ++
hw/arm/fby35.c | 1 +
hw/arm/highbank.c | 2 ++
hw/arm/imx25_pdk.c | 1 +
hw/arm/integratorcp.c | 1 +
hw/arm/kzm.c | 1 +
hw/arm/mcimx6ul-evk.c | 1 +
hw/arm/mcimx7d-sabre.c | 1 +
hw/arm/microbit.c | 1 +
hw/arm/mps2-tz.c | 4 ++++
hw/arm/mps2.c | 4 ++++
hw/arm/mps3r.c | 1 +
hw/arm/msf2-som.c | 1 +
hw/arm/musca.c | 2 ++
hw/arm/musicpal.c | 1 +
hw/arm/netduino2.c | 1 +
hw/arm/netduinoplus2.c | 1 +
hw/arm/npcm7xx_boards.c | 5 +++++
hw/arm/olimex-stm32-h405.c | 1 +
hw/arm/omap_sx1.c | 2 ++
hw/arm/orangepi.c | 1 +
hw/arm/raspi.c | 5 +++++
hw/arm/raspi4b.c | 1 +
hw/arm/realview.c | 4 ++++
hw/arm/sabrelite.c | 1 +
hw/arm/sbsa-ref.c | 1 +
hw/arm/stellaris.c | 2 ++
hw/arm/stm32vldiscovery.c | 1 +
hw/arm/versatilepb.c | 2 ++
hw/arm/vexpress.c | 2 ++
hw/arm/virt.c | 1 +
hw/arm/xen-pvh.c | 1 +
hw/arm/xlnx-versal-virt.c | 1 +
hw/arm/xlnx-zcu102.c | 1 +
hw/avr/arduino.c | 1 +
hw/hppa/machine.c | 2 ++
hw/i386/pc.c | 1 +
hw/i386/x86.c | 1 +
hw/i386/xen/xen-pvh.c | 1 +
hw/loongarch/virt.c | 1 +
hw/m68k/an5206.c | 1 +
hw/m68k/mcf5208.c | 1 +
hw/m68k/next-cube.c | 1 +
hw/m68k/q800.c | 1 +
hw/m68k/virt.c | 1 +
hw/microblaze/petalogix_ml605_mmu.c | 1 +
hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
hw/microblaze/xlnx-zynqmp-pmu.c | 1 +
hw/mips/boston.c | 1 +
hw/mips/fuloong2e.c | 1 +
hw/mips/jazz.c | 2 ++
hw/mips/loongson3_virt.c | 1 +
hw/mips/malta.c | 1 +
hw/mips/mipssim.c | 1 +
hw/openrisc/openrisc_sim.c | 1 +
hw/openrisc/virt.c | 1 +
hw/ppc/amigaone.c | 1 +
hw/ppc/e500plat.c | 1 +
hw/ppc/mac_newworld.c | 1 +
hw/ppc/mac_oldworld.c | 1 +
hw/ppc/mpc8544ds.c | 1 +
hw/ppc/pegasos2.c | 1 +
hw/ppc/pnv.c | 1 +
hw/ppc/ppc405_boards.c | 1 +
hw/ppc/ppc440_bamboo.c | 1 +
hw/ppc/prep.c | 1 +
hw/ppc/sam460ex.c | 1 +
hw/ppc/spapr.c | 1 +
hw/ppc/virtex_ml507.c | 1 +
hw/remote/machine.c | 1 +
hw/riscv/microchip_pfsoc.c | 1 +
hw/riscv/opentitan.c | 1 +
hw/riscv/shakti_c.c | 1 +
hw/riscv/sifive_e.c | 1 +
hw/riscv/sifive_u.c | 1 +
hw/riscv/spike.c | 1 +
hw/riscv/virt.c | 1 +
hw/rx/rx-gdbsim.c | 1 +
hw/sh4/r2d.c | 1 +
hw/sparc/leon3.c | 1 +
hw/sparc/sun4m.c | 1 +
hw/sparc64/niagara.c | 1 +
hw/sparc64/sun4u.c | 2 ++
hw/tricore/triboard.c | 1 +
hw/tricore/tricore_testboard.c | 1 +
hw/xen/xen-pvh-common.c | 1 +
hw/xenpv/xen_machine_pv.c | 1 +
hw/xtensa/sim.c | 1 +
hw/xtensa/virt.c | 1 +
hw/xtensa/xtfpga.c | 8 ++++++++
system/vl.c | 1 +
98 files changed, 152 insertions(+)
diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
index 570ea9edf24..b11e527be93 100644
--- a/hw/alpha/dp264.c
+++ b/hw/alpha/dp264.c
@@ -213,6 +213,7 @@ static void clipper_machine_init(MachineClass *mc)
mc->default_cpu_type = ALPHA_CPU_TYPE_NAME("ev67");
mc->default_ram_id = "ram";
mc->default_nic = "e1000";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("clipper", clipper_machine_init)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index d9418e2b9f2..9d9c55adcdc 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -1253,6 +1253,7 @@ static void aspeed_machine_palmetto_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635f";
amc->num_cs = 1;
amc->i2c_init = palmetto_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 256 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1269,6 +1270,7 @@ static void aspeed_machine_quanta_q71l_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635e";
amc->num_cs = 1;
amc->i2c_init = quanta_q71l_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 128 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1287,6 +1289,7 @@ static void aspeed_machine_supermicrox11_bmc_class_init(ObjectClass *oc,
amc->num_cs = 1;
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
amc->i2c_init = palmetto_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 256 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1305,6 +1308,7 @@ static void aspeed_machine_supermicro_x11spi_bmc_class_init(ObjectClass *oc,
amc->num_cs = 1;
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
amc->i2c_init = palmetto_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1321,6 +1325,7 @@ static void aspeed_machine_ast2500_evb_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635f";
amc->num_cs = 1;
amc->i2c_init = ast2500_evb_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1338,6 +1343,7 @@ static void aspeed_machine_yosemitev2_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635e";
amc->num_cs = 2;
amc->i2c_init = yosemitev2_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1354,6 +1360,7 @@ static void aspeed_machine_romulus_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx66l1g45g";
amc->num_cs = 2;
amc->i2c_init = romulus_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1371,6 +1378,7 @@ static void aspeed_machine_tiogapass_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635e";
amc->num_cs = 2;
amc->i2c_init = tiogapass_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1387,6 +1395,7 @@ static void aspeed_machine_sonorapass_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx66l1g45g";
amc->num_cs = 2;
amc->i2c_init = sonorapass_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1403,6 +1412,7 @@ static void aspeed_machine_witherspoon_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx66l1g45g";
amc->num_cs = 2;
amc->i2c_init = witherspoon_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1423,6 +1433,7 @@ static void aspeed_machine_ast2600_evb_class_init(ObjectClass *oc, void *data)
ASPEED_MAC3_ON;
amc->sdhci_wp_inverted = true;
amc->i2c_init = ast2600_evb_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
aspeed_machine_ast2600_class_emmc_init(oc);
@@ -1441,6 +1452,7 @@ static void aspeed_machine_g220a_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
amc->i2c_init = g220a_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1024 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1458,6 +1470,7 @@ static void aspeed_machine_fp5280g2_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
amc->i2c_init = fp5280g2_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1476,6 +1489,7 @@ static void aspeed_machine_rainier_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC2_ON | ASPEED_MAC3_ON;
amc->i2c_init = rainier_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
aspeed_machine_ast2600_class_emmc_init(oc);
@@ -1498,6 +1512,7 @@ static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
amc->macs_mask = ASPEED_MAC3_ON;
amc->i2c_init = fuji_bmc_i2c_init;
amc->uart_default = ASPEED_DEV_UART1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = FUJI_BMC_RAM_SIZE;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1518,6 +1533,7 @@ static void aspeed_machine_bletchley_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC2_ON;
amc->i2c_init = bletchley_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = BLETCHLEY_BMC_RAM_SIZE;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1559,6 +1575,7 @@ static void aspeed_machine_fby35_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC3_ON;
amc->i2c_init = fby35_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
/* FIXME: Replace this macro with something more general */
mc->default_ram_size = FUJI_BMC_RAM_SIZE;
aspeed_machine_class_init_cpus_defaults(mc);
@@ -1641,6 +1658,7 @@ static void aspeed_minibmc_machine_ast1030_evb_class_init(ObjectClass *oc,
amc->spi_model = "w25q256";
amc->num_cs = 2;
amc->macs_mask = 0;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1669,6 +1687,7 @@ static void aspeed_machine_ast2700_evb_class_init(ObjectClass *oc, void *data)
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON | ASPEED_MAC2_ON;
amc->uart_default = ASPEED_DEV_UART12;
amc->i2c_init = ast2700_evb_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1689,6 +1708,7 @@ static void aspeed_machine_qcom_dc_scm_v1_class_init(ObjectClass *oc,
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC2_ON | ASPEED_MAC3_ON;
amc->i2c_init = qcom_dc_scm_bmc_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1708,6 +1728,7 @@ static void aspeed_machine_qcom_firework_class_init(ObjectClass *oc,
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC2_ON | ASPEED_MAC3_ON;
amc->i2c_init = qcom_dc_scm_firework_i2c_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
diff --git a/hw/arm/b-l475e-iot01a.c b/hw/arm/b-l475e-iot01a.c
index c9a5209216c..d43c84435b0 100644
--- a/hw/arm/b-l475e-iot01a.c
+++ b/hw/arm/b-l475e-iot01a.c
@@ -120,6 +120,7 @@ static void bl475e_machine_init(ObjectClass *oc, void *data)
mc->desc = "B-L475E-IOT01A Discovery Kit (Cortex-M4)";
mc->init = bl475e_init;
mc->valid_cpu_types = machine_valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
/* SRAM pre-allocated as part of the SoC instantiation */
mc->default_ram_size = 0;
diff --git a/hw/arm/bananapi_m2u.c b/hw/arm/bananapi_m2u.c
index 0a4b6f29b1c..3da6ec4a03c 100644
--- a/hw/arm/bananapi_m2u.c
+++ b/hw/arm/bananapi_m2u.c
@@ -141,6 +141,7 @@ static void bpim2u_machine_init(MachineClass *mc)
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "bpim2u.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("bpim2u", bpim2u_machine_init)
diff --git a/hw/arm/collie.c b/hw/arm/collie.c
index eaa5c52d45a..80bf12246a9 100644
--- a/hw/arm/collie.c
+++ b/hw/arm/collie.c
@@ -79,6 +79,7 @@ static void collie_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("sa1110");
mc->default_ram_size = RAM_SIZE;
mc->default_ram_id = "strongarm.sdram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo collie_machine_typeinfo = {
diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
index b976727eefd..11d896f8322 100644
--- a/hw/arm/cubieboard.c
+++ b/hw/arm/cubieboard.c
@@ -122,6 +122,7 @@ static void cubieboard_machine_init(MachineClass *mc)
mc->units_per_default_bus = 1;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "cubieboard.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("cubieboard", cubieboard_machine_init)
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index 2492fafeb85..a6ccf7ef9b6 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -143,6 +143,7 @@ static void canon_a1100_machine_init(MachineClass *mc)
mc->ignore_memory_transaction_failures = true;
mc->default_ram_size = 64 * MiB;
mc->default_ram_id = "ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("canon-a1100", canon_a1100_machine_init)
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index 2410e2a28e8..63e86e2c609 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -165,6 +165,7 @@ static void nuri_class_init(ObjectClass *oc, void *data)
mc->min_cpus = EXYNOS4210_NCPUS;
mc->default_cpus = EXYNOS4210_NCPUS;
mc->ignore_memory_transaction_failures = true;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo nuri_type = {
@@ -184,6 +185,7 @@ static void smdkc210_class_init(ObjectClass *oc, void *data)
mc->min_cpus = EXYNOS4210_NCPUS;
mc->default_cpus = EXYNOS4210_NCPUS;
mc->ignore_memory_transaction_failures = true;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo smdkc210_type = {
diff --git a/hw/arm/fby35.c b/hw/arm/fby35.c
index 83d08e578b7..9b448bf764d 100644
--- a/hw/arm/fby35.c
+++ b/hw/arm/fby35.c
@@ -170,6 +170,7 @@ static void fby35_class_init(ObjectClass *oc, void *data)
mc->init = fby35_init;
mc->no_floppy = 1;
mc->no_cdrom = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->min_cpus = mc->max_cpus = mc->default_cpus = 3;
object_class_property_add_bool(oc, "execute-in-place",
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index 495704d9726..97477571e62 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -357,6 +357,7 @@ static void highbank_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "highbank.dram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo highbank_type = {
@@ -381,6 +382,7 @@ static void midway_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "highbank.dram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo midway_type = {
diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c
index c9c2e5dd3b1..8f89e03332f 100644
--- a/hw/arm/imx25_pdk.c
+++ b/hw/arm/imx25_pdk.c
@@ -147,6 +147,7 @@ static void imx25_pdk_machine_init(MachineClass *mc)
mc->init = imx25_pdk_init;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "imx25.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("imx25-pdk", imx25_pdk_machine_init)
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index 4e1b8627d32..905a7c2aecf 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -688,6 +688,7 @@ static void integratorcp_machine_init(MachineClass *mc)
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_id = "integrator.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c
index 08d2b3025cf..45b3b08eb80 100644
--- a/hw/arm/kzm.c
+++ b/hw/arm/kzm.c
@@ -137,6 +137,7 @@ static void kzm_machine_init(MachineClass *mc)
mc->init = kzm_init;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "kzm.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("kzm", kzm_machine_init)
diff --git a/hw/arm/mcimx6ul-evk.c b/hw/arm/mcimx6ul-evk.c
index 690cb64ef36..49520b47f18 100644
--- a/hw/arm/mcimx6ul-evk.c
+++ b/hw/arm/mcimx6ul-evk.c
@@ -74,5 +74,6 @@ static void mcimx6ul_evk_machine_init(MachineClass *mc)
mc->init = mcimx6ul_evk_init;
mc->max_cpus = FSL_IMX6UL_NUM_CPUS;
mc->default_ram_id = "mcimx6ul-evk.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("mcimx6ul-evk", mcimx6ul_evk_machine_init)
diff --git a/hw/arm/mcimx7d-sabre.c b/hw/arm/mcimx7d-sabre.c
index b3e8e50779f..da32fdd29d0 100644
--- a/hw/arm/mcimx7d-sabre.c
+++ b/hw/arm/mcimx7d-sabre.c
@@ -74,5 +74,6 @@ static void mcimx7d_sabre_machine_init(MachineClass *mc)
mc->init = mcimx7d_sabre_init;
mc->max_cpus = FSL_IMX7_NUM_CPUS;
mc->default_ram_id = "mcimx7d-sabre.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("mcimx7d-sabre", mcimx7d_sabre_machine_init)
diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c
index 3f56fb45ce1..9d32ae5bd51 100644
--- a/hw/arm/microbit.c
+++ b/hw/arm/microbit.c
@@ -67,6 +67,7 @@ static void microbit_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "BBC micro:bit (Cortex-M0)";
mc->init = microbit_init;
mc->max_cpus = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo microbit_info = {
diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
index 13ed868b6b9..10626120368 100644
--- a/hw/arm/mps2-tz.c
+++ b/hw/arm/mps2-tz.c
@@ -1320,6 +1320,7 @@ static void mps2tz_an505_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN505;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33");
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->scc_id = 0x41045050;
mmc->sysclk_frq = 20 * 1000 * 1000; /* 20MHz */
mmc->apb_periph_frq = mmc->sysclk_frq;
@@ -1354,6 +1355,7 @@ static void mps2tz_an521_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN521;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33");
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->scc_id = 0x41045210;
mmc->sysclk_frq = 20 * 1000 * 1000; /* 20MHz */
mmc->apb_periph_frq = mmc->sysclk_frq;
@@ -1388,6 +1390,7 @@ static void mps3tz_an524_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN524;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33");
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->scc_id = 0x41045240;
mmc->sysclk_frq = 32 * 1000 * 1000; /* 32MHz */
mmc->apb_periph_frq = mmc->sysclk_frq;
@@ -1427,6 +1430,7 @@ static void mps3tz_an547_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN547;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m55");
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->scc_id = 0x41055470;
mmc->sysclk_frq = 32 * 1000 * 1000; /* 32MHz */
mmc->apb_periph_frq = 25 * 1000 * 1000; /* 25MHz */
diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c
index 3f8db0cab60..2bce37644e2 100644
--- a/hw/arm/mps2.c
+++ b/hw/arm/mps2.c
@@ -487,6 +487,7 @@ static void mps2_an385_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN385;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->scc_id = 0x41043850;
mmc->psram_base = 0x21000000;
mmc->ethernet_base = 0x40200000;
@@ -506,6 +507,7 @@ static void mps2_an386_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN386;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m4");
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->scc_id = 0x41043860;
mmc->psram_base = 0x21000000;
mmc->ethernet_base = 0x40200000;
@@ -525,6 +527,7 @@ static void mps2_an500_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN500;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m7");
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->scc_id = 0x41045000;
mmc->psram_base = 0x60000000;
mmc->ethernet_base = 0xa0000000;
@@ -544,6 +547,7 @@ static void mps2_an511_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN511;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->scc_id = 0x41045110;
mmc->psram_base = 0x21000000;
mmc->ethernet_base = 0x40200000;
diff --git a/hw/arm/mps3r.c b/hw/arm/mps3r.c
index 1bddb5e822f..ae70ebe8604 100644
--- a/hw/arm/mps3r.c
+++ b/hw/arm/mps3r.c
@@ -618,6 +618,7 @@ static void mps3r_an536_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 2;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-r52");
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->raminfo = an536_raminfo;
mps3r_set_default_ram_info(mmc);
}
diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c
index 9b20f1e2c98..349a96a0b5d 100644
--- a/hw/arm/msf2-som.c
+++ b/hw/arm/msf2-som.c
@@ -106,6 +106,7 @@ static void emcraft_sf2_machine_init(MachineClass *mc)
mc->desc = "SmartFusion2 SOM kit from Emcraft (M2S010)";
mc->init = emcraft_sf2_s2s010_init;
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("emcraft-sf2", emcraft_sf2_machine_init)
diff --git a/hw/arm/musca.c b/hw/arm/musca.c
index e9c092abc3d..89451b96843 100644
--- a/hw/arm/musca.c
+++ b/hw/arm/musca.c
@@ -615,6 +615,7 @@ static void musca_a_class_init(ObjectClass *oc, void *data)
MuscaMachineClass *mmc = MUSCA_MACHINE_CLASS(oc);
mc->desc = "ARM Musca-A board (dual Cortex-M33)";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->type = MUSCA_A;
mmc->init_svtor = 0x10200000;
mmc->sram_addr_width = 15;
@@ -629,6 +630,7 @@ static void musca_b1_class_init(ObjectClass *oc, void *data)
MuscaMachineClass *mmc = MUSCA_MACHINE_CLASS(oc);
mc->desc = "ARM Musca-B1 board (dual Cortex-M33)";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mmc->type = MUSCA_B1;
/*
* This matches the DAPlink firmware which boots from QSPI. There
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 48a32c24079..d5ebfabe3f9 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -1342,6 +1342,7 @@ static void musicpal_machine_init(MachineClass *mc)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_size = MP_RAM_DEFAULT_SIZE;
mc->default_ram_id = "musicpal.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c
index df793c77fe1..9ca0ee6a345 100644
--- a/hw/arm/netduino2.c
+++ b/hw/arm/netduino2.c
@@ -63,6 +63,7 @@ static void netduino2_machine_init(MachineClass *mc)
mc->init = netduino2_init;
mc->valid_cpu_types = valid_cpu_types;
mc->ignore_memory_transaction_failures = true;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("netduino2", netduino2_machine_init)
diff --git a/hw/arm/netduinoplus2.c b/hw/arm/netduinoplus2.c
index 81b6334cf72..abe60607658 100644
--- a/hw/arm/netduinoplus2.c
+++ b/hw/arm/netduinoplus2.c
@@ -63,6 +63,7 @@ static void netduinoplus2_machine_init(MachineClass *mc)
mc->desc = "Netduino Plus 2 Machine (Cortex-M4)";
mc->init = netduinoplus2_init;
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("netduinoplus2", netduinoplus2_machine_init)
diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index 7727e0dc4bb..38b8f02364f 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -481,6 +481,7 @@ static void npcm750_evb_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Nuvoton NPCM750 Evaluation Board (Cortex-A9)";
mc->init = npcm750_evb_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 512 * MiB;
};
@@ -493,6 +494,7 @@ static void gsj_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Quanta GSJ (Cortex-A9)";
mc->init = quanta_gsj_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 512 * MiB;
};
@@ -505,6 +507,7 @@ static void gbs_bmc_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Quanta GBS (Cortex-A9)";
mc->init = quanta_gbs_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1 * GiB;
}
@@ -517,6 +520,7 @@ static void kudo_bmc_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Kudo BMC (Cortex-A9)";
mc->init = kudo_bmc_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1 * GiB;
};
@@ -529,6 +533,7 @@ static void mori_bmc_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Mori BMC (Cortex-A9)";
mc->init = mori_bmc_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_size = 1 * GiB;
}
diff --git a/hw/arm/olimex-stm32-h405.c b/hw/arm/olimex-stm32-h405.c
index 1f15620f9fd..01ae12fa4ac 100644
--- a/hw/arm/olimex-stm32-h405.c
+++ b/hw/arm/olimex-stm32-h405.c
@@ -66,6 +66,7 @@ static void olimex_stm32_h405_machine_init(MachineClass *mc)
mc->desc = "Olimex STM32-H405 (Cortex-M4)";
mc->init = olimex_stm32_h405_init;
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
/* SRAM pre-allocated as part of the SoC instantiation */
mc->default_ram_size = 0;
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
index 623ebd66395..8170669db1f 100644
--- a/hw/arm/omap_sx1.c
+++ b/hw/arm/omap_sx1.c
@@ -216,6 +216,7 @@ static void sx1_machine_v2_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("ti925t");
mc->default_ram_size = SDRAM_SIZE;
mc->default_ram_id = "omap1.dram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo sx1_machine_v2_type = {
@@ -234,6 +235,7 @@ static void sx1_machine_v1_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("ti925t");
mc->default_ram_size = SDRAM_SIZE;
mc->default_ram_id = "omap1.dram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo sx1_machine_v1_type = {
diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
index 77e328191d7..76ab214853d 100644
--- a/hw/arm/orangepi.c
+++ b/hw/arm/orangepi.c
@@ -121,6 +121,7 @@ static void orangepi_machine_init(MachineClass *mc)
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "orangepi.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("orangepi-pc", orangepi_machine_init)
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index a7a662f40db..176c324cf82 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -342,6 +342,7 @@ static void raspi0_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
rmc->board_rev = 0x920092; /* Revision 1.2 */
raspi_machine_class_init(mc, rmc->board_rev);
};
@@ -351,6 +352,7 @@ static void raspi1ap_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
rmc->board_rev = 0x900021; /* Revision 1.1 */
raspi_machine_class_init(mc, rmc->board_rev);
};
@@ -360,6 +362,7 @@ static void raspi2b_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
rmc->board_rev = 0xa21041;
raspi_machine_class_init(mc, rmc->board_rev);
};
@@ -370,6 +373,7 @@ static void raspi3ap_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
rmc->board_rev = 0x9020e0; /* Revision 1.0 */
raspi_machine_class_init(mc, rmc->board_rev);
};
@@ -379,6 +383,7 @@ static void raspi3b_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
rmc->board_rev = 0xa02082;
raspi_machine_class_init(mc, rmc->board_rev);
};
diff --git a/hw/arm/raspi4b.c b/hw/arm/raspi4b.c
index 1264e0d6eed..37eef378888 100644
--- a/hw/arm/raspi4b.c
+++ b/hw/arm/raspi4b.c
@@ -118,6 +118,7 @@ static void raspi4b_machine_class_init(ObjectClass *oc, void *data)
rmc->board_rev = 0xb03115; /* Revision 1.5, 2 Gb RAM */
#endif
raspi_machine_class_common_init(mc, rmc->board_rev);
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->init = raspi4b_machine_init;
}
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index 9900a98f3b8..4bc8f3956f3 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -415,6 +415,7 @@ static void realview_eb_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
@@ -435,6 +436,7 @@ static void realview_eb_mpcore_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm11mpcore");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
@@ -453,6 +455,7 @@ static void realview_pb_a8_class_init(ObjectClass *oc, void *data)
mc->init = realview_pb_a8_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a8");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
@@ -472,6 +475,7 @@ static void realview_pbx_a9_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
diff --git a/hw/arm/sabrelite.c b/hw/arm/sabrelite.c
index 1eb47042eca..8d57653ab34 100644
--- a/hw/arm/sabrelite.c
+++ b/hw/arm/sabrelite.c
@@ -110,6 +110,7 @@ static void sabrelite_machine_init(MachineClass *mc)
mc->max_cpus = FSL_IMX6_NUM_CPUS;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "sabrelite.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("sabrelite", sabrelite_machine_init)
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index e720de30641..41dba85f44c 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -900,6 +900,7 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
mc->minimum_page_bits = 12;
mc->block_default_type = IF_IDE;
mc->no_cdrom = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_nic = "e1000e";
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "sbsa-ref.ram";
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index 47c1cfa0485..ef3fd508ba1 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -1421,6 +1421,7 @@ static void lm3s811evb_class_init(ObjectClass *oc, void *data)
mc->init = lm3s811evb_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo lm3s811evb_type = {
@@ -1441,6 +1442,7 @@ static void lm3s6965evb_class_init(ObjectClass *oc, void *data)
mc->init = lm3s6965evb_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo lm3s6965evb_type = {
diff --git a/hw/arm/stm32vldiscovery.c b/hw/arm/stm32vldiscovery.c
index e6c1f5b8d7d..01b4afcb1a0 100644
--- a/hw/arm/stm32vldiscovery.c
+++ b/hw/arm/stm32vldiscovery.c
@@ -66,6 +66,7 @@ static void stm32vldiscovery_machine_init(MachineClass *mc)
mc->desc = "ST STM32VLDISCOVERY (Cortex-M3)";
mc->init = stm32vldiscovery_init;
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("stm32vldiscovery", stm32vldiscovery_machine_init)
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index bc4522989ec..def3da4a344 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -419,6 +419,7 @@ static void versatilepb_class_init(ObjectClass *oc, void *data)
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_id = "versatile.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
@@ -439,6 +440,7 @@ static void versatileab_class_init(ObjectClass *oc, void *data)
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_id = "versatile.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index b886d16c023..06ec78e6eb8 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -803,6 +803,7 @@ static void vexpress_a9_class_init(ObjectClass *oc, void *data)
mc->desc = "ARM Versatile Express for Cortex-A9";
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
vmc->daughterboard = &a9_daughterboard;
}
@@ -818,6 +819,7 @@ static void vexpress_a15_class_init(ObjectClass *oc, void *data)
mc->desc = "ARM Versatile Express for Cortex-A15";
mc->valid_cpu_types = valid_cpu_types;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
vmc->daughterboard = &a15_daughterboard;
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 3448200e3bf..cb2a626d2d2 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3125,6 +3125,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
#endif
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->pci_allow_0_address = true;
/* We know we will never create a pre-ARMv7 CPU which needs 1K pages */
mc->minimum_page_bits = 12;
diff --git a/hw/arm/xen-pvh.c b/hw/arm/xen-pvh.c
index d1509bd235d..e49ab0e7f57 100644
--- a/hw/arm/xen-pvh.c
+++ b/hw/arm/xen-pvh.c
@@ -75,6 +75,7 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
* mc->max_cpus, QEMU will bail out with an error message.
*/
mc->max_cpus = GUEST_MAX_VCPUS;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
/* Xen/ARM does not use buffered IOREQs. */
xpc->handle_bufioreq = HVM_IOREQSRV_BUFIOREQ_OFF;
diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
index 1401d37959e..8a1cdb037ca 100644
--- a/hw/arm/xlnx-versal-virt.c
+++ b/hw/arm/xlnx-versal-virt.c
@@ -818,6 +818,7 @@ static void versal_virt_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = XLNX_VERSAL_NR_ACPUS + XLNX_VERSAL_NR_RCPUS;
mc->default_cpus = XLNX_VERSAL_NR_ACPUS + XLNX_VERSAL_NR_RCPUS;
mc->no_cdrom = true;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_id = "ddr";
object_class_property_add_str(oc, "ospi-flash", versal_get_ospi_model,
versal_set_ospi_model);
diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
index 70fb444bbd9..311d8f1cad4 100644
--- a/hw/arm/xlnx-zcu102.c
+++ b/hw/arm/xlnx-zcu102.c
@@ -280,6 +280,7 @@ static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = XLNX_ZYNQMP_NUM_APU_CPUS + XLNX_ZYNQMP_NUM_RPU_CPUS;
mc->default_cpus = XLNX_ZYNQMP_NUM_APU_CPUS;
mc->default_ram_id = "ddr-ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
object_class_property_add_bool(oc, "secure", zcu102_get_secure,
diff --git a/hw/avr/arduino.c b/hw/avr/arduino.c
index 48ef478346e..1801074a421 100644
--- a/hw/avr/arduino.c
+++ b/hw/avr/arduino.c
@@ -67,6 +67,7 @@ static void arduino_machine_class_init(ObjectClass *oc, void *data)
mc->no_floppy = 1;
mc->no_cdrom = 1;
mc->no_parallel = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static void arduino_duemilanove_class_init(ObjectClass *oc, void *data)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index c5f247633eb..363ca89ca1c 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -704,6 +704,7 @@ static void HP_B160L_machine_init_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_ram_id = "ram";
mc->default_nic = "tulip";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
nc->nmi_monitor_handler = hppa_nmi;
}
@@ -740,6 +741,7 @@ static void HP_C3700_machine_init_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_ram_id = "ram";
mc->default_nic = "tulip";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
nc->nmi_monitor_handler = hppa_nmi;
}
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 0eb52d315bb..b01de3a1737 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1799,6 +1799,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
mc->smp_props.dies_supported = true;
mc->smp_props.modules_supported = true;
mc->default_ram_id = "pc.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_AUTO;
object_class_property_add(oc, PC_MACHINE_MAX_RAM_BELOW_4G, "size",
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index 69bfc00b9a5..e3b92fcb744 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -382,6 +382,7 @@ static void x86_machine_class_init(ObjectClass *oc, void *data)
mc->get_default_cpu_node_id = x86_get_default_cpu_node_id;
mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids;
mc->kvm_type = x86_kvm_type;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
x86mc->save_tsc_khz = true;
x86mc->fwcfg_dma_enabled = true;
nc->nmi_monitor_handler = x86_nmi;
diff --git a/hw/i386/xen/xen-pvh.c b/hw/i386/xen/xen-pvh.c
index 33c10279763..33e5882c2d3 100644
--- a/hw/i386/xen/xen-pvh.c
+++ b/hw/i386/xen/xen-pvh.c
@@ -82,6 +82,7 @@ static void xen_pvh_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Xen PVH x86 machine";
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
/* mc->max_cpus holds the MAX value allowed in the -smp cmd-line opts. */
mc->max_cpus = HVM_MAX_VCPUS;
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 63fa0f4e32a..d850c87bbc8 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -1471,6 +1471,7 @@ static void virt_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_VIRTIO;
mc->default_boot_order = "c";
mc->no_cdrom = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->possible_cpu_arch_ids = virt_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = virt_cpu_index_to_props;
mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index d97399b882b..286c3bac2ad 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -99,6 +99,7 @@ static void an5206_machine_init(MachineClass *mc)
mc->init = an5206_init;
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5206");
mc->default_ram_id = "an5206.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("an5206", an5206_machine_init)
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index 75cc076f787..a0c90d111e6 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -398,6 +398,7 @@ static void mcf5208evb_machine_init(MachineClass *mc)
mc->is_default = true;
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5208");
mc->default_ram_id = "mcf5208.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("mcf5208evb", mcf5208evb_machine_init)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 0570e4a76f1..06a4d825e71 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -1359,6 +1359,7 @@ static void next_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_id = "next.ram";
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m68040");
mc->no_cdrom = true;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo next_typeinfo = {
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index aeed4c8ddb8..21fa56e7a9c 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -743,6 +743,7 @@ static void q800_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 1;
mc->block_default_type = IF_SCSI;
mc->default_ram_id = "m68k_mac.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
compat_props_add(mc->compat_props, hw_compat_q800, hw_compat_q800_len);
diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c
index d967bdd7438..a1bd9c432d2 100644
--- a/hw/m68k/virt.c
+++ b/hw/m68k/virt.c
@@ -318,6 +318,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 1;
mc->no_floppy = 1;
mc->no_parallel = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_ram_id = "m68k_virt.ram";
}
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index a795c6385b4..a21112f17c5 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -223,6 +223,7 @@ static void petalogix_ml605_machine_init(MachineClass *mc)
mc->desc = "PetaLogix linux refdesign for xilinx ml605 (little endian)";
#endif
mc->init = petalogix_ml605_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("petalogix-ml605", petalogix_ml605_machine_init)
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index 96aed4ed1a3..d68307f562e 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -146,6 +146,7 @@ static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800";
mc->init = petalogix_s3adsp1800_init;
mc->is_default = true;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo petalogix_s3adsp1800_machine_types[] = {
diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c
index bdbf7328bf4..14386785f85 100644
--- a/hw/microblaze/xlnx-zynqmp-pmu.c
+++ b/hw/microblaze/xlnx-zynqmp-pmu.c
@@ -188,6 +188,7 @@ static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc)
mc->desc = "Xilinx ZynqMP PMU machine (little endian)";
#endif
mc->init = xlnx_zynqmp_pmu_init;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("xlnx-zynqmp-pmu", xlnx_zynqmp_pmu_machine_init)
diff --git a/hw/mips/boston.c b/hw/mips/boston.c
index 364c328032a..bd9059a2070 100644
--- a/hw/mips/boston.c
+++ b/hw/mips/boston.c
@@ -842,6 +842,7 @@ static void boston_mach_class_init(MachineClass *mc)
mc->default_ram_id = "boston.ddr";
mc->max_cpus = 16;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("I6400");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("boston", boston_mach_class_init)
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 646044e2749..83e95c3b20e 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -335,6 +335,7 @@ static void mips_fuloong2e_machine_init(MachineClass *mc)
mc->default_ram_size = 256 * MiB;
mc->default_ram_id = "fuloong2e.ram";
mc->minimum_page_bits = 14;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index c89610639a9..326f60c448b 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -424,6 +424,7 @@ static void mips_magnum_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
mc->default_ram_id = "mips_jazz.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo mips_magnum_type = {
@@ -441,6 +442,7 @@ static void mips_pica61_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
mc->default_ram_id = "mips_jazz.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo mips_pica61_type = {
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index 831fddb1bd7..f44932b331e 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -679,6 +679,7 @@ static void loongson3v_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 1600 * MiB;
mc->minimum_page_bits = 14;
mc->default_nic = "virtio-net-pci";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo loongson3_machine_types[] = {
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 8e9cea70b13..13811f89f91 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1306,6 +1306,7 @@ static void mips_malta_machine_init(MachineClass *mc)
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
#endif
mc->default_ram_id = "mips_malta.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
compat_props_add(mc->compat_props, malta_compat, malta_compat_len);
}
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c
index c530688e769..f0d06ab549c 100644
--- a/hw/mips/mipssim.c
+++ b/hw/mips/mipssim.c
@@ -247,6 +247,7 @@ static void mips_mipssim_machine_init(MachineClass *mc)
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
#endif
mc->default_ram_id = "mips_mipssim.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("mipssim", mips_mipssim_machine_init)
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index e0da4067ba3..b9d71ea0c3b 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -368,6 +368,7 @@ static void openrisc_sim_machine_init(ObjectClass *oc, void *data)
mc->max_cpus = OR1KSIM_CPUS_MAX;
mc->is_default = true;
mc->default_cpu_type = OPENRISC_CPU_TYPE_NAME("or1200");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo or1ksim_machine_typeinfo = {
diff --git a/hw/openrisc/virt.c b/hw/openrisc/virt.c
index 7b60bf85094..d250e2ab21f 100644
--- a/hw/openrisc/virt.c
+++ b/hw/openrisc/virt.c
@@ -554,6 +554,7 @@ static void openrisc_virt_machine_init(ObjectClass *oc, void *data)
mc->max_cpus = VIRT_CPUS_MAX;
mc->is_default = false;
mc->default_cpu_type = OPENRISC_CPU_TYPE_NAME("or1200");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo or1ksim_machine_typeinfo = {
diff --git a/hw/ppc/amigaone.c b/hw/ppc/amigaone.c
index b02792221cc..39449e3632d 100644
--- a/hw/ppc/amigaone.c
+++ b/hw/ppc/amigaone.c
@@ -173,6 +173,7 @@ static void amigaone_machine_init(MachineClass *mc)
mc->default_display = "std";
mc->default_ram_id = "ram";
mc->default_ram_size = 512 * MiB;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("amigaone", amigaone_machine_init)
diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c
index 70a80333733..0b91d422aa1 100644
--- a/hw/ppc/e500plat.c
+++ b/hw/ppc/e500plat.c
@@ -100,6 +100,7 @@ static void e500plat_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30");
mc->default_ram_id = "mpc8544ds.ram";
mc->default_nic = "virtio-net-pci";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_ETSEC_COMMON);
}
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index cb3dc3ab482..da53eb11ed9 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -580,6 +580,7 @@ static void core99_machine_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_display = "std";
mc->default_nic = "sungem";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->kvm_type = core99_kvm_type;
#ifdef TARGET_PPC64
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("970fx_v3.1");
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 0dbcea035c3..b23bfff696e 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -427,6 +427,7 @@ static void heathrow_class_init(ObjectClass *oc, void *data)
mc->default_nic = "ne2k_pci";
mc->ignore_boot_device_suffixes = true;
mc->default_ram_id = "ppc_heathrow.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
fwc->get_dev_path = heathrow_fw_dev_path;
}
diff --git a/hw/ppc/mpc8544ds.c b/hw/ppc/mpc8544ds.c
index d74af766eed..0fa3a1b7767 100644
--- a/hw/ppc/mpc8544ds.c
+++ b/hw/ppc/mpc8544ds.c
@@ -62,6 +62,7 @@ static void mpc8544ds_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30");
mc->default_ram_id = "mpc8544ds.ram";
mc->default_nic = "virtio-net-pci";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
#define TYPE_MPC8544DS_MACHINE MACHINE_TYPE_NAME("mpc8544ds")
diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c
index b057672e829..03ddbb96b66 100644
--- a/hw/ppc/pegasos2.c
+++ b/hw/ppc/pegasos2.c
@@ -604,6 +604,7 @@ static void pegasos2_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("7457_v1.2");
mc->default_ram_id = "pegasos2.ram";
mc->default_ram_size = 512 * MiB;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
vhc->cpu_in_nested = pegasos2_cpu_in_nested;
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 11fd477b71b..70203449fda 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -2878,6 +2878,7 @@ static void pnv_machine_class_init(ObjectClass *oc, void *data)
/* Pnv provides a AHCI device for storage */
mc->block_default_type = IF_IDE;
mc->no_parallel = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_boot_order = NULL;
/*
* RAM defaults to less than 2048 for 32-bit hosts, and large
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 969cac345ac..c602d608176 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -351,6 +351,7 @@ static void ppc405_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 128 * MiB;
mc->default_ram_id = "ppc405.ram";
mc->deprecation_reason = "machine is old and unmaintained";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo ppc405_machine_type = {
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
index 099fda39092..5b2d52032f7 100644
--- a/hw/ppc/ppc440_bamboo.c
+++ b/hw/ppc/ppc440_bamboo.c
@@ -268,6 +268,7 @@ static void bamboo_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440epb");
mc->default_ram_id = "ppc4xx.sdram";
mc->default_nic = "e1000";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("bamboo", bamboo_machine_init)
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 3e68d8e6e20..998e8ecd426 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -428,6 +428,7 @@ static void ibm_40p_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("604");
mc->default_display = "std";
mc->default_nic = "pcnet";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
machine_add_audiodev_property(mc);
}
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 3ecae6a9504..a1b1fc8724a 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -524,6 +524,7 @@ static void sam460ex_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("460exb");
mc->default_ram_size = 512 * MiB;
mc->default_ram_id = "ppc4xx.sdram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("sam460ex", sam460ex_machine_init)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index f3a4b4235d4..fa030d52767 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4594,6 +4594,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = SPAPR_IRQ_NR_IPIS;
mc->no_parallel = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->default_boot_order = "";
mc->default_ram_size = 512 * MiB;
mc->default_ram_id = "ppc_spapr.ram";
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index f87c221d076..157aaf9449f 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -289,6 +289,7 @@ static void virtex_machine_init(MachineClass *mc)
mc->init = virtex_init;
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440-xilinx");
mc->default_ram_id = "ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("virtex-ml507", virtex_machine_init)
diff --git a/hw/remote/machine.c b/hw/remote/machine.c
index fdc6c441bbd..1f7b0b96dd4 100644
--- a/hw/remote/machine.c
+++ b/hw/remote/machine.c
@@ -128,6 +128,7 @@ static void remote_machine_class_init(ObjectClass *oc, void *data)
mc->init = remote_machine_init;
mc->desc = "Experimental remote machine";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
hc->unplug = remote_machine_dev_unplug_cb;
diff --git a/hw/riscv/microchip_pfsoc.c b/hw/riscv/microchip_pfsoc.c
index ec7e2e42264..2417342a717 100644
--- a/hw/riscv/microchip_pfsoc.c
+++ b/hw/riscv/microchip_pfsoc.c
@@ -650,6 +650,7 @@ static void microchip_icicle_kit_machine_class_init(ObjectClass *oc, void *data)
mc->min_cpus = MICROCHIP_PFSOC_MANAGEMENT_CPU_COUNT + 1;
mc->default_cpus = mc->min_cpus;
mc->default_ram_id = "microchip.icicle.kit.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
/*
* Map 513 MiB high memory, the minimum required high memory size, because
diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
index b9e56235d87..3b26e1f53bc 100644
--- a/hw/riscv/opentitan.c
+++ b/hw/riscv/opentitan.c
@@ -121,6 +121,7 @@ static void opentitan_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_IBEX;
mc->default_ram_id = "riscv.lowrisc.ibex.ram";
mc->default_ram_size = ibex_memmap[IBEX_DEV_RAM].size;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static void lowrisc_ibex_soc_init(Object *obj)
diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
index e2242b97d0c..2f59c86bf0c 100644
--- a/hw/riscv/shakti_c.c
+++ b/hw/riscv/shakti_c.c
@@ -84,6 +84,7 @@ static void shakti_c_machine_class_init(ObjectClass *klass, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_SHAKTI_C;
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_id = "riscv.shakti.c.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo shakti_c_machine_type_info = {
diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
index 73d3b74281c..56a2ca7cabb 100644
--- a/hw/riscv/sifive_e.c
+++ b/hw/riscv/sifive_e.c
@@ -153,6 +153,7 @@ static void sifive_e_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = SIFIVE_E_CPU;
mc->default_ram_id = "riscv.sifive.e.ram";
mc->default_ram_size = sifive_e_memmap[SIFIVE_E_DEV_DTIM].size;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
object_class_property_add_bool(oc, "revb", sifive_e_machine_get_revb,
sifive_e_machine_set_revb);
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index 9a20bcbf7fb..fd57d02dca8 100644
--- a/hw/riscv/sifive_u.c
+++ b/hw/riscv/sifive_u.c
@@ -724,6 +724,7 @@ static void sifive_u_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = SIFIVE_U_CPU;
mc->default_cpus = mc->min_cpus;
mc->default_ram_id = "riscv.sifive.u.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
object_class_property_add_bool(oc, "start-in-flash",
sifive_u_machine_get_start_in_flash,
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index 74a20016f14..a0fa727f6bf 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -358,6 +358,7 @@ static void spike_machine_class_init(ObjectClass *oc, void *data)
/* platform instead of architectural choice */
mc->cpu_cluster_has_numa_boundary = true;
mc->default_ram_id = "riscv.spike.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
object_class_property_add_str(oc, "signature", NULL, spike_set_signature);
object_class_property_set_description(oc, "signature",
"File to write ACT test signature");
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 241389d72f8..d9fc7cdf9ac 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1918,6 +1918,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_BASE;
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
mc->pci_allow_0_address = true;
mc->possible_cpu_arch_ids = riscv_numa_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props;
diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index 88c8f12c101..9c3ae60bf80 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -166,6 +166,7 @@ static void rx_gdbsim_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RX62N_CPU;
mc->default_ram_size = 16 * MiB;
mc->default_ram_id = "ext-sdram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static void rx62n7_class_init(ObjectClass *oc, void *data)
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index d68c94e82ef..6ef552ae536 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -383,6 +383,7 @@ static void r2d_machine_init(MachineClass *mc)
mc->block_default_type = IF_IDE;
mc->default_cpu_type = TYPE_SH7751R_CPU;
mc->default_nic = "rtl8139";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("r2d", r2d_machine_init)
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index 0aeaad3becc..e99d6d71e8f 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -440,6 +440,7 @@ static void leon3_generic_machine_init(MachineClass *mc)
mc->default_cpu_type = SPARC_CPU_TYPE_NAME("LEON3");
mc->default_ram_id = "leon3.ram";
mc->max_cpus = MAX_CPUS;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("leon3_generic", leon3_generic_machine_init)
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index a48d3622c5a..19a2a9f2ff6 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -1113,6 +1113,7 @@ static void sun4m_machine_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "c";
mc->default_display = "tcx";
mc->default_ram_id = "sun4m.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static void ss5_class_init(ObjectClass *oc, void *data)
diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index 805ba6b1e3d..409c67b1b4e 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -167,6 +167,7 @@ static void niagara_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "c";
mc->default_cpu_type = SPARC_CPU_TYPE_NAME("Sun-UltraSparc-T1");
mc->default_ram_id = "sun4v-partition.ram";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo niagara_type = {
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 8ab5cf0461f..eaf3d42bd0a 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -809,6 +809,7 @@ static void sun4u_class_init(ObjectClass *oc, void *data)
mc->default_display = "std";
mc->default_nic = "sunhme";
mc->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
fwc->get_dev_path = sun4u_fw_dev_path;
compat_props_add(mc->compat_props, hw_compat_sparc64, hw_compat_sparc64_len);
}
@@ -836,6 +837,7 @@ static void sun4v_class_init(ObjectClass *oc, void *data)
mc->default_display = "std";
mc->default_nic = "sunhme";
mc->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo sun4v_type = {
diff --git a/hw/tricore/triboard.c b/hw/tricore/triboard.c
index f5baa8ccbb3..3cd93daf6a6 100644
--- a/hw/tricore/triboard.c
+++ b/hw/tricore/triboard.c
@@ -73,6 +73,7 @@ static void triboard_machine_tc277d_class_init(ObjectClass *oc,
mc->init = triboard_machine_init;
mc->desc = "Infineon AURIX TriBoard TC277 (D-Step)";
mc->max_cpus = 1;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
amc->soc_name = "tc277d-soc";
};
diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c
index 3facfdfd611..29718051702 100644
--- a/hw/tricore/tricore_testboard.c
+++ b/hw/tricore/tricore_testboard.c
@@ -111,6 +111,7 @@ static void ttb_machine_init(MachineClass *mc)
mc->desc = "a minimal TriCore board";
mc->init = tricoreboard_init;
mc->default_cpu_type = TRICORE_CPU_TYPE_NAME("tc1796");
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("tricore_testboard", ttb_machine_init)
diff --git a/hw/xen/xen-pvh-common.c b/hw/xen/xen-pvh-common.c
index 9c21fa858d3..ed42e4b624c 100644
--- a/hw/xen/xen-pvh-common.c
+++ b/hw/xen/xen-pvh-common.c
@@ -381,6 +381,7 @@ static void xen_pvh_class_init(ObjectClass *oc, void *data)
mc->default_machine_opts = "accel=xen";
/* Set to zero to make sure that the real ram size is passed. */
mc->default_ram_size = 0;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo xen_pvh_info = {
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index 99c02492ef9..a05713e5daa 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -67,6 +67,7 @@ static void xenpv_machine_init(MachineClass *mc)
mc->init = xen_init_pv;
mc->max_cpus = 1;
mc->default_machine_opts = "accel=xen";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("xenpv", xenpv_machine_init)
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index 1cea29c66d4..6c86d4939f4 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -125,6 +125,7 @@ static void xtensa_sim_machine_init(MachineClass *mc)
mc->max_cpus = 4;
mc->no_serial = 1;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("sim", xtensa_sim_machine_init)
diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c
index b08404fc17c..ffa6f210637 100644
--- a/hw/xtensa/virt.c
+++ b/hw/xtensa/virt.c
@@ -122,6 +122,7 @@ static void xtensa_virt_machine_init(MachineClass *mc)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_nic = "virtio-net-pci";
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
DEFINE_MACHINE("virt", xtensa_virt_machine_init)
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 3f3677f1c9a..2b5f20acefc 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -594,6 +594,7 @@ static void xtfpga_lx60_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 64 * MiB;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo xtfpga_lx60_type = {
@@ -611,6 +612,7 @@ static void xtfpga_lx60_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 64 * MiB;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo xtfpga_lx60_nommu_type = {
@@ -628,6 +630,7 @@ static void xtfpga_lx200_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 96 * MiB;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo xtfpga_lx200_type = {
@@ -645,6 +648,7 @@ static void xtfpga_lx200_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 96 * MiB;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo xtfpga_lx200_nommu_type = {
@@ -662,6 +666,7 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 512 * MiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo xtfpga_ml605_type = {
@@ -679,6 +684,7 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 256 * MiB;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo xtfpga_ml605_nommu_type = {
@@ -696,6 +702,7 @@ static void xtfpga_kc705_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 1 * GiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo xtfpga_kc705_type = {
@@ -713,6 +720,7 @@ static void xtfpga_kc705_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 256 * MiB;
+ mc->no_sdcard = ON_OFF_AUTO_OFF;
}
static const TypeInfo xtfpga_kc705_nommu_type = {
diff --git a/system/vl.c b/system/vl.c
index a845f692af1..a89f905f835 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -1346,6 +1346,7 @@ static void qemu_disable_default_devices(void)
if (!has_defaults || machine_class->no_cdrom) {
default_cdrom = 0;
}
+ assert(machine_class->no_sdcard != ON_OFF_AUTO_AUTO);
if (!has_defaults || machine_class->no_sdcard == ON_OFF_AUTO_ON) {
default_sdcard = 0;
}
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 22/32] hw/boards: Rename no_sdcard -> auto_create_sdcard
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (20 preceding siblings ...)
2025-02-10 20:41 ` [PULL 21/32] hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 23/32] hw/boards: Do not create unusable default if=sd drives Philippe Mathieu-Daudé
` (10 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth
Invert the 'no_sdcard' logic, renaming it as the more explicit
"auto_create_sdcard". Machines are supposed to create a SD Card
drive when this flag is set. In many cases it doesn't make much
sense (as boards don't expose SD Card host controller), but this
is patch only aims to expose that nonsense; so no logical change
intended (mechanical patch using gsed).
Most of the changes are:
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
Except in
. hw/core/null-machine.c
. hw/arm/xilinx_zynq.c
. hw/s390x/s390-virtio-ccw.c
where the disabled option is manually removed (since default):
- mc->no_sdcard = ON_OFF_AUTO_ON;
+ mc->auto_create_sdcard = false;
- mc->auto_create_sdcard = false;
and in system/vl.c we change the 'default_sdcard' type to boolean.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250204200934.65279-4-philmd@linaro.org>
---
include/hw/boards.h | 2 +-
hw/alpha/dp264.c | 2 +-
hw/arm/aspeed.c | 42 ++++++++++++------------
hw/arm/b-l475e-iot01a.c | 2 +-
hw/arm/bananapi_m2u.c | 2 +-
hw/arm/collie.c | 2 +-
hw/arm/cubieboard.c | 2 +-
hw/arm/digic_boards.c | 2 +-
hw/arm/exynos4_boards.c | 4 +--
hw/arm/fby35.c | 2 +-
hw/arm/highbank.c | 4 +--
hw/arm/imx25_pdk.c | 2 +-
hw/arm/integratorcp.c | 2 +-
hw/arm/kzm.c | 2 +-
hw/arm/mcimx6ul-evk.c | 2 +-
hw/arm/mcimx7d-sabre.c | 2 +-
hw/arm/microbit.c | 2 +-
hw/arm/mps2-tz.c | 8 ++---
hw/arm/mps2.c | 8 ++---
hw/arm/mps3r.c | 2 +-
hw/arm/msf2-som.c | 2 +-
hw/arm/musca.c | 4 +--
hw/arm/musicpal.c | 2 +-
hw/arm/netduino2.c | 2 +-
hw/arm/netduinoplus2.c | 2 +-
hw/arm/npcm7xx_boards.c | 10 +++---
hw/arm/olimex-stm32-h405.c | 2 +-
hw/arm/omap_sx1.c | 4 +--
hw/arm/orangepi.c | 2 +-
hw/arm/raspi.c | 10 +++---
hw/arm/raspi4b.c | 2 +-
hw/arm/realview.c | 8 ++---
hw/arm/sabrelite.c | 2 +-
hw/arm/sbsa-ref.c | 2 +-
hw/arm/stellaris.c | 4 +--
hw/arm/stm32vldiscovery.c | 2 +-
hw/arm/versatilepb.c | 4 +--
hw/arm/vexpress.c | 4 +--
hw/arm/virt.c | 2 +-
hw/arm/xen-pvh.c | 2 +-
hw/arm/xilinx_zynq.c | 1 -
hw/arm/xlnx-versal-virt.c | 2 +-
hw/arm/xlnx-zcu102.c | 2 +-
hw/avr/arduino.c | 2 +-
hw/core/null-machine.c | 1 -
hw/hppa/machine.c | 4 +--
hw/i386/pc.c | 2 +-
hw/i386/x86.c | 2 +-
hw/i386/xen/xen-pvh.c | 2 +-
hw/loongarch/virt.c | 2 +-
hw/m68k/an5206.c | 2 +-
hw/m68k/mcf5208.c | 2 +-
hw/m68k/next-cube.c | 2 +-
hw/m68k/q800.c | 2 +-
hw/m68k/virt.c | 2 +-
hw/microblaze/petalogix_ml605_mmu.c | 2 +-
hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +-
hw/microblaze/xlnx-zynqmp-pmu.c | 2 +-
hw/mips/boston.c | 2 +-
hw/mips/fuloong2e.c | 2 +-
hw/mips/jazz.c | 4 +--
hw/mips/loongson3_virt.c | 2 +-
hw/mips/malta.c | 2 +-
hw/mips/mipssim.c | 2 +-
hw/openrisc/openrisc_sim.c | 2 +-
hw/openrisc/virt.c | 2 +-
hw/ppc/amigaone.c | 2 +-
hw/ppc/e500plat.c | 2 +-
hw/ppc/mac_newworld.c | 2 +-
hw/ppc/mac_oldworld.c | 2 +-
hw/ppc/mpc8544ds.c | 2 +-
hw/ppc/pegasos2.c | 2 +-
hw/ppc/pnv.c | 2 +-
hw/ppc/ppc405_boards.c | 2 +-
hw/ppc/ppc440_bamboo.c | 2 +-
hw/ppc/prep.c | 2 +-
hw/ppc/sam460ex.c | 2 +-
hw/ppc/spapr.c | 2 +-
hw/ppc/virtex_ml507.c | 2 +-
hw/remote/machine.c | 2 +-
hw/riscv/microchip_pfsoc.c | 2 +-
hw/riscv/opentitan.c | 2 +-
hw/riscv/shakti_c.c | 2 +-
hw/riscv/sifive_e.c | 2 +-
hw/riscv/sifive_u.c | 2 +-
hw/riscv/spike.c | 2 +-
hw/riscv/virt.c | 2 +-
hw/rx/rx-gdbsim.c | 2 +-
hw/s390x/s390-virtio-ccw.c | 1 -
hw/sh4/r2d.c | 2 +-
hw/sparc/leon3.c | 2 +-
hw/sparc/sun4m.c | 2 +-
hw/sparc64/niagara.c | 2 +-
hw/sparc64/sun4u.c | 4 +--
hw/tricore/triboard.c | 2 +-
hw/tricore/tricore_testboard.c | 2 +-
hw/xen/xen-pvh-common.c | 2 +-
hw/xenpv/xen_machine_pv.c | 2 +-
hw/xtensa/sim.c | 2 +-
hw/xtensa/virt.c | 2 +-
hw/xtensa/xtfpga.c | 16 ++++-----
system/vl.c | 9 +++--
102 files changed, 156 insertions(+), 160 deletions(-)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index d61b0a47780..9360d1ce394 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -285,7 +285,7 @@ struct MachineClass {
no_cdrom:1,
pci_allow_0_address:1,
legacy_fw_cfg_order:1;
- OnOffAuto no_sdcard;
+ bool auto_create_sdcard;
bool is_default;
const char *default_machine_opts;
const char *default_boot_order;
diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
index b11e527be93..14b942fd5a7 100644
--- a/hw/alpha/dp264.c
+++ b/hw/alpha/dp264.c
@@ -213,7 +213,7 @@ static void clipper_machine_init(MachineClass *mc)
mc->default_cpu_type = ALPHA_CPU_TYPE_NAME("ev67");
mc->default_ram_id = "ram";
mc->default_nic = "e1000";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("clipper", clipper_machine_init)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 9d9c55adcdc..f3ba90896c0 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -1253,7 +1253,7 @@ static void aspeed_machine_palmetto_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635f";
amc->num_cs = 1;
amc->i2c_init = palmetto_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 256 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1270,7 +1270,7 @@ static void aspeed_machine_quanta_q71l_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635e";
amc->num_cs = 1;
amc->i2c_init = quanta_q71l_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 128 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1289,7 +1289,7 @@ static void aspeed_machine_supermicrox11_bmc_class_init(ObjectClass *oc,
amc->num_cs = 1;
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
amc->i2c_init = palmetto_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 256 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1308,7 +1308,7 @@ static void aspeed_machine_supermicro_x11spi_bmc_class_init(ObjectClass *oc,
amc->num_cs = 1;
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
amc->i2c_init = palmetto_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1325,7 +1325,7 @@ static void aspeed_machine_ast2500_evb_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635f";
amc->num_cs = 1;
amc->i2c_init = ast2500_evb_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1343,7 +1343,7 @@ static void aspeed_machine_yosemitev2_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635e";
amc->num_cs = 2;
amc->i2c_init = yosemitev2_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1360,7 +1360,7 @@ static void aspeed_machine_romulus_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx66l1g45g";
amc->num_cs = 2;
amc->i2c_init = romulus_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1378,7 +1378,7 @@ static void aspeed_machine_tiogapass_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635e";
amc->num_cs = 2;
amc->i2c_init = tiogapass_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1395,7 +1395,7 @@ static void aspeed_machine_sonorapass_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx66l1g45g";
amc->num_cs = 2;
amc->i2c_init = sonorapass_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1412,7 +1412,7 @@ static void aspeed_machine_witherspoon_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx66l1g45g";
amc->num_cs = 2;
amc->i2c_init = witherspoon_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1433,7 +1433,7 @@ static void aspeed_machine_ast2600_evb_class_init(ObjectClass *oc, void *data)
ASPEED_MAC3_ON;
amc->sdhci_wp_inverted = true;
amc->i2c_init = ast2600_evb_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
aspeed_machine_ast2600_class_emmc_init(oc);
@@ -1452,7 +1452,7 @@ static void aspeed_machine_g220a_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
amc->i2c_init = g220a_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1024 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1470,7 +1470,7 @@ static void aspeed_machine_fp5280g2_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
amc->i2c_init = fp5280g2_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 512 * MiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1489,7 +1489,7 @@ static void aspeed_machine_rainier_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC2_ON | ASPEED_MAC3_ON;
amc->i2c_init = rainier_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
aspeed_machine_ast2600_class_emmc_init(oc);
@@ -1512,7 +1512,7 @@ static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
amc->macs_mask = ASPEED_MAC3_ON;
amc->i2c_init = fuji_bmc_i2c_init;
amc->uart_default = ASPEED_DEV_UART1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = FUJI_BMC_RAM_SIZE;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1533,7 +1533,7 @@ static void aspeed_machine_bletchley_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC2_ON;
amc->i2c_init = bletchley_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = BLETCHLEY_BMC_RAM_SIZE;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1575,7 +1575,7 @@ static void aspeed_machine_fby35_class_init(ObjectClass *oc, void *data)
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC3_ON;
amc->i2c_init = fby35_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
/* FIXME: Replace this macro with something more general */
mc->default_ram_size = FUJI_BMC_RAM_SIZE;
aspeed_machine_class_init_cpus_defaults(mc);
@@ -1658,7 +1658,7 @@ static void aspeed_minibmc_machine_ast1030_evb_class_init(ObjectClass *oc,
amc->spi_model = "w25q256";
amc->num_cs = 2;
amc->macs_mask = 0;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1687,7 +1687,7 @@ static void aspeed_machine_ast2700_evb_class_init(ObjectClass *oc, void *data)
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON | ASPEED_MAC2_ON;
amc->uart_default = ASPEED_DEV_UART12;
amc->i2c_init = ast2700_evb_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
}
@@ -1708,7 +1708,7 @@ static void aspeed_machine_qcom_dc_scm_v1_class_init(ObjectClass *oc,
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC2_ON | ASPEED_MAC3_ON;
amc->i2c_init = qcom_dc_scm_bmc_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
@@ -1728,7 +1728,7 @@ static void aspeed_machine_qcom_firework_class_init(ObjectClass *oc,
amc->num_cs = 2;
amc->macs_mask = ASPEED_MAC2_ON | ASPEED_MAC3_ON;
amc->i2c_init = qcom_dc_scm_firework_i2c_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1 * GiB;
aspeed_machine_class_init_cpus_defaults(mc);
};
diff --git a/hw/arm/b-l475e-iot01a.c b/hw/arm/b-l475e-iot01a.c
index d43c84435b0..f05ee0fee0f 100644
--- a/hw/arm/b-l475e-iot01a.c
+++ b/hw/arm/b-l475e-iot01a.c
@@ -120,7 +120,7 @@ static void bl475e_machine_init(ObjectClass *oc, void *data)
mc->desc = "B-L475E-IOT01A Discovery Kit (Cortex-M4)";
mc->init = bl475e_init;
mc->valid_cpu_types = machine_valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
/* SRAM pre-allocated as part of the SoC instantiation */
mc->default_ram_size = 0;
diff --git a/hw/arm/bananapi_m2u.c b/hw/arm/bananapi_m2u.c
index 3da6ec4a03c..4d84d10d24c 100644
--- a/hw/arm/bananapi_m2u.c
+++ b/hw/arm/bananapi_m2u.c
@@ -141,7 +141,7 @@ static void bpim2u_machine_init(MachineClass *mc)
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "bpim2u.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("bpim2u", bpim2u_machine_init)
diff --git a/hw/arm/collie.c b/hw/arm/collie.c
index 80bf12246a9..864c66193b1 100644
--- a/hw/arm/collie.c
+++ b/hw/arm/collie.c
@@ -79,7 +79,7 @@ static void collie_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("sa1110");
mc->default_ram_size = RAM_SIZE;
mc->default_ram_id = "strongarm.sdram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo collie_machine_typeinfo = {
diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
index 11d896f8322..d665d4edd97 100644
--- a/hw/arm/cubieboard.c
+++ b/hw/arm/cubieboard.c
@@ -122,7 +122,7 @@ static void cubieboard_machine_init(MachineClass *mc)
mc->units_per_default_bus = 1;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "cubieboard.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("cubieboard", cubieboard_machine_init)
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index a6ccf7ef9b6..f334c1fb02c 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -143,7 +143,7 @@ static void canon_a1100_machine_init(MachineClass *mc)
mc->ignore_memory_transaction_failures = true;
mc->default_ram_size = 64 * MiB;
mc->default_ram_id = "ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("canon-a1100", canon_a1100_machine_init)
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index 63e86e2c609..43dc89d902e 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -165,7 +165,7 @@ static void nuri_class_init(ObjectClass *oc, void *data)
mc->min_cpus = EXYNOS4210_NCPUS;
mc->default_cpus = EXYNOS4210_NCPUS;
mc->ignore_memory_transaction_failures = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo nuri_type = {
@@ -185,7 +185,7 @@ static void smdkc210_class_init(ObjectClass *oc, void *data)
mc->min_cpus = EXYNOS4210_NCPUS;
mc->default_cpus = EXYNOS4210_NCPUS;
mc->ignore_memory_transaction_failures = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo smdkc210_type = {
diff --git a/hw/arm/fby35.c b/hw/arm/fby35.c
index 9b448bf764d..6d3663f14a1 100644
--- a/hw/arm/fby35.c
+++ b/hw/arm/fby35.c
@@ -170,7 +170,7 @@ static void fby35_class_init(ObjectClass *oc, void *data)
mc->init = fby35_init;
mc->no_floppy = 1;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->min_cpus = mc->max_cpus = mc->default_cpus = 3;
object_class_property_add_bool(oc, "execute-in-place",
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index 97477571e62..975fd7a094a 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -357,7 +357,7 @@ static void highbank_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "highbank.dram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo highbank_type = {
@@ -382,7 +382,7 @@ static void midway_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "highbank.dram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo midway_type = {
diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c
index 8f89e03332f..e95ea5e4e18 100644
--- a/hw/arm/imx25_pdk.c
+++ b/hw/arm/imx25_pdk.c
@@ -147,7 +147,7 @@ static void imx25_pdk_machine_init(MachineClass *mc)
mc->init = imx25_pdk_init;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "imx25.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("imx25-pdk", imx25_pdk_machine_init)
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index 905a7c2aecf..8aa2e6e98e3 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -688,7 +688,7 @@ static void integratorcp_machine_init(MachineClass *mc)
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_id = "integrator.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c
index 45b3b08eb80..736eabab664 100644
--- a/hw/arm/kzm.c
+++ b/hw/arm/kzm.c
@@ -137,7 +137,7 @@ static void kzm_machine_init(MachineClass *mc)
mc->init = kzm_init;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "kzm.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("kzm", kzm_machine_init)
diff --git a/hw/arm/mcimx6ul-evk.c b/hw/arm/mcimx6ul-evk.c
index 49520b47f18..86982cb0772 100644
--- a/hw/arm/mcimx6ul-evk.c
+++ b/hw/arm/mcimx6ul-evk.c
@@ -74,6 +74,6 @@ static void mcimx6ul_evk_machine_init(MachineClass *mc)
mc->init = mcimx6ul_evk_init;
mc->max_cpus = FSL_IMX6UL_NUM_CPUS;
mc->default_ram_id = "mcimx6ul-evk.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("mcimx6ul-evk", mcimx6ul_evk_machine_init)
diff --git a/hw/arm/mcimx7d-sabre.c b/hw/arm/mcimx7d-sabre.c
index da32fdd29d0..33119610113 100644
--- a/hw/arm/mcimx7d-sabre.c
+++ b/hw/arm/mcimx7d-sabre.c
@@ -74,6 +74,6 @@ static void mcimx7d_sabre_machine_init(MachineClass *mc)
mc->init = mcimx7d_sabre_init;
mc->max_cpus = FSL_IMX7_NUM_CPUS;
mc->default_ram_id = "mcimx7d-sabre.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("mcimx7d-sabre", mcimx7d_sabre_machine_init)
diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c
index 9d32ae5bd51..fb099508324 100644
--- a/hw/arm/microbit.c
+++ b/hw/arm/microbit.c
@@ -67,7 +67,7 @@ static void microbit_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "BBC micro:bit (Cortex-M0)";
mc->init = microbit_init;
mc->max_cpus = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo microbit_info = {
diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
index 10626120368..91b8ae6d384 100644
--- a/hw/arm/mps2-tz.c
+++ b/hw/arm/mps2-tz.c
@@ -1320,7 +1320,7 @@ static void mps2tz_an505_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN505;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33");
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045050;
mmc->sysclk_frq = 20 * 1000 * 1000; /* 20MHz */
mmc->apb_periph_frq = mmc->sysclk_frq;
@@ -1355,7 +1355,7 @@ static void mps2tz_an521_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN521;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33");
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045210;
mmc->sysclk_frq = 20 * 1000 * 1000; /* 20MHz */
mmc->apb_periph_frq = mmc->sysclk_frq;
@@ -1390,7 +1390,7 @@ static void mps3tz_an524_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN524;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33");
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045240;
mmc->sysclk_frq = 32 * 1000 * 1000; /* 32MHz */
mmc->apb_periph_frq = mmc->sysclk_frq;
@@ -1430,7 +1430,7 @@ static void mps3tz_an547_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN547;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m55");
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->scc_id = 0x41055470;
mmc->sysclk_frq = 32 * 1000 * 1000; /* 32MHz */
mmc->apb_periph_frq = 25 * 1000 * 1000; /* 25MHz */
diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c
index 2bce37644e2..40eb5d16187 100644
--- a/hw/arm/mps2.c
+++ b/hw/arm/mps2.c
@@ -487,7 +487,7 @@ static void mps2_an385_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN385;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->scc_id = 0x41043850;
mmc->psram_base = 0x21000000;
mmc->ethernet_base = 0x40200000;
@@ -507,7 +507,7 @@ static void mps2_an386_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN386;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m4");
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->scc_id = 0x41043860;
mmc->psram_base = 0x21000000;
mmc->ethernet_base = 0x40200000;
@@ -527,7 +527,7 @@ static void mps2_an500_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN500;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m7");
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045000;
mmc->psram_base = 0x60000000;
mmc->ethernet_base = 0xa0000000;
@@ -547,7 +547,7 @@ static void mps2_an511_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN511;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045110;
mmc->psram_base = 0x21000000;
mmc->ethernet_base = 0x40200000;
diff --git a/hw/arm/mps3r.c b/hw/arm/mps3r.c
index ae70ebe8604..f26d1cfb2c4 100644
--- a/hw/arm/mps3r.c
+++ b/hw/arm/mps3r.c
@@ -618,7 +618,7 @@ static void mps3r_an536_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 2;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-r52");
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->raminfo = an536_raminfo;
mps3r_set_default_ram_info(mmc);
}
diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c
index 349a96a0b5d..6d3f0a89e0b 100644
--- a/hw/arm/msf2-som.c
+++ b/hw/arm/msf2-som.c
@@ -106,7 +106,7 @@ static void emcraft_sf2_machine_init(MachineClass *mc)
mc->desc = "SmartFusion2 SOM kit from Emcraft (M2S010)";
mc->init = emcraft_sf2_s2s010_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("emcraft-sf2", emcraft_sf2_machine_init)
diff --git a/hw/arm/musca.c b/hw/arm/musca.c
index 89451b96843..6f19b7d58a0 100644
--- a/hw/arm/musca.c
+++ b/hw/arm/musca.c
@@ -615,7 +615,7 @@ static void musca_a_class_init(ObjectClass *oc, void *data)
MuscaMachineClass *mmc = MUSCA_MACHINE_CLASS(oc);
mc->desc = "ARM Musca-A board (dual Cortex-M33)";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->type = MUSCA_A;
mmc->init_svtor = 0x10200000;
mmc->sram_addr_width = 15;
@@ -630,7 +630,7 @@ static void musca_b1_class_init(ObjectClass *oc, void *data)
MuscaMachineClass *mmc = MUSCA_MACHINE_CLASS(oc);
mc->desc = "ARM Musca-B1 board (dual Cortex-M33)";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mmc->type = MUSCA_B1;
/*
* This matches the DAPlink firmware which boots from QSPI. There
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index d5ebfabe3f9..fd2975753ee 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -1342,7 +1342,7 @@ static void musicpal_machine_init(MachineClass *mc)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_size = MP_RAM_DEFAULT_SIZE;
mc->default_ram_id = "musicpal.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c
index 9ca0ee6a345..fca32d45924 100644
--- a/hw/arm/netduino2.c
+++ b/hw/arm/netduino2.c
@@ -63,7 +63,7 @@ static void netduino2_machine_init(MachineClass *mc)
mc->init = netduino2_init;
mc->valid_cpu_types = valid_cpu_types;
mc->ignore_memory_transaction_failures = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("netduino2", netduino2_machine_init)
diff --git a/hw/arm/netduinoplus2.c b/hw/arm/netduinoplus2.c
index abe60607658..e1a59fb9e23 100644
--- a/hw/arm/netduinoplus2.c
+++ b/hw/arm/netduinoplus2.c
@@ -63,7 +63,7 @@ static void netduinoplus2_machine_init(MachineClass *mc)
mc->desc = "Netduino Plus 2 Machine (Cortex-M4)";
mc->init = netduinoplus2_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("netduinoplus2", netduinoplus2_machine_init)
diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index 38b8f02364f..eb28b97ad83 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -481,7 +481,7 @@ static void npcm750_evb_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Nuvoton NPCM750 Evaluation Board (Cortex-A9)";
mc->init = npcm750_evb_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 512 * MiB;
};
@@ -494,7 +494,7 @@ static void gsj_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Quanta GSJ (Cortex-A9)";
mc->init = quanta_gsj_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 512 * MiB;
};
@@ -507,7 +507,7 @@ static void gbs_bmc_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Quanta GBS (Cortex-A9)";
mc->init = quanta_gbs_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1 * GiB;
}
@@ -520,7 +520,7 @@ static void kudo_bmc_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Kudo BMC (Cortex-A9)";
mc->init = kudo_bmc_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1 * GiB;
};
@@ -533,7 +533,7 @@ static void mori_bmc_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Mori BMC (Cortex-A9)";
mc->init = mori_bmc_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_size = 1 * GiB;
}
diff --git a/hw/arm/olimex-stm32-h405.c b/hw/arm/olimex-stm32-h405.c
index 01ae12fa4ac..23f686de876 100644
--- a/hw/arm/olimex-stm32-h405.c
+++ b/hw/arm/olimex-stm32-h405.c
@@ -66,7 +66,7 @@ static void olimex_stm32_h405_machine_init(MachineClass *mc)
mc->desc = "Olimex STM32-H405 (Cortex-M4)";
mc->init = olimex_stm32_h405_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
/* SRAM pre-allocated as part of the SoC instantiation */
mc->default_ram_size = 0;
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
index 8170669db1f..c6b0bed0796 100644
--- a/hw/arm/omap_sx1.c
+++ b/hw/arm/omap_sx1.c
@@ -216,7 +216,7 @@ static void sx1_machine_v2_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("ti925t");
mc->default_ram_size = SDRAM_SIZE;
mc->default_ram_id = "omap1.dram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo sx1_machine_v2_type = {
@@ -235,7 +235,7 @@ static void sx1_machine_v1_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("ti925t");
mc->default_ram_size = SDRAM_SIZE;
mc->default_ram_id = "omap1.dram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo sx1_machine_v1_type = {
diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
index 76ab214853d..634af9b0a10 100644
--- a/hw/arm/orangepi.c
+++ b/hw/arm/orangepi.c
@@ -121,7 +121,7 @@ static void orangepi_machine_init(MachineClass *mc)
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "orangepi.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("orangepi-pc", orangepi_machine_init)
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 176c324cf82..dce35ca11aa 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -342,7 +342,7 @@ static void raspi0_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
rmc->board_rev = 0x920092; /* Revision 1.2 */
raspi_machine_class_init(mc, rmc->board_rev);
};
@@ -352,7 +352,7 @@ static void raspi1ap_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
rmc->board_rev = 0x900021; /* Revision 1.1 */
raspi_machine_class_init(mc, rmc->board_rev);
};
@@ -362,7 +362,7 @@ static void raspi2b_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
rmc->board_rev = 0xa21041;
raspi_machine_class_init(mc, rmc->board_rev);
};
@@ -373,7 +373,7 @@ static void raspi3ap_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
rmc->board_rev = 0x9020e0; /* Revision 1.0 */
raspi_machine_class_init(mc, rmc->board_rev);
};
@@ -383,7 +383,7 @@ static void raspi3b_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiBaseMachineClass *rmc = RASPI_BASE_MACHINE_CLASS(oc);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
rmc->board_rev = 0xa02082;
raspi_machine_class_init(mc, rmc->board_rev);
};
diff --git a/hw/arm/raspi4b.c b/hw/arm/raspi4b.c
index 37eef378888..f6de103a3e1 100644
--- a/hw/arm/raspi4b.c
+++ b/hw/arm/raspi4b.c
@@ -118,7 +118,7 @@ static void raspi4b_machine_class_init(ObjectClass *oc, void *data)
rmc->board_rev = 0xb03115; /* Revision 1.5, 2 Gb RAM */
#endif
raspi_machine_class_common_init(mc, rmc->board_rev);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->init = raspi4b_machine_init;
}
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index 4bc8f3956f3..436eef816ed 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -415,7 +415,7 @@ static void realview_eb_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
@@ -436,7 +436,7 @@ static void realview_eb_mpcore_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm11mpcore");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
@@ -455,7 +455,7 @@ static void realview_pb_a8_class_init(ObjectClass *oc, void *data)
mc->init = realview_pb_a8_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a8");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
@@ -475,7 +475,7 @@ static void realview_pbx_a9_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
diff --git a/hw/arm/sabrelite.c b/hw/arm/sabrelite.c
index 8d57653ab34..df60d47c6fd 100644
--- a/hw/arm/sabrelite.c
+++ b/hw/arm/sabrelite.c
@@ -110,7 +110,7 @@ static void sabrelite_machine_init(MachineClass *mc)
mc->max_cpus = FSL_IMX6_NUM_CPUS;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "sabrelite.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("sabrelite", sabrelite_machine_init)
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 41dba85f44c..02c72a62a37 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -900,7 +900,7 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
mc->minimum_page_bits = 12;
mc->block_default_type = IF_IDE;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_nic = "e1000e";
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "sbsa-ref.ram";
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index ef3fd508ba1..25283fd6233 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -1421,7 +1421,7 @@ static void lm3s811evb_class_init(ObjectClass *oc, void *data)
mc->init = lm3s811evb_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo lm3s811evb_type = {
@@ -1442,7 +1442,7 @@ static void lm3s6965evb_class_init(ObjectClass *oc, void *data)
mc->init = lm3s6965evb_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo lm3s6965evb_type = {
diff --git a/hw/arm/stm32vldiscovery.c b/hw/arm/stm32vldiscovery.c
index 01b4afcb1a0..a71da292b84 100644
--- a/hw/arm/stm32vldiscovery.c
+++ b/hw/arm/stm32vldiscovery.c
@@ -66,7 +66,7 @@ static void stm32vldiscovery_machine_init(MachineClass *mc)
mc->desc = "ST STM32VLDISCOVERY (Cortex-M3)";
mc->init = stm32vldiscovery_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("stm32vldiscovery", stm32vldiscovery_machine_init)
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index def3da4a344..941616cd25b 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -419,7 +419,7 @@ static void versatilepb_class_init(ObjectClass *oc, void *data)
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_id = "versatile.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
@@ -440,7 +440,7 @@ static void versatileab_class_init(ObjectClass *oc, void *data)
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_id = "versatile.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 06ec78e6eb8..48e18a49d54 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -803,7 +803,7 @@ static void vexpress_a9_class_init(ObjectClass *oc, void *data)
mc->desc = "ARM Versatile Express for Cortex-A9";
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
vmc->daughterboard = &a9_daughterboard;
}
@@ -819,7 +819,7 @@ static void vexpress_a15_class_init(ObjectClass *oc, void *data)
mc->desc = "ARM Versatile Express for Cortex-A15";
mc->valid_cpu_types = valid_cpu_types;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
vmc->daughterboard = &a15_daughterboard;
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index cb2a626d2d2..192c2a5ac78 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3125,7 +3125,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
#endif
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->pci_allow_0_address = true;
/* We know we will never create a pre-ARMv7 CPU which needs 1K pages */
mc->minimum_page_bits = 12;
diff --git a/hw/arm/xen-pvh.c b/hw/arm/xen-pvh.c
index e49ab0e7f57..ce4cc4fce93 100644
--- a/hw/arm/xen-pvh.c
+++ b/hw/arm/xen-pvh.c
@@ -75,7 +75,7 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
* mc->max_cpus, QEMU will bail out with an error message.
*/
mc->max_cpus = GUEST_MAX_VCPUS;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
/* Xen/ARM does not use buffered IOREQs. */
xpc->handle_bufioreq = HVM_IOREQSRV_BUFIOREQ_OFF;
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 12418094f9d..3c6a4604cc9 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -463,7 +463,6 @@ static void zynq_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Xilinx Zynq Platform Baseboard for Cortex-A9";
mc->init = zynq_init;
mc->max_cpus = ZYNQ_MAX_CPUS;
- mc->no_sdcard = ON_OFF_AUTO_ON;
mc->ignore_memory_transaction_failures = true;
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_id = "zynq.ext_ram";
diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
index 8a1cdb037ca..0c6f0359e3d 100644
--- a/hw/arm/xlnx-versal-virt.c
+++ b/hw/arm/xlnx-versal-virt.c
@@ -818,7 +818,7 @@ static void versal_virt_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = XLNX_VERSAL_NR_ACPUS + XLNX_VERSAL_NR_RCPUS;
mc->default_cpus = XLNX_VERSAL_NR_ACPUS + XLNX_VERSAL_NR_RCPUS;
mc->no_cdrom = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_id = "ddr";
object_class_property_add_str(oc, "ospi-flash", versal_get_ospi_model,
versal_set_ospi_model);
diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
index 311d8f1cad4..4fdb153e4d8 100644
--- a/hw/arm/xlnx-zcu102.c
+++ b/hw/arm/xlnx-zcu102.c
@@ -280,7 +280,7 @@ static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = XLNX_ZYNQMP_NUM_APU_CPUS + XLNX_ZYNQMP_NUM_RPU_CPUS;
mc->default_cpus = XLNX_ZYNQMP_NUM_APU_CPUS;
mc->default_ram_id = "ddr-ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
object_class_property_add_bool(oc, "secure", zcu102_get_secure,
diff --git a/hw/avr/arduino.c b/hw/avr/arduino.c
index 1801074a421..5f30a7d5850 100644
--- a/hw/avr/arduino.c
+++ b/hw/avr/arduino.c
@@ -67,7 +67,7 @@ static void arduino_machine_class_init(ObjectClass *oc, void *data)
mc->no_floppy = 1;
mc->no_cdrom = 1;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static void arduino_duemilanove_class_init(ObjectClass *oc, void *data)
diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
index b93056c0f7b..7f1fb562beb 100644
--- a/hw/core/null-machine.c
+++ b/hw/core/null-machine.c
@@ -53,7 +53,6 @@ static void machine_none_machine_init(MachineClass *mc)
mc->no_parallel = 1;
mc->no_floppy = 1;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_ON;
}
DEFINE_MACHINE("none", machine_none_machine_init)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 363ca89ca1c..b4b238ed2c7 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -704,7 +704,7 @@ static void HP_B160L_machine_init_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_ram_id = "ram";
mc->default_nic = "tulip";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
nc->nmi_monitor_handler = hppa_nmi;
}
@@ -741,7 +741,7 @@ static void HP_C3700_machine_init_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_ram_id = "ram";
mc->default_nic = "tulip";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
nc->nmi_monitor_handler = hppa_nmi;
}
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index b01de3a1737..f94272e66b0 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1799,7 +1799,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
mc->smp_props.dies_supported = true;
mc->smp_props.modules_supported = true;
mc->default_ram_id = "pc.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_AUTO;
object_class_property_add(oc, PC_MACHINE_MAX_RAM_BELOW_4G, "size",
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index e3b92fcb744..790b1863f53 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -382,7 +382,7 @@ static void x86_machine_class_init(ObjectClass *oc, void *data)
mc->get_default_cpu_node_id = x86_get_default_cpu_node_id;
mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids;
mc->kvm_type = x86_kvm_type;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
x86mc->save_tsc_khz = true;
x86mc->fwcfg_dma_enabled = true;
nc->nmi_monitor_handler = x86_nmi;
diff --git a/hw/i386/xen/xen-pvh.c b/hw/i386/xen/xen-pvh.c
index 33e5882c2d3..6f5b6a2b8f5 100644
--- a/hw/i386/xen/xen-pvh.c
+++ b/hw/i386/xen/xen-pvh.c
@@ -82,7 +82,7 @@ static void xen_pvh_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Xen PVH x86 machine";
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
/* mc->max_cpus holds the MAX value allowed in the -smp cmd-line opts. */
mc->max_cpus = HVM_MAX_VCPUS;
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index d850c87bbc8..0eea84c9675 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -1471,7 +1471,7 @@ static void virt_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_VIRTIO;
mc->default_boot_order = "c";
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->possible_cpu_arch_ids = virt_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = virt_cpu_index_to_props;
mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index 286c3bac2ad..19478705129 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -99,7 +99,7 @@ static void an5206_machine_init(MachineClass *mc)
mc->init = an5206_init;
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5206");
mc->default_ram_id = "an5206.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("an5206", an5206_machine_init)
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index a0c90d111e6..9a8c551224f 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -398,7 +398,7 @@ static void mcf5208evb_machine_init(MachineClass *mc)
mc->is_default = true;
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5208");
mc->default_ram_id = "mcf5208.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("mcf5208evb", mcf5208evb_machine_init)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 06a4d825e71..ee06a5e2e07 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -1359,7 +1359,7 @@ static void next_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_id = "next.ram";
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m68040");
mc->no_cdrom = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo next_typeinfo = {
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index 21fa56e7a9c..f3cb8541b37 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -743,7 +743,7 @@ static void q800_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 1;
mc->block_default_type = IF_SCSI;
mc->default_ram_id = "m68k_mac.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
compat_props_add(mc->compat_props, hw_compat_q800, hw_compat_q800_len);
diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c
index a1bd9c432d2..69e8f53482d 100644
--- a/hw/m68k/virt.c
+++ b/hw/m68k/virt.c
@@ -318,7 +318,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 1;
mc->no_floppy = 1;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_ram_id = "m68k_virt.ram";
}
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index a21112f17c5..504968404fe 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -223,7 +223,7 @@ static void petalogix_ml605_machine_init(MachineClass *mc)
mc->desc = "PetaLogix linux refdesign for xilinx ml605 (little endian)";
#endif
mc->init = petalogix_ml605_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("petalogix-ml605", petalogix_ml605_machine_init)
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index d68307f562e..e4d3eececc5 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -146,7 +146,7 @@ static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800";
mc->init = petalogix_s3adsp1800_init;
mc->is_default = true;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo petalogix_s3adsp1800_machine_types[] = {
diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c
index 14386785f85..b40d82b396f 100644
--- a/hw/microblaze/xlnx-zynqmp-pmu.c
+++ b/hw/microblaze/xlnx-zynqmp-pmu.c
@@ -188,7 +188,7 @@ static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc)
mc->desc = "Xilinx ZynqMP PMU machine (little endian)";
#endif
mc->init = xlnx_zynqmp_pmu_init;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("xlnx-zynqmp-pmu", xlnx_zynqmp_pmu_machine_init)
diff --git a/hw/mips/boston.c b/hw/mips/boston.c
index bd9059a2070..66cdad639e8 100644
--- a/hw/mips/boston.c
+++ b/hw/mips/boston.c
@@ -842,7 +842,7 @@ static void boston_mach_class_init(MachineClass *mc)
mc->default_ram_id = "boston.ddr";
mc->max_cpus = 16;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("I6400");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("boston", boston_mach_class_init)
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 83e95c3b20e..e10b5a27743 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -335,7 +335,7 @@ static void mips_fuloong2e_machine_init(MachineClass *mc)
mc->default_ram_size = 256 * MiB;
mc->default_ram_id = "fuloong2e.ram";
mc->minimum_page_bits = 14;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index 326f60c448b..ad4561a51e6 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -424,7 +424,7 @@ static void mips_magnum_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
mc->default_ram_id = "mips_jazz.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo mips_magnum_type = {
@@ -442,7 +442,7 @@ static void mips_pica61_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
mc->default_ram_id = "mips_jazz.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo mips_pica61_type = {
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index f44932b331e..46c2e1e9de5 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -679,7 +679,7 @@ static void loongson3v_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 1600 * MiB;
mc->minimum_page_bits = 14;
mc->default_nic = "virtio-net-pci";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo loongson3_machine_types[] = {
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 13811f89f91..31ff279b4cb 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1306,7 +1306,7 @@ static void mips_malta_machine_init(MachineClass *mc)
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
#endif
mc->default_ram_id = "mips_malta.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
compat_props_add(mc->compat_props, malta_compat, malta_compat_len);
}
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c
index f0d06ab549c..ff2b9050700 100644
--- a/hw/mips/mipssim.c
+++ b/hw/mips/mipssim.c
@@ -247,7 +247,7 @@ static void mips_mipssim_machine_init(MachineClass *mc)
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
#endif
mc->default_ram_id = "mips_mipssim.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("mipssim", mips_mipssim_machine_init)
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index b9d71ea0c3b..5e4686ba7a2 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -368,7 +368,7 @@ static void openrisc_sim_machine_init(ObjectClass *oc, void *data)
mc->max_cpus = OR1KSIM_CPUS_MAX;
mc->is_default = true;
mc->default_cpu_type = OPENRISC_CPU_TYPE_NAME("or1200");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo or1ksim_machine_typeinfo = {
diff --git a/hw/openrisc/virt.c b/hw/openrisc/virt.c
index d250e2ab21f..2764e398a98 100644
--- a/hw/openrisc/virt.c
+++ b/hw/openrisc/virt.c
@@ -554,7 +554,7 @@ static void openrisc_virt_machine_init(ObjectClass *oc, void *data)
mc->max_cpus = VIRT_CPUS_MAX;
mc->is_default = false;
mc->default_cpu_type = OPENRISC_CPU_TYPE_NAME("or1200");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo or1ksim_machine_typeinfo = {
diff --git a/hw/ppc/amigaone.c b/hw/ppc/amigaone.c
index 39449e3632d..296c30da92f 100644
--- a/hw/ppc/amigaone.c
+++ b/hw/ppc/amigaone.c
@@ -173,7 +173,7 @@ static void amigaone_machine_init(MachineClass *mc)
mc->default_display = "std";
mc->default_ram_id = "ram";
mc->default_ram_size = 512 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("amigaone", amigaone_machine_init)
diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c
index 0b91d422aa1..afad4802cae 100644
--- a/hw/ppc/e500plat.c
+++ b/hw/ppc/e500plat.c
@@ -100,7 +100,7 @@ static void e500plat_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30");
mc->default_ram_id = "mpc8544ds.ram";
mc->default_nic = "virtio-net-pci";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_ETSEC_COMMON);
}
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index da53eb11ed9..869f3f7104b 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -580,7 +580,7 @@ static void core99_machine_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_display = "std";
mc->default_nic = "sungem";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->kvm_type = core99_kvm_type;
#ifdef TARGET_PPC64
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("970fx_v3.1");
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index b23bfff696e..08e30a4a4e9 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -427,7 +427,7 @@ static void heathrow_class_init(ObjectClass *oc, void *data)
mc->default_nic = "ne2k_pci";
mc->ignore_boot_device_suffixes = true;
mc->default_ram_id = "ppc_heathrow.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
fwc->get_dev_path = heathrow_fw_dev_path;
}
diff --git a/hw/ppc/mpc8544ds.c b/hw/ppc/mpc8544ds.c
index 0fa3a1b7767..38bdf453165 100644
--- a/hw/ppc/mpc8544ds.c
+++ b/hw/ppc/mpc8544ds.c
@@ -62,7 +62,7 @@ static void mpc8544ds_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30");
mc->default_ram_id = "mpc8544ds.ram";
mc->default_nic = "virtio-net-pci";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
#define TYPE_MPC8544DS_MACHINE MACHINE_TYPE_NAME("mpc8544ds")
diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c
index 03ddbb96b66..479dcfe809f 100644
--- a/hw/ppc/pegasos2.c
+++ b/hw/ppc/pegasos2.c
@@ -604,7 +604,7 @@ static void pegasos2_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("7457_v1.2");
mc->default_ram_id = "pegasos2.ram";
mc->default_ram_size = 512 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
vhc->cpu_in_nested = pegasos2_cpu_in_nested;
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 70203449fda..15fbbf6c157 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -2878,7 +2878,7 @@ static void pnv_machine_class_init(ObjectClass *oc, void *data)
/* Pnv provides a AHCI device for storage */
mc->block_default_type = IF_IDE;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_boot_order = NULL;
/*
* RAM defaults to less than 2048 for 32-bit hosts, and large
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index c602d608176..8946b5173c5 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -351,7 +351,7 @@ static void ppc405_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 128 * MiB;
mc->default_ram_id = "ppc405.ram";
mc->deprecation_reason = "machine is old and unmaintained";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo ppc405_machine_type = {
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
index 5b2d52032f7..081a993ef02 100644
--- a/hw/ppc/ppc440_bamboo.c
+++ b/hw/ppc/ppc440_bamboo.c
@@ -268,7 +268,7 @@ static void bamboo_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440epb");
mc->default_ram_id = "ppc4xx.sdram";
mc->default_nic = "e1000";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("bamboo", bamboo_machine_init)
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 998e8ecd426..85bfc2fd4f0 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -428,7 +428,7 @@ static void ibm_40p_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("604");
mc->default_display = "std";
mc->default_nic = "pcnet";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index a1b1fc8724a..d9c871ef205 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -524,7 +524,7 @@ static void sam460ex_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("460exb");
mc->default_ram_size = 512 * MiB;
mc->default_ram_id = "ppc4xx.sdram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("sam460ex", sam460ex_machine_init)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index fa030d52767..42b07fadd9d 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4594,7 +4594,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = SPAPR_IRQ_NR_IPIS;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->default_boot_order = "";
mc->default_ram_size = 512 * MiB;
mc->default_ram_id = "ppc_spapr.ram";
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 157aaf9449f..e71d04d2ce1 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -289,7 +289,7 @@ static void virtex_machine_init(MachineClass *mc)
mc->init = virtex_init;
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440-xilinx");
mc->default_ram_id = "ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("virtex-ml507", virtex_machine_init)
diff --git a/hw/remote/machine.c b/hw/remote/machine.c
index 1f7b0b96dd4..fa4a1bb815a 100644
--- a/hw/remote/machine.c
+++ b/hw/remote/machine.c
@@ -128,7 +128,7 @@ static void remote_machine_class_init(ObjectClass *oc, void *data)
mc->init = remote_machine_init;
mc->desc = "Experimental remote machine";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
hc->unplug = remote_machine_dev_unplug_cb;
diff --git a/hw/riscv/microchip_pfsoc.c b/hw/riscv/microchip_pfsoc.c
index 2417342a717..9c846f9b5ba 100644
--- a/hw/riscv/microchip_pfsoc.c
+++ b/hw/riscv/microchip_pfsoc.c
@@ -650,7 +650,7 @@ static void microchip_icicle_kit_machine_class_init(ObjectClass *oc, void *data)
mc->min_cpus = MICROCHIP_PFSOC_MANAGEMENT_CPU_COUNT + 1;
mc->default_cpus = mc->min_cpus;
mc->default_ram_id = "microchip.icicle.kit.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
/*
* Map 513 MiB high memory, the minimum required high memory size, because
diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
index 3b26e1f53bc..d78a96c5354 100644
--- a/hw/riscv/opentitan.c
+++ b/hw/riscv/opentitan.c
@@ -121,7 +121,7 @@ static void opentitan_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_IBEX;
mc->default_ram_id = "riscv.lowrisc.ibex.ram";
mc->default_ram_size = ibex_memmap[IBEX_DEV_RAM].size;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static void lowrisc_ibex_soc_init(Object *obj)
diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
index 2f59c86bf0c..efe814b5868 100644
--- a/hw/riscv/shakti_c.c
+++ b/hw/riscv/shakti_c.c
@@ -84,7 +84,7 @@ static void shakti_c_machine_class_init(ObjectClass *klass, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_SHAKTI_C;
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_id = "riscv.shakti.c.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo shakti_c_machine_type_info = {
diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
index 56a2ca7cabb..164eb3ab83b 100644
--- a/hw/riscv/sifive_e.c
+++ b/hw/riscv/sifive_e.c
@@ -153,7 +153,7 @@ static void sifive_e_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = SIFIVE_E_CPU;
mc->default_ram_id = "riscv.sifive.e.ram";
mc->default_ram_size = sifive_e_memmap[SIFIVE_E_DEV_DTIM].size;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
object_class_property_add_bool(oc, "revb", sifive_e_machine_get_revb,
sifive_e_machine_set_revb);
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index fd57d02dca8..679f2024bc6 100644
--- a/hw/riscv/sifive_u.c
+++ b/hw/riscv/sifive_u.c
@@ -724,7 +724,7 @@ static void sifive_u_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = SIFIVE_U_CPU;
mc->default_cpus = mc->min_cpus;
mc->default_ram_id = "riscv.sifive.u.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
object_class_property_add_bool(oc, "start-in-flash",
sifive_u_machine_get_start_in_flash,
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index a0fa727f6bf..1ea35937e15 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -358,7 +358,7 @@ static void spike_machine_class_init(ObjectClass *oc, void *data)
/* platform instead of architectural choice */
mc->cpu_cluster_has_numa_boundary = true;
mc->default_ram_id = "riscv.spike.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
object_class_property_add_str(oc, "signature", NULL, spike_set_signature);
object_class_property_set_description(oc, "signature",
"File to write ACT test signature");
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index d9fc7cdf9ac..2aa420f6e55 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1918,7 +1918,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_BASE;
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
mc->pci_allow_0_address = true;
mc->possible_cpu_arch_ids = riscv_numa_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props;
diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index 9c3ae60bf80..de3b708bc57 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -166,7 +166,7 @@ static void rx_gdbsim_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RX62N_CPU;
mc->default_ram_size = 16 * MiB;
mc->default_ram_id = "ext-sdram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static void rx62n7_class_init(ObjectClass *oc, void *data)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 5f78c8d20ff..51ae0c133d8 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -817,7 +817,6 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
mc->no_cdrom = 1;
mc->no_floppy = 1;
mc->no_parallel = 1;
- mc->no_sdcard = ON_OFF_AUTO_ON;
mc->max_cpus = S390_MAX_CPUS;
mc->has_hotpluggable_cpus = true;
mc->smp_props.books_supported = true;
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 6ef552ae536..e34deb33dce 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -383,7 +383,7 @@ static void r2d_machine_init(MachineClass *mc)
mc->block_default_type = IF_IDE;
mc->default_cpu_type = TYPE_SH7751R_CPU;
mc->default_nic = "rtl8139";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("r2d", r2d_machine_init)
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index e99d6d71e8f..3bd24495758 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -440,7 +440,7 @@ static void leon3_generic_machine_init(MachineClass *mc)
mc->default_cpu_type = SPARC_CPU_TYPE_NAME("LEON3");
mc->default_ram_id = "leon3.ram";
mc->max_cpus = MAX_CPUS;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("leon3_generic", leon3_generic_machine_init)
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index 19a2a9f2ff6..d555548a1ca 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -1113,7 +1113,7 @@ static void sun4m_machine_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "c";
mc->default_display = "tcx";
mc->default_ram_id = "sun4m.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static void ss5_class_init(ObjectClass *oc, void *data)
diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index 409c67b1b4e..37004b99c4e 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -167,7 +167,7 @@ static void niagara_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "c";
mc->default_cpu_type = SPARC_CPU_TYPE_NAME("Sun-UltraSparc-T1");
mc->default_ram_id = "sun4v-partition.ram";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo niagara_type = {
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index eaf3d42bd0a..6e9a3c5a2e5 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -809,7 +809,7 @@ static void sun4u_class_init(ObjectClass *oc, void *data)
mc->default_display = "std";
mc->default_nic = "sunhme";
mc->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
fwc->get_dev_path = sun4u_fw_dev_path;
compat_props_add(mc->compat_props, hw_compat_sparc64, hw_compat_sparc64_len);
}
@@ -837,7 +837,7 @@ static void sun4v_class_init(ObjectClass *oc, void *data)
mc->default_display = "std";
mc->default_nic = "sunhme";
mc->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo sun4v_type = {
diff --git a/hw/tricore/triboard.c b/hw/tricore/triboard.c
index 3cd93daf6a6..d4550507a99 100644
--- a/hw/tricore/triboard.c
+++ b/hw/tricore/triboard.c
@@ -73,7 +73,7 @@ static void triboard_machine_tc277d_class_init(ObjectClass *oc,
mc->init = triboard_machine_init;
mc->desc = "Infineon AURIX TriBoard TC277 (D-Step)";
mc->max_cpus = 1;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
amc->soc_name = "tc277d-soc";
};
diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c
index 29718051702..9299cd5394a 100644
--- a/hw/tricore/tricore_testboard.c
+++ b/hw/tricore/tricore_testboard.c
@@ -111,7 +111,7 @@ static void ttb_machine_init(MachineClass *mc)
mc->desc = "a minimal TriCore board";
mc->init = tricoreboard_init;
mc->default_cpu_type = TRICORE_CPU_TYPE_NAME("tc1796");
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("tricore_testboard", ttb_machine_init)
diff --git a/hw/xen/xen-pvh-common.c b/hw/xen/xen-pvh-common.c
index ed42e4b624c..9df50cd5382 100644
--- a/hw/xen/xen-pvh-common.c
+++ b/hw/xen/xen-pvh-common.c
@@ -381,7 +381,7 @@ static void xen_pvh_class_init(ObjectClass *oc, void *data)
mc->default_machine_opts = "accel=xen";
/* Set to zero to make sure that the real ram size is passed. */
mc->default_ram_size = 0;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo xen_pvh_info = {
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index a05713e5daa..abdc5bc9a31 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -67,7 +67,7 @@ static void xenpv_machine_init(MachineClass *mc)
mc->init = xen_init_pv;
mc->max_cpus = 1;
mc->default_machine_opts = "accel=xen";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("xenpv", xenpv_machine_init)
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index 6c86d4939f4..989cfd49182 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -125,7 +125,7 @@ static void xtensa_sim_machine_init(MachineClass *mc)
mc->max_cpus = 4;
mc->no_serial = 1;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("sim", xtensa_sim_machine_init)
diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c
index ffa6f210637..0a78ab3a6f9 100644
--- a/hw/xtensa/virt.c
+++ b/hw/xtensa/virt.c
@@ -122,7 +122,7 @@ static void xtensa_virt_machine_init(MachineClass *mc)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_nic = "virtio-net-pci";
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("virt", xtensa_virt_machine_init)
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 2b5f20acefc..e00ae9d2e21 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -594,7 +594,7 @@ static void xtfpga_lx60_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 64 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_lx60_type = {
@@ -612,7 +612,7 @@ static void xtfpga_lx60_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 64 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_lx60_nommu_type = {
@@ -630,7 +630,7 @@ static void xtfpga_lx200_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 96 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_lx200_type = {
@@ -648,7 +648,7 @@ static void xtfpga_lx200_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 96 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_lx200_nommu_type = {
@@ -666,7 +666,7 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 512 * MiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_ml605_type = {
@@ -684,7 +684,7 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 256 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_ml605_nommu_type = {
@@ -702,7 +702,7 @@ static void xtfpga_kc705_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 1 * GiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_kc705_type = {
@@ -720,7 +720,7 @@ static void xtfpga_kc705_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 256 * MiB;
- mc->no_sdcard = ON_OFF_AUTO_OFF;
+ mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_kc705_nommu_type = {
diff --git a/system/vl.c b/system/vl.c
index a89f905f835..2ce7d8c49d7 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -194,7 +194,7 @@ static int default_parallel = 1;
static int default_monitor = 1;
static int default_floppy = 1;
static int default_cdrom = 1;
-static int default_sdcard = 1;
+static bool auto_create_sdcard = true;
static int default_vga = 1;
static int default_net = 1;
@@ -718,7 +718,7 @@ static void configure_blockdev(BlockdevOptionsQueue *bdo_queue,
default_drive(default_cdrom, snapshot, machine_class->block_default_type, 2,
CDROM_OPTS);
default_drive(default_floppy, snapshot, IF_FLOPPY, 0, FD_OPTS);
- default_drive(default_sdcard, snapshot, IF_SD, 0, SD_OPTS);
+ default_drive(auto_create_sdcard, snapshot, IF_SD, 0, SD_OPTS);
}
@@ -1346,9 +1346,8 @@ static void qemu_disable_default_devices(void)
if (!has_defaults || machine_class->no_cdrom) {
default_cdrom = 0;
}
- assert(machine_class->no_sdcard != ON_OFF_AUTO_AUTO);
- if (!has_defaults || machine_class->no_sdcard == ON_OFF_AUTO_ON) {
- default_sdcard = 0;
+ if (!has_defaults || !machine_class->auto_create_sdcard) {
+ auto_create_sdcard = false;
}
if (!has_defaults) {
default_audio = 0;
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 23/32] hw/boards: Do not create unusable default if=sd drives
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (21 preceding siblings ...)
2025-02-10 20:41 ` [PULL 22/32] hw/boards: Rename no_sdcard -> auto_create_sdcard Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 24/32] hw/arm: Remove all invalid uses of auto_create_sdcard=true Philippe Mathieu-Daudé
` (9 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth
A number of machines create an if=sd drive by default even though
they lack an SD bus, and therefore cannot use the drive.
This drive is created when the machine sets flag
@auto_create_sdcard.
See for example running HMP "info block" on the HPPA C3700 machine:
$ qemu-system-hppa -M C3700 -monitor stdio -S
(qemu) info block
floppy0: [not inserted]
Removable device: not locked, tray closed
sd0: [not inserted]
Removable device: not locked, tray closed
$ qemu-system-hppa -M C3700 -sd /bin/sh
qemu-system-hppa: -sd /bin/sh: machine type does not support if=sd,bus=0,unit=0
Delete that from machines that lack an SD bus.
Note, only the ARM and RISCV targets use such feature:
$ git grep -wl IF_SD hw | cut -d/ -f-2 | sort -u
hw/arm
hw/riscv
$
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250204200934.65279-5-philmd@linaro.org>
---
hw/alpha/dp264.c | 1 -
hw/avr/arduino.c | 1 -
hw/hppa/machine.c | 2 -
hw/i386/pc.c | 1 -
hw/i386/x86.c | 1 -
hw/i386/xen/xen-pvh.c | 1 -
hw/loongarch/virt.c | 1 -
hw/m68k/an5206.c | 1 -
hw/m68k/mcf5208.c | 1 -
hw/m68k/next-cube.c | 1 -
hw/m68k/q800.c | 1 -
hw/m68k/virt.c | 1 -
hw/microblaze/petalogix_ml605_mmu.c | 1 -
hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 -
hw/microblaze/xlnx-zynqmp-pmu.c | 1 -
hw/mips/boston.c | 1 -
hw/mips/fuloong2e.c | 1 -
hw/mips/jazz.c | 2 -
hw/mips/loongson3_virt.c | 1 -
hw/mips/malta.c | 1 -
hw/mips/mipssim.c | 1 -
hw/openrisc/openrisc_sim.c | 1 -
hw/openrisc/virt.c | 1 -
hw/ppc/amigaone.c | 1 -
hw/ppc/e500plat.c | 1 -
hw/ppc/mac_newworld.c | 1 -
hw/ppc/mac_oldworld.c | 1 -
hw/ppc/mpc8544ds.c | 1 -
hw/ppc/pegasos2.c | 1 -
hw/ppc/pnv.c | 1 -
hw/ppc/ppc405_boards.c | 1 -
hw/ppc/ppc440_bamboo.c | 1 -
hw/ppc/prep.c | 1 -
hw/ppc/sam460ex.c | 1 -
hw/ppc/spapr.c | 1 -
hw/ppc/virtex_ml507.c | 1 -
hw/remote/machine.c | 1 -
hw/rx/rx-gdbsim.c | 1 -
hw/sh4/r2d.c | 1 -
hw/sparc/leon3.c | 1 -
hw/sparc/sun4m.c | 1 -
hw/sparc64/niagara.c | 1 -
hw/sparc64/sun4u.c | 2 -
hw/tricore/triboard.c | 1 -
hw/tricore/tricore_testboard.c | 1 -
hw/xen/xen-pvh-common.c | 1 -
hw/xenpv/xen_machine_pv.c | 1 -
hw/xtensa/sim.c | 1 -
hw/xtensa/virt.c | 1 -
hw/xtensa/xtfpga.c | 8 ----
tests/qemu-iotests/172.out | 60 ------------------------
51 files changed, 120 deletions(-)
diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
index 14b942fd5a7..570ea9edf24 100644
--- a/hw/alpha/dp264.c
+++ b/hw/alpha/dp264.c
@@ -213,7 +213,6 @@ static void clipper_machine_init(MachineClass *mc)
mc->default_cpu_type = ALPHA_CPU_TYPE_NAME("ev67");
mc->default_ram_id = "ram";
mc->default_nic = "e1000";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("clipper", clipper_machine_init)
diff --git a/hw/avr/arduino.c b/hw/avr/arduino.c
index 5f30a7d5850..48ef478346e 100644
--- a/hw/avr/arduino.c
+++ b/hw/avr/arduino.c
@@ -67,7 +67,6 @@ static void arduino_machine_class_init(ObjectClass *oc, void *data)
mc->no_floppy = 1;
mc->no_cdrom = 1;
mc->no_parallel = 1;
- mc->auto_create_sdcard = true;
}
static void arduino_duemilanove_class_init(ObjectClass *oc, void *data)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index b4b238ed2c7..c5f247633eb 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -704,7 +704,6 @@ static void HP_B160L_machine_init_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_ram_id = "ram";
mc->default_nic = "tulip";
- mc->auto_create_sdcard = true;
nc->nmi_monitor_handler = hppa_nmi;
}
@@ -741,7 +740,6 @@ static void HP_C3700_machine_init_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_ram_id = "ram";
mc->default_nic = "tulip";
- mc->auto_create_sdcard = true;
nc->nmi_monitor_handler = hppa_nmi;
}
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f94272e66b0..0eb52d315bb 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1799,7 +1799,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
mc->smp_props.dies_supported = true;
mc->smp_props.modules_supported = true;
mc->default_ram_id = "pc.ram";
- mc->auto_create_sdcard = true;
pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_AUTO;
object_class_property_add(oc, PC_MACHINE_MAX_RAM_BELOW_4G, "size",
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index 790b1863f53..69bfc00b9a5 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -382,7 +382,6 @@ static void x86_machine_class_init(ObjectClass *oc, void *data)
mc->get_default_cpu_node_id = x86_get_default_cpu_node_id;
mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids;
mc->kvm_type = x86_kvm_type;
- mc->auto_create_sdcard = true;
x86mc->save_tsc_khz = true;
x86mc->fwcfg_dma_enabled = true;
nc->nmi_monitor_handler = x86_nmi;
diff --git a/hw/i386/xen/xen-pvh.c b/hw/i386/xen/xen-pvh.c
index 6f5b6a2b8f5..33c10279763 100644
--- a/hw/i386/xen/xen-pvh.c
+++ b/hw/i386/xen/xen-pvh.c
@@ -82,7 +82,6 @@ static void xen_pvh_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "Xen PVH x86 machine";
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
- mc->auto_create_sdcard = true;
/* mc->max_cpus holds the MAX value allowed in the -smp cmd-line opts. */
mc->max_cpus = HVM_MAX_VCPUS;
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 0eea84c9675..63fa0f4e32a 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -1471,7 +1471,6 @@ static void virt_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_VIRTIO;
mc->default_boot_order = "c";
mc->no_cdrom = 1;
- mc->auto_create_sdcard = true;
mc->possible_cpu_arch_ids = virt_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = virt_cpu_index_to_props;
mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index 19478705129..d97399b882b 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -99,7 +99,6 @@ static void an5206_machine_init(MachineClass *mc)
mc->init = an5206_init;
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5206");
mc->default_ram_id = "an5206.ram";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("an5206", an5206_machine_init)
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index 9a8c551224f..75cc076f787 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -398,7 +398,6 @@ static void mcf5208evb_machine_init(MachineClass *mc)
mc->is_default = true;
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5208");
mc->default_ram_id = "mcf5208.ram";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("mcf5208evb", mcf5208evb_machine_init)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index ee06a5e2e07..0570e4a76f1 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -1359,7 +1359,6 @@ static void next_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_id = "next.ram";
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m68040");
mc->no_cdrom = true;
- mc->auto_create_sdcard = true;
}
static const TypeInfo next_typeinfo = {
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index f3cb8541b37..aeed4c8ddb8 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -743,7 +743,6 @@ static void q800_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 1;
mc->block_default_type = IF_SCSI;
mc->default_ram_id = "m68k_mac.ram";
- mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
compat_props_add(mc->compat_props, hw_compat_q800, hw_compat_q800_len);
diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c
index 69e8f53482d..d967bdd7438 100644
--- a/hw/m68k/virt.c
+++ b/hw/m68k/virt.c
@@ -318,7 +318,6 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 1;
mc->no_floppy = 1;
mc->no_parallel = 1;
- mc->auto_create_sdcard = true;
mc->default_ram_id = "m68k_virt.ram";
}
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index 504968404fe..a795c6385b4 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -223,7 +223,6 @@ static void petalogix_ml605_machine_init(MachineClass *mc)
mc->desc = "PetaLogix linux refdesign for xilinx ml605 (little endian)";
#endif
mc->init = petalogix_ml605_init;
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("petalogix-ml605", petalogix_ml605_machine_init)
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index e4d3eececc5..96aed4ed1a3 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -146,7 +146,6 @@ static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800";
mc->init = petalogix_s3adsp1800_init;
mc->is_default = true;
- mc->auto_create_sdcard = true;
}
static const TypeInfo petalogix_s3adsp1800_machine_types[] = {
diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c
index b40d82b396f..bdbf7328bf4 100644
--- a/hw/microblaze/xlnx-zynqmp-pmu.c
+++ b/hw/microblaze/xlnx-zynqmp-pmu.c
@@ -188,7 +188,6 @@ static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc)
mc->desc = "Xilinx ZynqMP PMU machine (little endian)";
#endif
mc->init = xlnx_zynqmp_pmu_init;
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("xlnx-zynqmp-pmu", xlnx_zynqmp_pmu_machine_init)
diff --git a/hw/mips/boston.c b/hw/mips/boston.c
index 66cdad639e8..364c328032a 100644
--- a/hw/mips/boston.c
+++ b/hw/mips/boston.c
@@ -842,7 +842,6 @@ static void boston_mach_class_init(MachineClass *mc)
mc->default_ram_id = "boston.ddr";
mc->max_cpus = 16;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("I6400");
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("boston", boston_mach_class_init)
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index e10b5a27743..646044e2749 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -335,7 +335,6 @@ static void mips_fuloong2e_machine_init(MachineClass *mc)
mc->default_ram_size = 256 * MiB;
mc->default_ram_id = "fuloong2e.ram";
mc->minimum_page_bits = 14;
- mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index ad4561a51e6..c89610639a9 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -424,7 +424,6 @@ static void mips_magnum_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
mc->default_ram_id = "mips_jazz.ram";
- mc->auto_create_sdcard = true;
}
static const TypeInfo mips_magnum_type = {
@@ -442,7 +441,6 @@ static void mips_pica61_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_SCSI;
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
mc->default_ram_id = "mips_jazz.ram";
- mc->auto_create_sdcard = true;
}
static const TypeInfo mips_pica61_type = {
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index 46c2e1e9de5..831fddb1bd7 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -679,7 +679,6 @@ static void loongson3v_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 1600 * MiB;
mc->minimum_page_bits = 14;
mc->default_nic = "virtio-net-pci";
- mc->auto_create_sdcard = true;
}
static const TypeInfo loongson3_machine_types[] = {
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 31ff279b4cb..8e9cea70b13 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1306,7 +1306,6 @@ static void mips_malta_machine_init(MachineClass *mc)
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
#endif
mc->default_ram_id = "mips_malta.ram";
- mc->auto_create_sdcard = true;
compat_props_add(mc->compat_props, malta_compat, malta_compat_len);
}
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c
index ff2b9050700..c530688e769 100644
--- a/hw/mips/mipssim.c
+++ b/hw/mips/mipssim.c
@@ -247,7 +247,6 @@ static void mips_mipssim_machine_init(MachineClass *mc)
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
#endif
mc->default_ram_id = "mips_mipssim.ram";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("mipssim", mips_mipssim_machine_init)
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index 5e4686ba7a2..e0da4067ba3 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -368,7 +368,6 @@ static void openrisc_sim_machine_init(ObjectClass *oc, void *data)
mc->max_cpus = OR1KSIM_CPUS_MAX;
mc->is_default = true;
mc->default_cpu_type = OPENRISC_CPU_TYPE_NAME("or1200");
- mc->auto_create_sdcard = true;
}
static const TypeInfo or1ksim_machine_typeinfo = {
diff --git a/hw/openrisc/virt.c b/hw/openrisc/virt.c
index 2764e398a98..7b60bf85094 100644
--- a/hw/openrisc/virt.c
+++ b/hw/openrisc/virt.c
@@ -554,7 +554,6 @@ static void openrisc_virt_machine_init(ObjectClass *oc, void *data)
mc->max_cpus = VIRT_CPUS_MAX;
mc->is_default = false;
mc->default_cpu_type = OPENRISC_CPU_TYPE_NAME("or1200");
- mc->auto_create_sdcard = true;
}
static const TypeInfo or1ksim_machine_typeinfo = {
diff --git a/hw/ppc/amigaone.c b/hw/ppc/amigaone.c
index 296c30da92f..b02792221cc 100644
--- a/hw/ppc/amigaone.c
+++ b/hw/ppc/amigaone.c
@@ -173,7 +173,6 @@ static void amigaone_machine_init(MachineClass *mc)
mc->default_display = "std";
mc->default_ram_id = "ram";
mc->default_ram_size = 512 * MiB;
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("amigaone", amigaone_machine_init)
diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c
index afad4802cae..70a80333733 100644
--- a/hw/ppc/e500plat.c
+++ b/hw/ppc/e500plat.c
@@ -100,7 +100,6 @@ static void e500plat_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30");
mc->default_ram_id = "mpc8544ds.ram";
mc->default_nic = "virtio-net-pci";
- mc->auto_create_sdcard = true;
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_ETSEC_COMMON);
}
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 869f3f7104b..cb3dc3ab482 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -580,7 +580,6 @@ static void core99_machine_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "cd";
mc->default_display = "std";
mc->default_nic = "sungem";
- mc->auto_create_sdcard = true;
mc->kvm_type = core99_kvm_type;
#ifdef TARGET_PPC64
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("970fx_v3.1");
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 08e30a4a4e9..0dbcea035c3 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -427,7 +427,6 @@ static void heathrow_class_init(ObjectClass *oc, void *data)
mc->default_nic = "ne2k_pci";
mc->ignore_boot_device_suffixes = true;
mc->default_ram_id = "ppc_heathrow.ram";
- mc->auto_create_sdcard = true;
fwc->get_dev_path = heathrow_fw_dev_path;
}
diff --git a/hw/ppc/mpc8544ds.c b/hw/ppc/mpc8544ds.c
index 38bdf453165..d74af766eed 100644
--- a/hw/ppc/mpc8544ds.c
+++ b/hw/ppc/mpc8544ds.c
@@ -62,7 +62,6 @@ static void mpc8544ds_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30");
mc->default_ram_id = "mpc8544ds.ram";
mc->default_nic = "virtio-net-pci";
- mc->auto_create_sdcard = true;
}
#define TYPE_MPC8544DS_MACHINE MACHINE_TYPE_NAME("mpc8544ds")
diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c
index 479dcfe809f..b057672e829 100644
--- a/hw/ppc/pegasos2.c
+++ b/hw/ppc/pegasos2.c
@@ -604,7 +604,6 @@ static void pegasos2_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("7457_v1.2");
mc->default_ram_id = "pegasos2.ram";
mc->default_ram_size = 512 * MiB;
- mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
vhc->cpu_in_nested = pegasos2_cpu_in_nested;
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 15fbbf6c157..11fd477b71b 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -2878,7 +2878,6 @@ static void pnv_machine_class_init(ObjectClass *oc, void *data)
/* Pnv provides a AHCI device for storage */
mc->block_default_type = IF_IDE;
mc->no_parallel = 1;
- mc->auto_create_sdcard = true;
mc->default_boot_order = NULL;
/*
* RAM defaults to less than 2048 for 32-bit hosts, and large
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 8946b5173c5..969cac345ac 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -351,7 +351,6 @@ static void ppc405_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 128 * MiB;
mc->default_ram_id = "ppc405.ram";
mc->deprecation_reason = "machine is old and unmaintained";
- mc->auto_create_sdcard = true;
}
static const TypeInfo ppc405_machine_type = {
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
index 081a993ef02..099fda39092 100644
--- a/hw/ppc/ppc440_bamboo.c
+++ b/hw/ppc/ppc440_bamboo.c
@@ -268,7 +268,6 @@ static void bamboo_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440epb");
mc->default_ram_id = "ppc4xx.sdram";
mc->default_nic = "e1000";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("bamboo", bamboo_machine_init)
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 85bfc2fd4f0..3e68d8e6e20 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -428,7 +428,6 @@ static void ibm_40p_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("604");
mc->default_display = "std";
mc->default_nic = "pcnet";
- mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index d9c871ef205..3ecae6a9504 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -524,7 +524,6 @@ static void sam460ex_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("460exb");
mc->default_ram_size = 512 * MiB;
mc->default_ram_id = "ppc4xx.sdram";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("sam460ex", sam460ex_machine_init)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 42b07fadd9d..f3a4b4235d4 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4594,7 +4594,6 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = SPAPR_IRQ_NR_IPIS;
mc->no_parallel = 1;
- mc->auto_create_sdcard = true;
mc->default_boot_order = "";
mc->default_ram_size = 512 * MiB;
mc->default_ram_id = "ppc_spapr.ram";
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index e71d04d2ce1..f87c221d076 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -289,7 +289,6 @@ static void virtex_machine_init(MachineClass *mc)
mc->init = virtex_init;
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440-xilinx");
mc->default_ram_id = "ram";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("virtex-ml507", virtex_machine_init)
diff --git a/hw/remote/machine.c b/hw/remote/machine.c
index fa4a1bb815a..fdc6c441bbd 100644
--- a/hw/remote/machine.c
+++ b/hw/remote/machine.c
@@ -128,7 +128,6 @@ static void remote_machine_class_init(ObjectClass *oc, void *data)
mc->init = remote_machine_init;
mc->desc = "Experimental remote machine";
- mc->auto_create_sdcard = true;
hc->unplug = remote_machine_dev_unplug_cb;
diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index de3b708bc57..88c8f12c101 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -166,7 +166,6 @@ static void rx_gdbsim_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RX62N_CPU;
mc->default_ram_size = 16 * MiB;
mc->default_ram_id = "ext-sdram";
- mc->auto_create_sdcard = true;
}
static void rx62n7_class_init(ObjectClass *oc, void *data)
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index e34deb33dce..d68c94e82ef 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -383,7 +383,6 @@ static void r2d_machine_init(MachineClass *mc)
mc->block_default_type = IF_IDE;
mc->default_cpu_type = TYPE_SH7751R_CPU;
mc->default_nic = "rtl8139";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("r2d", r2d_machine_init)
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index 3bd24495758..0aeaad3becc 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -440,7 +440,6 @@ static void leon3_generic_machine_init(MachineClass *mc)
mc->default_cpu_type = SPARC_CPU_TYPE_NAME("LEON3");
mc->default_ram_id = "leon3.ram";
mc->max_cpus = MAX_CPUS;
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("leon3_generic", leon3_generic_machine_init)
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index d555548a1ca..a48d3622c5a 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -1113,7 +1113,6 @@ static void sun4m_machine_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "c";
mc->default_display = "tcx";
mc->default_ram_id = "sun4m.ram";
- mc->auto_create_sdcard = true;
}
static void ss5_class_init(ObjectClass *oc, void *data)
diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index 37004b99c4e..805ba6b1e3d 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -167,7 +167,6 @@ static void niagara_class_init(ObjectClass *oc, void *data)
mc->default_boot_order = "c";
mc->default_cpu_type = SPARC_CPU_TYPE_NAME("Sun-UltraSparc-T1");
mc->default_ram_id = "sun4v-partition.ram";
- mc->auto_create_sdcard = true;
}
static const TypeInfo niagara_type = {
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 6e9a3c5a2e5..8ab5cf0461f 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -809,7 +809,6 @@ static void sun4u_class_init(ObjectClass *oc, void *data)
mc->default_display = "std";
mc->default_nic = "sunhme";
mc->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
- mc->auto_create_sdcard = true;
fwc->get_dev_path = sun4u_fw_dev_path;
compat_props_add(mc->compat_props, hw_compat_sparc64, hw_compat_sparc64_len);
}
@@ -837,7 +836,6 @@ static void sun4v_class_init(ObjectClass *oc, void *data)
mc->default_display = "std";
mc->default_nic = "sunhme";
mc->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
- mc->auto_create_sdcard = true;
}
static const TypeInfo sun4v_type = {
diff --git a/hw/tricore/triboard.c b/hw/tricore/triboard.c
index d4550507a99..f5baa8ccbb3 100644
--- a/hw/tricore/triboard.c
+++ b/hw/tricore/triboard.c
@@ -73,7 +73,6 @@ static void triboard_machine_tc277d_class_init(ObjectClass *oc,
mc->init = triboard_machine_init;
mc->desc = "Infineon AURIX TriBoard TC277 (D-Step)";
mc->max_cpus = 1;
- mc->auto_create_sdcard = true;
amc->soc_name = "tc277d-soc";
};
diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c
index 9299cd5394a..3facfdfd611 100644
--- a/hw/tricore/tricore_testboard.c
+++ b/hw/tricore/tricore_testboard.c
@@ -111,7 +111,6 @@ static void ttb_machine_init(MachineClass *mc)
mc->desc = "a minimal TriCore board";
mc->init = tricoreboard_init;
mc->default_cpu_type = TRICORE_CPU_TYPE_NAME("tc1796");
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("tricore_testboard", ttb_machine_init)
diff --git a/hw/xen/xen-pvh-common.c b/hw/xen/xen-pvh-common.c
index 9df50cd5382..9c21fa858d3 100644
--- a/hw/xen/xen-pvh-common.c
+++ b/hw/xen/xen-pvh-common.c
@@ -381,7 +381,6 @@ static void xen_pvh_class_init(ObjectClass *oc, void *data)
mc->default_machine_opts = "accel=xen";
/* Set to zero to make sure that the real ram size is passed. */
mc->default_ram_size = 0;
- mc->auto_create_sdcard = true;
}
static const TypeInfo xen_pvh_info = {
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index abdc5bc9a31..99c02492ef9 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -67,7 +67,6 @@ static void xenpv_machine_init(MachineClass *mc)
mc->init = xen_init_pv;
mc->max_cpus = 1;
mc->default_machine_opts = "accel=xen";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("xenpv", xenpv_machine_init)
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index 989cfd49182..1cea29c66d4 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -125,7 +125,6 @@ static void xtensa_sim_machine_init(MachineClass *mc)
mc->max_cpus = 4;
mc->no_serial = 1;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("sim", xtensa_sim_machine_init)
diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c
index 0a78ab3a6f9..b08404fc17c 100644
--- a/hw/xtensa/virt.c
+++ b/hw/xtensa/virt.c
@@ -122,7 +122,6 @@ static void xtensa_virt_machine_init(MachineClass *mc)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_nic = "virtio-net-pci";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("virt", xtensa_virt_machine_init)
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index e00ae9d2e21..3f3677f1c9a 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -594,7 +594,6 @@ static void xtfpga_lx60_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 64 * MiB;
- mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_lx60_type = {
@@ -612,7 +611,6 @@ static void xtfpga_lx60_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 64 * MiB;
- mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_lx60_nommu_type = {
@@ -630,7 +628,6 @@ static void xtfpga_lx200_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 96 * MiB;
- mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_lx200_type = {
@@ -648,7 +645,6 @@ static void xtfpga_lx200_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 96 * MiB;
- mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_lx200_nommu_type = {
@@ -666,7 +662,6 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 512 * MiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE;
- mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_ml605_type = {
@@ -684,7 +679,6 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 256 * MiB;
- mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_ml605_nommu_type = {
@@ -702,7 +696,6 @@ static void xtfpga_kc705_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
mc->default_ram_size = 1 * GiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE;
- mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_kc705_type = {
@@ -720,7 +713,6 @@ static void xtfpga_kc705_nommu_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
mc->default_ram_size = 256 * MiB;
- mc->auto_create_sdcard = true;
}
static const TypeInfo xtfpga_kc705_nommu_type = {
diff --git a/tests/qemu-iotests/172.out b/tests/qemu-iotests/172.out
index 07eebf35836..146fc723883 100644
--- a/tests/qemu-iotests/172.out
+++ b/tests/qemu-iotests/172.out
@@ -68,9 +68,6 @@ floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -125,9 +122,6 @@ ide1-cd0: [not inserted]
floppy0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -183,9 +177,6 @@ floppy1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -265,9 +256,6 @@ floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -322,9 +310,6 @@ ide1-cd0: [not inserted]
floppy0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -380,9 +365,6 @@ floppy1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -422,9 +404,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -461,9 +440,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -519,9 +495,6 @@ none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -586,9 +559,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -644,9 +614,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -702,9 +669,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -760,9 +724,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -827,9 +788,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -885,9 +843,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -930,9 +885,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -1106,9 +1058,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -1145,9 +1094,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -1187,9 +1133,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
@@ -1226,9 +1169,6 @@ none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
ide1-cd0: [not inserted]
Attached to: /machine/unattached/device[N]
Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
(qemu) quit
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 24/32] hw/arm: Remove all invalid uses of auto_create_sdcard=true
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (22 preceding siblings ...)
2025-02-10 20:41 ` [PULL 23/32] hw/boards: Do not create unusable default if=sd drives Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 25/32] hw/riscv: " Philippe Mathieu-Daudé
` (8 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth
MachineClass::auto_create_sdcard is only useful to automatically
create a SD card, attach a IF_SD block drive to it and plug the
card onto a SD bus. None of the ARM machines modified by this
commit try to use the IF_SD interface.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250204200934.65279-6-philmd@linaro.org>
---
hw/arm/aspeed.c | 1 -
hw/arm/b-l475e-iot01a.c | 1 -
hw/arm/collie.c | 1 -
hw/arm/digic_boards.c | 1 -
hw/arm/highbank.c | 2 --
hw/arm/kzm.c | 1 -
hw/arm/microbit.c | 1 -
hw/arm/mps2-tz.c | 4 ----
hw/arm/mps2.c | 4 ----
hw/arm/mps3r.c | 1 -
hw/arm/msf2-som.c | 1 -
hw/arm/musca.c | 2 --
hw/arm/musicpal.c | 1 -
hw/arm/netduino2.c | 1 -
hw/arm/netduinoplus2.c | 1 -
hw/arm/olimex-stm32-h405.c | 1 -
hw/arm/sbsa-ref.c | 1 -
hw/arm/stellaris.c | 1 -
hw/arm/stm32vldiscovery.c | 1 -
hw/arm/virt.c | 1 -
hw/arm/xen-pvh.c | 1 -
21 files changed, 29 deletions(-)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index f3ba90896c0..98bf071139b 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -1658,7 +1658,6 @@ static void aspeed_minibmc_machine_ast1030_evb_class_init(ObjectClass *oc,
amc->spi_model = "w25q256";
amc->num_cs = 2;
amc->macs_mask = 0;
- mc->auto_create_sdcard = true;
aspeed_machine_class_init_cpus_defaults(mc);
}
diff --git a/hw/arm/b-l475e-iot01a.c b/hw/arm/b-l475e-iot01a.c
index f05ee0fee0f..c9a5209216c 100644
--- a/hw/arm/b-l475e-iot01a.c
+++ b/hw/arm/b-l475e-iot01a.c
@@ -120,7 +120,6 @@ static void bl475e_machine_init(ObjectClass *oc, void *data)
mc->desc = "B-L475E-IOT01A Discovery Kit (Cortex-M4)";
mc->init = bl475e_init;
mc->valid_cpu_types = machine_valid_cpu_types;
- mc->auto_create_sdcard = true;
/* SRAM pre-allocated as part of the SoC instantiation */
mc->default_ram_size = 0;
diff --git a/hw/arm/collie.c b/hw/arm/collie.c
index 864c66193b1..eaa5c52d45a 100644
--- a/hw/arm/collie.c
+++ b/hw/arm/collie.c
@@ -79,7 +79,6 @@ static void collie_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("sa1110");
mc->default_ram_size = RAM_SIZE;
mc->default_ram_id = "strongarm.sdram";
- mc->auto_create_sdcard = true;
}
static const TypeInfo collie_machine_typeinfo = {
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index f334c1fb02c..2492fafeb85 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -143,7 +143,6 @@ static void canon_a1100_machine_init(MachineClass *mc)
mc->ignore_memory_transaction_failures = true;
mc->default_ram_size = 64 * MiB;
mc->default_ram_id = "ram";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("canon-a1100", canon_a1100_machine_init)
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index 975fd7a094a..495704d9726 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -357,7 +357,6 @@ static void highbank_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "highbank.dram";
- mc->auto_create_sdcard = true;
}
static const TypeInfo highbank_type = {
@@ -382,7 +381,6 @@ static void midway_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 4;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "highbank.dram";
- mc->auto_create_sdcard = true;
}
static const TypeInfo midway_type = {
diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c
index 736eabab664..08d2b3025cf 100644
--- a/hw/arm/kzm.c
+++ b/hw/arm/kzm.c
@@ -137,7 +137,6 @@ static void kzm_machine_init(MachineClass *mc)
mc->init = kzm_init;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_id = "kzm.ram";
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("kzm", kzm_machine_init)
diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c
index fb099508324..3f56fb45ce1 100644
--- a/hw/arm/microbit.c
+++ b/hw/arm/microbit.c
@@ -67,7 +67,6 @@ static void microbit_machine_class_init(ObjectClass *oc, void *data)
mc->desc = "BBC micro:bit (Cortex-M0)";
mc->init = microbit_init;
mc->max_cpus = 1;
- mc->auto_create_sdcard = true;
}
static const TypeInfo microbit_info = {
diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
index 91b8ae6d384..13ed868b6b9 100644
--- a/hw/arm/mps2-tz.c
+++ b/hw/arm/mps2-tz.c
@@ -1320,7 +1320,6 @@ static void mps2tz_an505_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN505;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33");
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045050;
mmc->sysclk_frq = 20 * 1000 * 1000; /* 20MHz */
mmc->apb_periph_frq = mmc->sysclk_frq;
@@ -1355,7 +1354,6 @@ static void mps2tz_an521_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN521;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33");
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045210;
mmc->sysclk_frq = 20 * 1000 * 1000; /* 20MHz */
mmc->apb_periph_frq = mmc->sysclk_frq;
@@ -1390,7 +1388,6 @@ static void mps3tz_an524_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN524;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33");
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045240;
mmc->sysclk_frq = 32 * 1000 * 1000; /* 32MHz */
mmc->apb_periph_frq = mmc->sysclk_frq;
@@ -1430,7 +1427,6 @@ static void mps3tz_an547_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN547;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m55");
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
mmc->scc_id = 0x41055470;
mmc->sysclk_frq = 32 * 1000 * 1000; /* 32MHz */
mmc->apb_periph_frq = 25 * 1000 * 1000; /* 25MHz */
diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c
index 40eb5d16187..3f8db0cab60 100644
--- a/hw/arm/mps2.c
+++ b/hw/arm/mps2.c
@@ -487,7 +487,6 @@ static void mps2_an385_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN385;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
mmc->scc_id = 0x41043850;
mmc->psram_base = 0x21000000;
mmc->ethernet_base = 0x40200000;
@@ -507,7 +506,6 @@ static void mps2_an386_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN386;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m4");
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
mmc->scc_id = 0x41043860;
mmc->psram_base = 0x21000000;
mmc->ethernet_base = 0x40200000;
@@ -527,7 +525,6 @@ static void mps2_an500_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN500;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m7");
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045000;
mmc->psram_base = 0x60000000;
mmc->ethernet_base = 0xa0000000;
@@ -547,7 +544,6 @@ static void mps2_an511_class_init(ObjectClass *oc, void *data)
mmc->fpga_type = FPGA_AN511;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
mmc->scc_id = 0x41045110;
mmc->psram_base = 0x21000000;
mmc->ethernet_base = 0x40200000;
diff --git a/hw/arm/mps3r.c b/hw/arm/mps3r.c
index f26d1cfb2c4..1bddb5e822f 100644
--- a/hw/arm/mps3r.c
+++ b/hw/arm/mps3r.c
@@ -618,7 +618,6 @@ static void mps3r_an536_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 2;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-r52");
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
mmc->raminfo = an536_raminfo;
mps3r_set_default_ram_info(mmc);
}
diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c
index 6d3f0a89e0b..9b20f1e2c98 100644
--- a/hw/arm/msf2-som.c
+++ b/hw/arm/msf2-som.c
@@ -106,7 +106,6 @@ static void emcraft_sf2_machine_init(MachineClass *mc)
mc->desc = "SmartFusion2 SOM kit from Emcraft (M2S010)";
mc->init = emcraft_sf2_s2s010_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("emcraft-sf2", emcraft_sf2_machine_init)
diff --git a/hw/arm/musca.c b/hw/arm/musca.c
index 6f19b7d58a0..e9c092abc3d 100644
--- a/hw/arm/musca.c
+++ b/hw/arm/musca.c
@@ -615,7 +615,6 @@ static void musca_a_class_init(ObjectClass *oc, void *data)
MuscaMachineClass *mmc = MUSCA_MACHINE_CLASS(oc);
mc->desc = "ARM Musca-A board (dual Cortex-M33)";
- mc->auto_create_sdcard = true;
mmc->type = MUSCA_A;
mmc->init_svtor = 0x10200000;
mmc->sram_addr_width = 15;
@@ -630,7 +629,6 @@ static void musca_b1_class_init(ObjectClass *oc, void *data)
MuscaMachineClass *mmc = MUSCA_MACHINE_CLASS(oc);
mc->desc = "ARM Musca-B1 board (dual Cortex-M33)";
- mc->auto_create_sdcard = true;
mmc->type = MUSCA_B1;
/*
* This matches the DAPlink firmware which boots from QSPI. There
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index fd2975753ee..48a32c24079 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -1342,7 +1342,6 @@ static void musicpal_machine_init(MachineClass *mc)
mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
mc->default_ram_size = MP_RAM_DEFAULT_SIZE;
mc->default_ram_id = "musicpal.ram";
- mc->auto_create_sdcard = true;
machine_add_audiodev_property(mc);
}
diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c
index fca32d45924..df793c77fe1 100644
--- a/hw/arm/netduino2.c
+++ b/hw/arm/netduino2.c
@@ -63,7 +63,6 @@ static void netduino2_machine_init(MachineClass *mc)
mc->init = netduino2_init;
mc->valid_cpu_types = valid_cpu_types;
mc->ignore_memory_transaction_failures = true;
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("netduino2", netduino2_machine_init)
diff --git a/hw/arm/netduinoplus2.c b/hw/arm/netduinoplus2.c
index e1a59fb9e23..81b6334cf72 100644
--- a/hw/arm/netduinoplus2.c
+++ b/hw/arm/netduinoplus2.c
@@ -63,7 +63,6 @@ static void netduinoplus2_machine_init(MachineClass *mc)
mc->desc = "Netduino Plus 2 Machine (Cortex-M4)";
mc->init = netduinoplus2_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("netduinoplus2", netduinoplus2_machine_init)
diff --git a/hw/arm/olimex-stm32-h405.c b/hw/arm/olimex-stm32-h405.c
index 23f686de876..1f15620f9fd 100644
--- a/hw/arm/olimex-stm32-h405.c
+++ b/hw/arm/olimex-stm32-h405.c
@@ -66,7 +66,6 @@ static void olimex_stm32_h405_machine_init(MachineClass *mc)
mc->desc = "Olimex STM32-H405 (Cortex-M4)";
mc->init = olimex_stm32_h405_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
/* SRAM pre-allocated as part of the SoC instantiation */
mc->default_ram_size = 0;
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 02c72a62a37..e720de30641 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -900,7 +900,6 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
mc->minimum_page_bits = 12;
mc->block_default_type = IF_IDE;
mc->no_cdrom = 1;
- mc->auto_create_sdcard = true;
mc->default_nic = "e1000e";
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "sbsa-ref.ram";
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index 25283fd6233..33611113602 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -1421,7 +1421,6 @@ static void lm3s811evb_class_init(ObjectClass *oc, void *data)
mc->init = lm3s811evb_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
- mc->auto_create_sdcard = true;
}
static const TypeInfo lm3s811evb_type = {
diff --git a/hw/arm/stm32vldiscovery.c b/hw/arm/stm32vldiscovery.c
index a71da292b84..e6c1f5b8d7d 100644
--- a/hw/arm/stm32vldiscovery.c
+++ b/hw/arm/stm32vldiscovery.c
@@ -66,7 +66,6 @@ static void stm32vldiscovery_machine_init(MachineClass *mc)
mc->desc = "ST STM32VLDISCOVERY (Cortex-M3)";
mc->init = stm32vldiscovery_init;
mc->valid_cpu_types = valid_cpu_types;
- mc->auto_create_sdcard = true;
}
DEFINE_MACHINE("stm32vldiscovery", stm32vldiscovery_machine_init)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 192c2a5ac78..3448200e3bf 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3125,7 +3125,6 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
#endif
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
- mc->auto_create_sdcard = true;
mc->pci_allow_0_address = true;
/* We know we will never create a pre-ARMv7 CPU which needs 1K pages */
mc->minimum_page_bits = 12;
diff --git a/hw/arm/xen-pvh.c b/hw/arm/xen-pvh.c
index ce4cc4fce93..d1509bd235d 100644
--- a/hw/arm/xen-pvh.c
+++ b/hw/arm/xen-pvh.c
@@ -75,7 +75,6 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
* mc->max_cpus, QEMU will bail out with an error message.
*/
mc->max_cpus = GUEST_MAX_VCPUS;
- mc->auto_create_sdcard = true;
/* Xen/ARM does not use buffered IOREQs. */
xpc->handle_bufioreq = HVM_IOREQSRV_BUFIOREQ_OFF;
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 25/32] hw/riscv: Remove all invalid uses of auto_create_sdcard=true
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (23 preceding siblings ...)
2025-02-10 20:41 ` [PULL 24/32] hw/arm: Remove all invalid uses of auto_create_sdcard=true Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 26/32] hw/boards: Ensure machine setting auto_create_sdcard expose a SD Bus Philippe Mathieu-Daudé
` (7 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth
MachineClass::auto_create_sdcard is only useful to automatically
create a SD card, attach a IF_SD block drive to it and plug the
card onto a SD bus. None of the RISCV machines modified by this
commit try to use the IF_SD interface.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250204200934.65279-7-philmd@linaro.org>
---
hw/riscv/opentitan.c | 1 -
hw/riscv/shakti_c.c | 1 -
hw/riscv/sifive_e.c | 1 -
hw/riscv/spike.c | 1 -
hw/riscv/virt.c | 1 -
5 files changed, 5 deletions(-)
diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
index d78a96c5354..b9e56235d87 100644
--- a/hw/riscv/opentitan.c
+++ b/hw/riscv/opentitan.c
@@ -121,7 +121,6 @@ static void opentitan_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_IBEX;
mc->default_ram_id = "riscv.lowrisc.ibex.ram";
mc->default_ram_size = ibex_memmap[IBEX_DEV_RAM].size;
- mc->auto_create_sdcard = true;
}
static void lowrisc_ibex_soc_init(Object *obj)
diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
index efe814b5868..e2242b97d0c 100644
--- a/hw/riscv/shakti_c.c
+++ b/hw/riscv/shakti_c.c
@@ -84,7 +84,6 @@ static void shakti_c_machine_class_init(ObjectClass *klass, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_SHAKTI_C;
mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_id = "riscv.shakti.c.ram";
- mc->auto_create_sdcard = true;
}
static const TypeInfo shakti_c_machine_type_info = {
diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
index 164eb3ab83b..73d3b74281c 100644
--- a/hw/riscv/sifive_e.c
+++ b/hw/riscv/sifive_e.c
@@ -153,7 +153,6 @@ static void sifive_e_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = SIFIVE_E_CPU;
mc->default_ram_id = "riscv.sifive.e.ram";
mc->default_ram_size = sifive_e_memmap[SIFIVE_E_DEV_DTIM].size;
- mc->auto_create_sdcard = true;
object_class_property_add_bool(oc, "revb", sifive_e_machine_get_revb,
sifive_e_machine_set_revb);
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index 1ea35937e15..74a20016f14 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -358,7 +358,6 @@ static void spike_machine_class_init(ObjectClass *oc, void *data)
/* platform instead of architectural choice */
mc->cpu_cluster_has_numa_boundary = true;
mc->default_ram_id = "riscv.spike.ram";
- mc->auto_create_sdcard = true;
object_class_property_add_str(oc, "signature", NULL, spike_set_signature);
object_class_property_set_description(oc, "signature",
"File to write ACT test signature");
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 2aa420f6e55..241389d72f8 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1918,7 +1918,6 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->default_cpu_type = TYPE_RISCV_CPU_BASE;
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
- mc->auto_create_sdcard = true;
mc->pci_allow_0_address = true;
mc->possible_cpu_arch_ids = riscv_numa_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props;
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 26/32] hw/boards: Ensure machine setting auto_create_sdcard expose a SD Bus
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (24 preceding siblings ...)
2025-02-10 20:41 ` [PULL 25/32] hw/riscv: " Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 27/32] tests/functional: Explicit endianness of microblaze assets Philippe Mathieu-Daudé
` (6 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth
Using the auto_create_sdcard feature without SD Bus is irrelevant.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20250204200934.65279-8-philmd@linaro.org>
---
system/vl.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/system/vl.c b/system/vl.c
index 2ce7d8c49d7..66862807be4 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -53,6 +53,7 @@
#include "hw/usb.h"
#include "hw/isa/isa.h"
#include "hw/scsi/scsi.h"
+#include "hw/sd/sd.h"
#include "hw/display/vga.h"
#include "hw/firmware/smbios.h"
#include "hw/acpi/acpi.h"
@@ -2661,12 +2662,27 @@ static void qemu_init_displays(void)
static void qemu_init_board(void)
{
+ MachineClass *machine_class = MACHINE_GET_CLASS(current_machine);
+
/* process plugin before CPUs are created, but once -smp has been parsed */
qemu_plugin_load_list(&plugin_list, &error_fatal);
/* From here on we enter MACHINE_PHASE_INITIALIZED. */
machine_run_board_init(current_machine, mem_path, &error_fatal);
+ if (machine_class->auto_create_sdcard) {
+ bool ambigous;
+
+ /* Ensure there is a SD bus available to create SD card on */
+ Object *obj = object_resolve_path_type("", TYPE_SD_BUS, &ambigous);
+ if (!obj && !ambigous) {
+ fprintf(stderr, "Can not create sd-card on '%s' machine"
+ " because it lacks a sd-bus\n",
+ machine_class->name);
+ abort();
+ }
+ }
+
drive_check_orphaned();
realtime_init();
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 27/32] tests/functional: Explicit endianness of microblaze assets
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (25 preceding siblings ...)
2025-02-10 20:41 ` [PULL 26/32] hw/boards: Ensure machine setting auto_create_sdcard expose a SD Bus Philippe Mathieu-Daudé
@ 2025-02-10 20:41 ` Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 28/32] tests/functional: Allow microblaze tests to take a machine name argument Philippe Mathieu-Daudé
` (5 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Richard Henderson, Thomas Huth
The archive used in test_microblaze_s3adsp1800.py (testing a
big-endian target) contains a big-endian kernel. Rename using
the _BE suffix.
Similarly, the archive in test_microblazeel_s3adsp1800 (testing
a little-endian target) contains a little-endian kernel. Rename
using _LE suffix.
These changes will help when adding cross-endian kernel tests.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250206131052.30207-13-philmd@linaro.org>
---
tests/functional/test_microblaze_s3adsp1800.py | 6 +++---
tests/functional/test_microblazeel_s3adsp1800.py | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/functional/test_microblaze_s3adsp1800.py
index 2c4464bd05a..fac364b1ea9 100755
--- a/tests/functional/test_microblaze_s3adsp1800.py
+++ b/tests/functional/test_microblaze_s3adsp1800.py
@@ -15,14 +15,14 @@ class MicroblazeMachine(QemuSystemTest):
timeout = 90
- ASSET_IMAGE = Asset(
+ ASSET_IMAGE_BE = Asset(
('https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/'
'day17.tar.xz'),
'3ba7439dfbea7af4876662c97f8e1f0cdad9231fc166e4861d17042489270057')
- def test_microblaze_s3adsp1800(self):
+ def test_microblaze_s3adsp1800_be(self):
self.set_machine('petalogix-s3adsp1800')
- self.archive_extract(self.ASSET_IMAGE)
+ self.archive_extract(self.ASSET_IMAGE_BE)
self.vm.set_console()
self.vm.add_args('-kernel',
self.scratch_file('day17', 'ballerina.bin'))
diff --git a/tests/functional/test_microblazeel_s3adsp1800.py b/tests/functional/test_microblazeel_s3adsp1800.py
index c382afe6bfa..5d353dba5d2 100755
--- a/tests/functional/test_microblazeel_s3adsp1800.py
+++ b/tests/functional/test_microblazeel_s3adsp1800.py
@@ -17,14 +17,14 @@ class MicroblazeelMachine(QemuSystemTest):
timeout = 90
- ASSET_IMAGE = Asset(
+ ASSET_IMAGE_LE = Asset(
('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22')
- def test_microblazeel_s3adsp1800(self):
+ def test_microblazeel_s3adsp1800_le(self):
self.require_netdev('user')
self.set_machine('petalogix-s3adsp1800')
- self.archive_extract(self.ASSET_IMAGE)
+ self.archive_extract(self.ASSET_IMAGE_LE)
self.vm.set_console()
self.vm.add_args('-kernel', self.scratch_file('day13', 'xmaton.bin'))
tftproot = self.scratch_file('day13')
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 28/32] tests/functional: Allow microblaze tests to take a machine name argument
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (26 preceding siblings ...)
2025-02-10 20:41 ` [PULL 27/32] tests/functional: Explicit endianness of microblaze assets Philippe Mathieu-Daudé
@ 2025-02-10 20:42 ` Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 29/32] tests/functional: Remove sleep() kludges from microblaze tests Philippe Mathieu-Daudé
` (4 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth
Make microblaze tests a bit more generic.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250206131052.30207-14-philmd@linaro.org>
---
tests/functional/test_microblaze_s3adsp1800.py | 7 +++++--
tests/functional/test_microblazeel_s3adsp1800.py | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/functional/test_microblaze_s3adsp1800.py
index fac364b1ea9..c4226f49cf3 100755
--- a/tests/functional/test_microblaze_s3adsp1800.py
+++ b/tests/functional/test_microblaze_s3adsp1800.py
@@ -20,8 +20,8 @@ class MicroblazeMachine(QemuSystemTest):
'day17.tar.xz'),
'3ba7439dfbea7af4876662c97f8e1f0cdad9231fc166e4861d17042489270057')
- def test_microblaze_s3adsp1800_be(self):
- self.set_machine('petalogix-s3adsp1800')
+ def do_ballerina_be_test(self, machine):
+ self.set_machine(machine)
self.archive_extract(self.ASSET_IMAGE_BE)
self.vm.set_console()
self.vm.add_args('-kernel',
@@ -34,5 +34,8 @@ def test_microblaze_s3adsp1800_be(self):
# message, that's why we don't test for a later string here. This
# needs some investigation by a microblaze wizard one day...
+ def test_microblaze_s3adsp1800_legacy_be(self):
+ self.do_ballerina_be_test('petalogix-s3adsp1800')
+
if __name__ == '__main__':
QemuSystemTest.main()
diff --git a/tests/functional/test_microblazeel_s3adsp1800.py b/tests/functional/test_microblazeel_s3adsp1800.py
index 5d353dba5d2..715ef3f79ac 100755
--- a/tests/functional/test_microblazeel_s3adsp1800.py
+++ b/tests/functional/test_microblazeel_s3adsp1800.py
@@ -21,9 +21,9 @@ class MicroblazeelMachine(QemuSystemTest):
('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22')
- def test_microblazeel_s3adsp1800_le(self):
+ def do_xmaton_le_test(self, machine):
self.require_netdev('user')
- self.set_machine('petalogix-s3adsp1800')
+ self.set_machine(machine)
self.archive_extract(self.ASSET_IMAGE_LE)
self.vm.set_console()
self.vm.add_args('-kernel', self.scratch_file('day13', 'xmaton.bin'))
@@ -38,5 +38,8 @@ def test_microblazeel_s3adsp1800_le(self):
'tftp -g -r xmaton.png 10.0.2.2 ; md5sum xmaton.png',
'821cd3cab8efd16ad6ee5acc3642a8ea')
+ def test_microblaze_s3adsp1800_legacy_le(self):
+ self.do_xmaton_le_test('petalogix-s3adsp1800')
+
if __name__ == '__main__':
QemuSystemTest.main()
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 29/32] tests/functional: Remove sleep() kludges from microblaze tests
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (27 preceding siblings ...)
2025-02-10 20:42 ` [PULL 28/32] tests/functional: Allow microblaze tests to take a machine name argument Philippe Mathieu-Daudé
@ 2025-02-10 20:42 ` Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 30/32] tests/functional: Have microblaze tests inherit common parent class Philippe Mathieu-Daudé
` (3 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth, Richard Henderson
Commit f0ec14c78c4 ("tests/avocado: Fix console data loss") fixed
QEMUMachine's problem with console, we don't need to use the sleep()
kludges.
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250206131052.30207-15-philmd@linaro.org>
---
tests/functional/test_microblazeel_s3adsp1800.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tests/functional/test_microblazeel_s3adsp1800.py b/tests/functional/test_microblazeel_s3adsp1800.py
index 715ef3f79ac..60aab4a45e8 100755
--- a/tests/functional/test_microblazeel_s3adsp1800.py
+++ b/tests/functional/test_microblazeel_s3adsp1800.py
@@ -7,8 +7,7 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-import time
-from qemu_test import exec_command, exec_command_and_wait_for_pattern
+from qemu_test import exec_command_and_wait_for_pattern
from qemu_test import QemuSystemTest, Asset
from qemu_test import wait_for_console_pattern
@@ -31,9 +30,8 @@ def do_xmaton_le_test(self, machine):
self.vm.add_args('-nic', f'user,tftp={tftproot}')
self.vm.launch()
wait_for_console_pattern(self, 'QEMU Advent Calendar 2023')
- time.sleep(0.1)
- exec_command(self, 'root')
- time.sleep(0.1)
+ wait_for_console_pattern(self, 'buildroot login:')
+ exec_command_and_wait_for_pattern(self, 'root', '#')
exec_command_and_wait_for_pattern(self,
'tftp -g -r xmaton.png 10.0.2.2 ; md5sum xmaton.png',
'821cd3cab8efd16ad6ee5acc3642a8ea')
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 30/32] tests/functional: Have microblaze tests inherit common parent class
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (28 preceding siblings ...)
2025-02-10 20:42 ` [PULL 29/32] tests/functional: Remove sleep() kludges from microblaze tests Philippe Mathieu-Daudé
@ 2025-02-10 20:42 ` Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 31/32] hw/riscv/opentitan: Include missing 'exec/address-spaces.h' header Philippe Mathieu-Daudé
` (2 subsequent siblings)
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Thomas Huth
Have the MicroblazeMachine class being common to both
MicroblazeBigEndianMachine and MicroblazeLittleEndianMachine
classes. Move the xmaton and ballerina tests to the parent class.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250206131052.30207-16-philmd@linaro.org>
---
.../functional/test_microblaze_s3adsp1800.py | 23 +++++++++++++++
.../test_microblazeel_s3adsp1800.py | 29 ++-----------------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/functional/test_microblaze_s3adsp1800.py
index c4226f49cf3..177c8a685bc 100755
--- a/tests/functional/test_microblaze_s3adsp1800.py
+++ b/tests/functional/test_microblaze_s3adsp1800.py
@@ -7,6 +7,7 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
+from qemu_test import exec_command_and_wait_for_pattern
from qemu_test import QemuSystemTest, Asset
from qemu_test import wait_for_console_pattern
@@ -20,6 +21,10 @@ class MicroblazeMachine(QemuSystemTest):
'day17.tar.xz'),
'3ba7439dfbea7af4876662c97f8e1f0cdad9231fc166e4861d17042489270057')
+ ASSET_IMAGE_LE = Asset(
+ ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
+ 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22')
+
def do_ballerina_be_test(self, machine):
self.set_machine(machine)
self.archive_extract(self.ASSET_IMAGE_BE)
@@ -34,6 +39,24 @@ def do_ballerina_be_test(self, machine):
# message, that's why we don't test for a later string here. This
# needs some investigation by a microblaze wizard one day...
+ def do_xmaton_le_test(self, machine):
+ self.require_netdev('user')
+ self.set_machine(machine)
+ self.archive_extract(self.ASSET_IMAGE_LE)
+ self.vm.set_console()
+ self.vm.add_args('-kernel', self.scratch_file('day13', 'xmaton.bin'))
+ tftproot = self.scratch_file('day13')
+ self.vm.add_args('-nic', f'user,tftp={tftproot}')
+ self.vm.launch()
+ wait_for_console_pattern(self, 'QEMU Advent Calendar 2023')
+ wait_for_console_pattern(self, 'buildroot login:')
+ exec_command_and_wait_for_pattern(self, 'root', '#')
+ exec_command_and_wait_for_pattern(self,
+ 'tftp -g -r xmaton.png 10.0.2.2 ; md5sum xmaton.png',
+ '821cd3cab8efd16ad6ee5acc3642a8ea')
+
+class MicroblazeBigEndianMachine(MicroblazeMachine):
+
def test_microblaze_s3adsp1800_legacy_be(self):
self.do_ballerina_be_test('petalogix-s3adsp1800')
diff --git a/tests/functional/test_microblazeel_s3adsp1800.py b/tests/functional/test_microblazeel_s3adsp1800.py
index 60aab4a45e8..56645bd0bb2 100755
--- a/tests/functional/test_microblazeel_s3adsp1800.py
+++ b/tests/functional/test_microblazeel_s3adsp1800.py
@@ -7,34 +7,11 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-from qemu_test import exec_command_and_wait_for_pattern
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest
+from test_microblaze_s3adsp1800 import MicroblazeMachine
-class MicroblazeelMachine(QemuSystemTest):
-
- timeout = 90
-
- ASSET_IMAGE_LE = Asset(
- ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
- 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22')
-
- def do_xmaton_le_test(self, machine):
- self.require_netdev('user')
- self.set_machine(machine)
- self.archive_extract(self.ASSET_IMAGE_LE)
- self.vm.set_console()
- self.vm.add_args('-kernel', self.scratch_file('day13', 'xmaton.bin'))
- tftproot = self.scratch_file('day13')
- self.vm.add_args('-nic', f'user,tftp={tftproot}')
- self.vm.launch()
- wait_for_console_pattern(self, 'QEMU Advent Calendar 2023')
- wait_for_console_pattern(self, 'buildroot login:')
- exec_command_and_wait_for_pattern(self, 'root', '#')
- exec_command_and_wait_for_pattern(self,
- 'tftp -g -r xmaton.png 10.0.2.2 ; md5sum xmaton.png',
- '821cd3cab8efd16ad6ee5acc3642a8ea')
+class MicroblazeLittleEndianMachine(MicroblazeMachine):
def test_microblaze_s3adsp1800_legacy_le(self):
self.do_xmaton_le_test('petalogix-s3adsp1800')
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 31/32] hw/riscv/opentitan: Include missing 'exec/address-spaces.h' header
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (29 preceding siblings ...)
2025-02-10 20:42 ` [PULL 30/32] tests/functional: Have microblaze tests inherit common parent class Philippe Mathieu-Daudé
@ 2025-02-10 20:42 ` Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 32/32] hw/net/smc91c111: Ignore attempt to pop from empty RX fifo Philippe Mathieu-Daudé
2025-02-11 18:26 ` [PULL 00/32] Misc HW patches for 2025-02-10 Stefan Hajnoczi
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:42 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Richard Henderson, Alistair Francis
opentitan_machine_init() calls get_system_memory(),
which is declared in "exec/address-spaces.h". Include
it in order to avoid when refactoring unrelated headers:
hw/riscv/opentitan.c:83:29: error: call to undeclared function 'get_system_memory'
83 | MemoryRegion *sys_mem = get_system_memory();
| ^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20250206181827.41557-4-philmd@linaro.org>
---
hw/riscv/opentitan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
index b9e56235d87..98a67fe52a8 100644
--- a/hw/riscv/opentitan.c
+++ b/hw/riscv/opentitan.c
@@ -28,6 +28,7 @@
#include "hw/riscv/boot.h"
#include "qemu/units.h"
#include "system/system.h"
+#include "exec/address-spaces.h"
/*
* This version of the OpenTitan machine currently supports
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* [PULL 32/32] hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (30 preceding siblings ...)
2025-02-10 20:42 ` [PULL 31/32] hw/riscv/opentitan: Include missing 'exec/address-spaces.h' header Philippe Mathieu-Daudé
@ 2025-02-10 20:42 ` Philippe Mathieu-Daudé
2025-02-11 18:26 ` [PULL 00/32] Misc HW patches for 2025-02-10 Stefan Hajnoczi
32 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 20:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, qemu-stable, Philippe Mathieu-Daudé
From: Peter Maydell <peter.maydell@linaro.org>
The SMC91C111 includes an MMU Command register which permits
the guest to remove entries from the RX FIFO. The datasheet
does not specify what happens if the guest tries to do this
when the FIFO is already empty; there are no status registers
containing error bits which might be applicable.
Currently we don't guard at all against pop of an empty
RX FIFO, with the result that we allow the guest to drive
the rx_fifo_len index to negative values, which will cause
smc91c111_receive() to write to the rx_fifo[] array out of
bounds when we receive the next packet.
Instead ignore attempts to pop an empty RX FIFO.
Cc: qemu-stable@nongnu.org
Fixes: 80337b66a8e7 ("NIC emulation for qemu arm-softmmu")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2780
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250207151157.3151776-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/net/smc91c111.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index b18d5c23c39..0e13dfa18b2 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -182,6 +182,15 @@ static void smc91c111_pop_rx_fifo(smc91c111_state *s)
{
int i;
+ if (s->rx_fifo_len == 0) {
+ /*
+ * The datasheet doesn't document what the behaviour is if the
+ * guest tries to pop an empty RX FIFO, and there's no obvious
+ * error status register to report it. Just ignore the attempt.
+ */
+ return;
+ }
+
s->rx_fifo_len--;
if (s->rx_fifo_len) {
for (i = 0; i < s->rx_fifo_len; i++)
--
2.47.1
^ permalink raw reply related [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
` (31 preceding siblings ...)
2025-02-10 20:42 ` [PULL 32/32] hw/net/smc91c111: Ignore attempt to pop from empty RX fifo Philippe Mathieu-Daudé
@ 2025-02-11 18:26 ` Stefan Hajnoczi
2025-02-11 18:48 ` Philippe Mathieu-Daudé
32 siblings, 1 reply; 50+ messages in thread
From: Stefan Hajnoczi @ 2025-02-11 18:26 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: qemu-devel
On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> The following changes since commit 54e91d1523b412b4cff7cb36c898fa9dc133e886:
>
> Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/armbru into staging (2025-02-10 10:47:31 -0500)
>
> are available in the Git repository at:
>
> https://github.com/philmd/qemu.git tags/hw-misc-20250210
>
> for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
>
> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo (2025-02-10 21:30:44 +0100)
>
> ----------------------------------------------------------------
> Misc HW patches
>
> - Use qemu_hexdump_line() in TPM backend (Philippe)
> - Make various Xilinx devices endianness configurable (Philippe)
> - Remove magic number in APIC (Phil)
> - Disable thread-level cache topology (Zhao)
> - Xen QOM style cleanups (Bernhard)
> - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
> - Invert logic of machine no_sdcard flag (Philippe)
> - Housekeeping in MicroBlaze functional tests (Philippe)
Please take a look at this CI failure:
https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
Thanks,
Stefan
> - Prevent out-of-bound access in SMC91C111 RX path (Peter)
>
> ----------------------------------------------------------------
>
> Bernhard Beschow (1):
> hw/xen: Prefer QOM cast for XenLegacyDevice
>
> Peter Maydell (1):
> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
>
> Phil Dennis-Jordan (1):
> hw/intc/apic: Fixes magic number use, removes outdated comment
>
> Philippe Mathieu-Daudé (28):
> backends/tpm: Use qemu_hexdump_line() to avoid sprintf()
> hw/intc/xilinx_intc: Make device endianness configurable
> hw/net/xilinx_ethlite: Make device endianness configurable
> hw/timer/xilinx_timer: Make device endianness configurable
> hw/char/xilinx_uartlite: Make device endianness configurable
> hw/ssi/xilinx_spi: Make device endianness configurable
> hw/arm/xlnx-zynqmp: Use &error_abort for programming errors
> hw/sysbus: Use sizeof(BusState) in main_system_bus_create()
> hw/sysbus: Declare QOM types using DEFINE_TYPES() macro
> hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE
> hw/vfio: Have VFIO_PLATFORM devices inherit from
> DYNAMIC_SYS_BUS_DEVICE
> hw/display: Have RAMFB device inherit from DYNAMIC_SYS_BUS_DEVICE
> hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS_BUS_DEVICE
> hw/net: Have eTSEC device inherit from DYNAMIC_SYS_BUS_DEVICE
> hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE
> hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE
> hw/boards: Convert no_sdcard flag to OnOffAuto tri-state
> hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF
> hw/boards: Rename no_sdcard -> auto_create_sdcard
> hw/boards: Do not create unusable default if=sd drives
> hw/arm: Remove all invalid uses of auto_create_sdcard=true
> hw/riscv: Remove all invalid uses of auto_create_sdcard=true
> hw/boards: Ensure machine setting auto_create_sdcard expose a SD Bus
> tests/functional: Explicit endianness of microblaze assets
> tests/functional: Allow microblaze tests to take a machine name
> argument
> tests/functional: Remove sleep() kludges from microblaze tests
> tests/functional: Have microblaze tests inherit common parent class
> hw/riscv/opentitan: Include missing 'exec/address-spaces.h' header
>
> Zhao Liu (1):
> hw/core/machine: Reject thread level cache
>
> include/hw/boards.h | 2 +-
> include/hw/sysbus.h | 2 +
> include/hw/xen/xen_pvdev.h | 5 +-
> backends/tpm/tpm_util.c | 24 ++++----
> hw/arm/aspeed.c | 20 +++++++
> hw/arm/bananapi_m2u.c | 1 +
> hw/arm/cubieboard.c | 1 +
> hw/arm/exynos4_boards.c | 2 +
> hw/arm/fby35.c | 1 +
> hw/arm/imx25_pdk.c | 1 +
> hw/arm/integratorcp.c | 1 +
> hw/arm/mcimx6ul-evk.c | 1 +
> hw/arm/mcimx7d-sabre.c | 1 +
> hw/arm/npcm7xx_boards.c | 5 ++
> hw/arm/omap_sx1.c | 2 +
> hw/arm/orangepi.c | 1 +
> hw/arm/raspi.c | 5 ++
> hw/arm/raspi4b.c | 1 +
> hw/arm/realview.c | 4 ++
> hw/arm/sabrelite.c | 1 +
> hw/arm/stellaris.c | 1 +
> hw/arm/versatilepb.c | 2 +
> hw/arm/vexpress.c | 2 +
> hw/arm/xilinx_zynq.c | 1 -
> hw/arm/xlnx-versal-virt.c | 1 +
> hw/arm/xlnx-zcu102.c | 1 +
> hw/arm/xlnx-zynqmp.c | 38 ++++--------
> hw/char/xilinx_uartlite.c | 27 +++++----
> hw/core/machine-smp.c | 7 +++
> hw/core/null-machine.c | 1 -
> hw/core/sysbus.c | 54 ++++++++++-------
> hw/display/ramfb-standalone.c | 3 +-
> hw/i386/amd_iommu.c | 2 -
> hw/i386/intel_iommu.c | 2 -
> hw/i386/x86-iommu.c | 2 +-
> hw/intc/apic.c | 3 +-
> hw/intc/xilinx_intc.c | 52 +++++++++++-----
> hw/microblaze/petalogix_ml605_mmu.c | 3 +
> hw/microblaze/petalogix_s3adsp1800_mmu.c | 4 ++
> hw/net/fsl_etsec/etsec.c | 4 +-
> hw/net/smc91c111.c | 9 +++
> hw/net/xilinx_ethlite.c | 20 +++++--
> hw/ppc/virtex_ml507.c | 1 +
> hw/riscv/microchip_pfsoc.c | 1 +
> hw/riscv/opentitan.c | 1 +
> hw/riscv/sifive_u.c | 1 +
> hw/s390x/s390-virtio-ccw.c | 1 -
> hw/ssi/xilinx_spi.c | 24 +++++---
> hw/timer/xilinx_timer.c | 35 +++++++----
> hw/tpm/tpm_tis_sysbus.c | 3 +-
> hw/usb/xen-usb.c | 6 +-
> hw/vfio/amd-xgbe.c | 2 -
> hw/vfio/calxeda-xgmac.c | 2 -
> hw/vfio/platform.c | 4 +-
> hw/xen/xen-legacy-backend.c | 9 +--
> hw/xen/xen_pvdev.c | 2 +-
> system/vl.c | 24 ++++++--
> .../functional/test_microblaze_s3adsp1800.py | 34 +++++++++--
> .../test_microblazeel_s3adsp1800.py | 32 ++--------
> tests/qemu-iotests/172.out | 60 -------------------
> 60 files changed, 314 insertions(+), 248 deletions(-)
>
> --
> 2.47.1
>
>
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-11 18:26 ` [PULL 00/32] Misc HW patches for 2025-02-10 Stefan Hajnoczi
@ 2025-02-11 18:48 ` Philippe Mathieu-Daudé
2025-02-11 18:53 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-11 18:48 UTC (permalink / raw)
To: Stefan Hajnoczi, Thomas Huth, Daniel P. Berrangé; +Cc: qemu-devel
On 11/2/25 19:26, Stefan Hajnoczi wrote:
> On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
> <philmd@linaro.org> wrote:
>>
>> The following changes since commit 54e91d1523b412b4cff7cb36c898fa9dc133e886:
>>
>> Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/armbru into staging (2025-02-10 10:47:31 -0500)
>>
>> are available in the Git repository at:
>>
>> https://github.com/philmd/qemu.git tags/hw-misc-20250210
>>
>> for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
>>
>> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo (2025-02-10 21:30:44 +0100)
>>
>> ----------------------------------------------------------------
>> Misc HW patches
>>
>> - Use qemu_hexdump_line() in TPM backend (Philippe)
>> - Make various Xilinx devices endianness configurable (Philippe)
>> - Remove magic number in APIC (Phil)
>> - Disable thread-level cache topology (Zhao)
>> - Xen QOM style cleanups (Bernhard)
>> - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
>> - Invert logic of machine no_sdcard flag (Philippe)
>> - Housekeeping in MicroBlaze functional tests (Philippe)
>
> Please take a look at this CI failure:
> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
Hmm I can not reproduce locally this error:
Exception: Asset cache is invalid and downloads disabled
https://gitlab.com/qemu-project/qemu/-/jobs/9106591368/artifacts/external_file/build/tests/functional/microblazeel/test_microblazeel_s3adsp1800.MicroblazeLittleEndianMachine.test_microblaze_s3adsp1800_legacy_le/base.log
content is:
2025-02-11 16:24:55,525 - DEBUG: Extract
/builds/qemu-project/qemu/functional-cache/download/b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22
format=Nonesub_dir=None member=None
which is correct:
$ sha256sum day13.tar.gz
b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22
day13.tar.gz
Did you restart the job to see if it is a network issue?
Regards,
Phil.
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-11 18:48 ` Philippe Mathieu-Daudé
@ 2025-02-11 18:53 ` Philippe Mathieu-Daudé
2025-02-11 19:03 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-11 18:53 UTC (permalink / raw)
To: Stefan Hajnoczi, Thomas Huth, Daniel P. Berrangé; +Cc: qemu-devel
On 11/2/25 19:48, Philippe Mathieu-Daudé wrote:
> On 11/2/25 19:26, Stefan Hajnoczi wrote:
>> On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
>> <philmd@linaro.org> wrote:
>>>
>>> The following changes since commit
>>> 54e91d1523b412b4cff7cb36c898fa9dc133e886:
>>>
>>> Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/
>>> armbru into staging (2025-02-10 10:47:31 -0500)
>>>
>>> are available in the Git repository at:
>>>
>>> https://github.com/philmd/qemu.git tags/hw-misc-20250210
>>>
>>> for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
>>>
>>> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
>>> (2025-02-10 21:30:44 +0100)
>>>
>>> ----------------------------------------------------------------
>>> Misc HW patches
>>>
>>> - Use qemu_hexdump_line() in TPM backend (Philippe)
>>> - Make various Xilinx devices endianness configurable (Philippe)
>>> - Remove magic number in APIC (Phil)
>>> - Disable thread-level cache topology (Zhao)
>>> - Xen QOM style cleanups (Bernhard)
>>> - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
>>> - Invert logic of machine no_sdcard flag (Philippe)
>>> - Housekeeping in MicroBlaze functional tests (Philippe)
>>
>> Please take a look at this CI failure:
>> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
>
> Hmm I can not reproduce locally this error:
>
> Exception: Asset cache is invalid and downloads disabled
OK, I could reproduce by blowing my cache away.
The problem seems in the "tests/functional: Have microblaze tests
inherit common parent class" patch, which does:
-class MicroblazeelMachine(QemuSystemTest):
+class MicroblazeLittleEndianMachine(MicroblazeMachine):
I presume, since MicroblazeLittleEndianMachine is no more a direct
child of QemuSystemTest, then the ASSET_IMAGE_* aren't automatically
downloaded.
> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368/artifacts/
> external_file/build/tests/functional/microblazeel/
> test_microblazeel_s3adsp1800.MicroblazeLittleEndianMachine.test_microblaze_s3adsp1800_legacy_le/base.log content is:
>
> 2025-02-11 16:24:55,525 - DEBUG: Extract /builds/qemu-project/qemu/
> functional-cache/download/
> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22
> format=Nonesub_dir=None member=None
>
> which is correct:
>
> $ sha256sum day13.tar.gz
> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22
> day13.tar.gz
>
> Did you restart the job to see if it is a network issue?
>
> Regards,
>
> Phil.
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-11 18:53 ` Philippe Mathieu-Daudé
@ 2025-02-11 19:03 ` Philippe Mathieu-Daudé
2025-02-12 0:41 ` Thomas Huth
2025-02-12 0:31 ` Thomas Huth
2025-02-12 9:10 ` Daniel P. Berrangé
2 siblings, 1 reply; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-11 19:03 UTC (permalink / raw)
To: Stefan Hajnoczi, Thomas Huth, Daniel P. Berrangé; +Cc: qemu-devel
On 11/2/25 19:53, Philippe Mathieu-Daudé wrote:
> On 11/2/25 19:48, Philippe Mathieu-Daudé wrote:
>> On 11/2/25 19:26, Stefan Hajnoczi wrote:
>>> On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
>>> <philmd@linaro.org> wrote:
>>>>
>>>> The following changes since commit
>>>> 54e91d1523b412b4cff7cb36c898fa9dc133e886:
>>>>
>>>> Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/
>>>> armbru into staging (2025-02-10 10:47:31 -0500)
>>>>
>>>> are available in the Git repository at:
>>>>
>>>> https://github.com/philmd/qemu.git tags/hw-misc-20250210
>>>>
>>>> for you to fetch changes up to
>>>> 1078a376932cc1d1c501ee3643fef329da6a189a:
>>>>
>>>> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
>>>> (2025-02-10 21:30:44 +0100)
>>>>
>>>> ----------------------------------------------------------------
>>>> Misc HW patches
>>>>
>>>> - Use qemu_hexdump_line() in TPM backend (Philippe)
>>>> - Make various Xilinx devices endianness configurable (Philippe)
>>>> - Remove magic number in APIC (Phil)
>>>> - Disable thread-level cache topology (Zhao)
>>>> - Xen QOM style cleanups (Bernhard)
>>>> - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
>>>> - Invert logic of machine no_sdcard flag (Philippe)
>>>> - Housekeeping in MicroBlaze functional tests (Philippe)
>>>
>>> Please take a look at this CI failure:
>>> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
>>
>> Hmm I can not reproduce locally this error:
>>
>> Exception: Asset cache is invalid and downloads disabled
>
> OK, I could reproduce by blowing my cache away.
>
> The problem seems in the "tests/functional: Have microblaze tests
> inherit common parent class" patch, which does:
>
> -class MicroblazeelMachine(QemuSystemTest):
> +class MicroblazeLittleEndianMachine(MicroblazeMachine):
>
> I presume, since MicroblazeLittleEndianMachine is no more a direct
> child of QemuSystemTest, then the ASSET_IMAGE_* aren't automatically
> downloaded.
Well, apparently related to network failure:
INFO:qemu-test:Downloading
http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz to
/Users/philmd/.cache/qemu/download/b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
ERROR:qemu-test:Unable to download
http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz: HTTP
Error 403: Forbidden
$ curl -v http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz
> GET /2023/download/day13.tar.gz HTTP/1.1
< HTTP/1.1 301 Moved Permanently
< Location: https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz
Using:
-- >8 --
diff --git a/tests/functional/test_microblaze_s3adsp1800.py
b/tests/functional/test_microblaze_s3adsp1800.py
index 177c8a685bc..949e627c84a 100755
--- a/tests/functional/test_microblaze_s3adsp1800.py
+++ b/tests/functional/test_microblaze_s3adsp1800.py
@@ -24,3 +24,3 @@ class MicroblazeMachine(QemuSystemTest):
ASSET_IMAGE_LE = Asset(
- ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
+
('https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22')
---
I still get:
INFO:qemu-test:Downloading
https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz to
/Users/philmd/.cache/qemu/download/b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
However:
$ curl --http1.0 -v
https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz
> GET /2023/download/day13.tar.gz HTTP/1.0
< HTTP/1.0 200 OK
< Content-Length: 4752277
< Content-Type: application/gzip
So I'm confused...
>
>> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368/artifacts/
>> external_file/build/tests/functional/microblazeel/
>> test_microblazeel_s3adsp1800.MicroblazeLittleEndianMachine.test_microblaze_s3adsp1800_legacy_le/base.log content is:
>>
>> 2025-02-11 16:24:55,525 - DEBUG: Extract /builds/qemu-project/qemu/
>> functional-cache/download/
>> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22
>> format=Nonesub_dir=None member=None
>>
>> which is correct:
>>
>> $ sha256sum day13.tar.gz
>> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22
>> day13.tar.gz
>>
>> Did you restart the job to see if it is a network issue?
>>
>> Regards,
>>
>> Phil.
>
^ permalink raw reply related [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-11 18:53 ` Philippe Mathieu-Daudé
2025-02-11 19:03 ` Philippe Mathieu-Daudé
@ 2025-02-12 0:31 ` Thomas Huth
2025-02-12 9:10 ` Daniel P. Berrangé
2 siblings, 0 replies; 50+ messages in thread
From: Thomas Huth @ 2025-02-12 0:31 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Stefan Hajnoczi,
Daniel P. Berrangé
Cc: qemu-devel, Eldon Stegall
On 11/02/2025 19.53, Philippe Mathieu-Daudé wrote:
> On 11/2/25 19:48, Philippe Mathieu-Daudé wrote:
>> On 11/2/25 19:26, Stefan Hajnoczi wrote:
>>> On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
>>> <philmd@linaro.org> wrote:
>>>>
>>>> The following changes since commit
>>>> 54e91d1523b412b4cff7cb36c898fa9dc133e886:
>>>>
>>>> Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/
>>>> armbru into staging (2025-02-10 10:47:31 -0500)
>>>>
>>>> are available in the Git repository at:
>>>>
>>>> https://github.com/philmd/qemu.git tags/hw-misc-20250210
>>>>
>>>> for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
>>>>
>>>> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
>>>> (2025-02-10 21:30:44 +0100)
>>>>
>>>> ----------------------------------------------------------------
>>>> Misc HW patches
>>>>
>>>> - Use qemu_hexdump_line() in TPM backend (Philippe)
>>>> - Make various Xilinx devices endianness configurable (Philippe)
>>>> - Remove magic number in APIC (Phil)
>>>> - Disable thread-level cache topology (Zhao)
>>>> - Xen QOM style cleanups (Bernhard)
>>>> - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
>>>> - Invert logic of machine no_sdcard flag (Philippe)
>>>> - Housekeeping in MicroBlaze functional tests (Philippe)
>>>
>>> Please take a look at this CI failure:
>>> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
>>
>> Hmm I can not reproduce locally this error:
>>
>> Exception: Asset cache is invalid and downloads disabled
>
> OK, I could reproduce by blowing my cache away.
>
> The problem seems in the "tests/functional: Have microblaze tests
> inherit common parent class" patch, which does:
>
> -class MicroblazeelMachine(QemuSystemTest):
> +class MicroblazeLittleEndianMachine(MicroblazeMachine):
>
> I presume, since MicroblazeLittleEndianMachine is no more a direct
> child of QemuSystemTest, then the ASSET_IMAGE_* aren't automatically
> downloaded.
I guess you could fix it with:
diff --git a/tests/functional/test_microblaze_s3adsp1800.py
b/tests/functional/test_microblaze_s3adsp1800.py
--- a/tests/functional/test_microblaze_s3adsp1800.py
+++ b/tests/functional/test_microblaze_s3adsp1800.py
@@ -57,6 +57,8 @@ def do_xmaton_le_test(self, machine):
class MicroblazeBigEndianMachine(MicroblazeMachine):
+ ASSET_IMAGE_BE = MicroblazeMachine.ASSET_IMAGE_BE
+
def test_microblaze_s3adsp1800_legacy_be(self):
self.do_ballerina_be_test('petalogix-s3adsp1800')
diff --git a/tests/functional/test_microblazeel_s3adsp1800.py
b/tests/functional/test_microblazeel_s3adsp1800.py
--- a/tests/functional/test_microblazeel_s3adsp1800.py
+++ b/tests/functional/test_microblazeel_s3adsp1800.py
@@ -13,6 +13,8 @@
class MicroblazeLittleEndianMachine(MicroblazeMachine):
+ ASSET_IMAGE_LE = MicroblazeMachine.ASSET_IMAGE_LE
+
def test_microblaze_s3adsp1800_legacy_le(self):
self.do_xmaton_le_test('petalogix-s3adsp1800')
(this still won't help with the strange 403 error ... maybe we have to
mirror the asset in another place now if the advent-calendar site does not
work reliably anymore...)
Thomas
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-11 19:03 ` Philippe Mathieu-Daudé
@ 2025-02-12 0:41 ` Thomas Huth
2025-02-12 1:39 ` Thomas Huth
0 siblings, 1 reply; 50+ messages in thread
From: Thomas Huth @ 2025-02-12 0:41 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Stefan Hajnoczi,
Daniel P. Berrangé
Cc: qemu-devel, Eldon Stegall
On 11/02/2025 20.03, Philippe Mathieu-Daudé wrote:
> On 11/2/25 19:53, Philippe Mathieu-Daudé wrote:
>> On 11/2/25 19:48, Philippe Mathieu-Daudé wrote:
>>> On 11/2/25 19:26, Stefan Hajnoczi wrote:
>>>> On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
>>>> <philmd@linaro.org> wrote:
>>>>>
>>>>> The following changes since commit
>>>>> 54e91d1523b412b4cff7cb36c898fa9dc133e886:
>>>>>
>>>>> Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/
>>>>> armbru into staging (2025-02-10 10:47:31 -0500)
>>>>>
>>>>> are available in the Git repository at:
>>>>>
>>>>> https://github.com/philmd/qemu.git tags/hw-misc-20250210
>>>>>
>>>>> for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
>>>>>
>>>>> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
>>>>> (2025-02-10 21:30:44 +0100)
>>>>>
>>>>> ----------------------------------------------------------------
>>>>> Misc HW patches
>>>>>
>>>>> - Use qemu_hexdump_line() in TPM backend (Philippe)
>>>>> - Make various Xilinx devices endianness configurable (Philippe)
>>>>> - Remove magic number in APIC (Phil)
>>>>> - Disable thread-level cache topology (Zhao)
>>>>> - Xen QOM style cleanups (Bernhard)
>>>>> - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
>>>>> - Invert logic of machine no_sdcard flag (Philippe)
>>>>> - Housekeeping in MicroBlaze functional tests (Philippe)
>>>>
>>>> Please take a look at this CI failure:
>>>> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
>>>
>>> Hmm I can not reproduce locally this error:
>>>
>>> Exception: Asset cache is invalid and downloads disabled
>>
>> OK, I could reproduce by blowing my cache away.
>>
>> The problem seems in the "tests/functional: Have microblaze tests
>> inherit common parent class" patch, which does:
>>
>> -class MicroblazeelMachine(QemuSystemTest):
>> +class MicroblazeLittleEndianMachine(MicroblazeMachine):
>>
>> I presume, since MicroblazeLittleEndianMachine is no more a direct
>> child of QemuSystemTest, then the ASSET_IMAGE_* aren't automatically
>> downloaded.
>
> Well, apparently related to network failure:
>
> INFO:qemu-test:Downloading http://www.qemu-advent-calendar.org/2023/
> download/day13.tar.gz to /Users/philmd/.cache/qemu/download/
> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
> ERROR:qemu-test:Unable to download http://www.qemu-advent-calendar.org/2023/
> download/day13.tar.gz: HTTP Error 403: Forbidden
>
> $ curl -v http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz
> > GET /2023/download/day13.tar.gz HTTP/1.1
> < HTTP/1.1 301 Moved Permanently
> < Location: https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz
>
> Using:
>
> -- >8 --
> diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/
> functional/test_microblaze_s3adsp1800.py
> index 177c8a685bc..949e627c84a 100755
> --- a/tests/functional/test_microblaze_s3adsp1800.py
> +++ b/tests/functional/test_microblaze_s3adsp1800.py
> @@ -24,3 +24,3 @@ class MicroblazeMachine(QemuSystemTest):
> ASSET_IMAGE_LE = Asset(
> - ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
> + ('https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
>
> 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22')
> ---
>
> I still get:
>
> INFO:qemu-test:Downloading https://www.qemu-advent-calendar.org/2023/
> download/day13.tar.gz to /Users/philmd/.cache/qemu/download/
> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
>
> However:
>
> $ curl --http1.0 -v https://www.qemu-advent-calendar.org/2023/download/
> day13.tar.gz
> > GET /2023/download/day13.tar.gz HTTP/1.0
> < HTTP/1.0 200 OK
> < Content-Length: 4752277
> < Content-Type: application/gzip
>
> So I'm confused...
Looks like this also happens in test runs without your patches:
https://gitlab.com/qemu-project/qemu/-/jobs/9108828196#L844
The test then silently gets skipped there (since we only fail hard for a 404
error now).
Maybe Eldon could comment why the downloads are blocked for python scripts
but not for curl downloads?
I the worst case, we have to mirror the asset to another place, I guess...
Thomas
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-12 0:41 ` Thomas Huth
@ 2025-02-12 1:39 ` Thomas Huth
2025-02-12 4:45 ` Eldon Stegall
0 siblings, 1 reply; 50+ messages in thread
From: Thomas Huth @ 2025-02-12 1:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: qemu-devel
On 12/02/2025 01.41, Thomas Huth wrote:
> On 11/02/2025 20.03, Philippe Mathieu-Daudé wrote:
>> On 11/2/25 19:53, Philippe Mathieu-Daudé wrote:
>>> On 11/2/25 19:48, Philippe Mathieu-Daudé wrote:
>>>> On 11/2/25 19:26, Stefan Hajnoczi wrote:
>>>>> On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
>>>>> <philmd@linaro.org> wrote:
>>>>>>
>>>>>> The following changes since commit
>>>>>> 54e91d1523b412b4cff7cb36c898fa9dc133e886:
>>>>>>
>>>>>> Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/
>>>>>> armbru into staging (2025-02-10 10:47:31 -0500)
>>>>>>
>>>>>> are available in the Git repository at:
>>>>>>
>>>>>> https://github.com/philmd/qemu.git tags/hw-misc-20250210
>>>>>>
>>>>>> for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
>>>>>>
>>>>>> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
>>>>>> (2025-02-10 21:30:44 +0100)
>>>>>>
>>>>>> ----------------------------------------------------------------
>>>>>> Misc HW patches
>>>>>>
>>>>>> - Use qemu_hexdump_line() in TPM backend (Philippe)
>>>>>> - Make various Xilinx devices endianness configurable (Philippe)
>>>>>> - Remove magic number in APIC (Phil)
>>>>>> - Disable thread-level cache topology (Zhao)
>>>>>> - Xen QOM style cleanups (Bernhard)
>>>>>> - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
>>>>>> - Invert logic of machine no_sdcard flag (Philippe)
>>>>>> - Housekeeping in MicroBlaze functional tests (Philippe)
>>>>>
>>>>> Please take a look at this CI failure:
>>>>> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
>>>>
>>>> Hmm I can not reproduce locally this error:
>>>>
>>>> Exception: Asset cache is invalid and downloads disabled
>>>
>>> OK, I could reproduce by blowing my cache away.
>>>
>>> The problem seems in the "tests/functional: Have microblaze tests
>>> inherit common parent class" patch, which does:
>>>
>>> -class MicroblazeelMachine(QemuSystemTest):
>>> +class MicroblazeLittleEndianMachine(MicroblazeMachine):
>>>
>>> I presume, since MicroblazeLittleEndianMachine is no more a direct
>>> child of QemuSystemTest, then the ASSET_IMAGE_* aren't automatically
>>> downloaded.
>>
>> Well, apparently related to network failure:
>>
>> INFO:qemu-test:Downloading http://www.qemu-advent-calendar.org/2023/
>> download/day13.tar.gz to /Users/philmd/.cache/qemu/download/
>> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
>> ERROR:qemu-test:Unable to download http://www.qemu-advent-
>> calendar.org/2023/ download/day13.tar.gz: HTTP Error 403: Forbidden
>>
>> $ curl -v http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz
>> > GET /2023/download/day13.tar.gz HTTP/1.1
>> < HTTP/1.1 301 Moved Permanently
>> < Location: https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz
>>
>> Using:
>>
>> -- >8 --
>> diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/
>> functional/test_microblaze_s3adsp1800.py
>> index 177c8a685bc..949e627c84a 100755
>> --- a/tests/functional/test_microblaze_s3adsp1800.py
>> +++ b/tests/functional/test_microblaze_s3adsp1800.py
>> @@ -24,3 +24,3 @@ class MicroblazeMachine(QemuSystemTest):
>> ASSET_IMAGE_LE = Asset(
>> - ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
>> + ('https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
>>
>> 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22')
>> ---
>>
>> I still get:
>>
>> INFO:qemu-test:Downloading https://www.qemu-advent-calendar.org/2023/
>> download/day13.tar.gz to /Users/philmd/.cache/qemu/download/
>> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
>>
>> However:
>>
>> $ curl --http1.0 -v https://www.qemu-advent-calendar.org/2023/download/
>> day13.tar.gz
>> > GET /2023/download/day13.tar.gz HTTP/1.0
>> < HTTP/1.0 200 OK
>> < Content-Length: 4752277
>> < Content-Type: application/gzip
>>
>> So I'm confused...
>
> Looks like this also happens in test runs without your patches:
>
> https://gitlab.com/qemu-project/qemu/-/jobs/9108828196#L844
>
> The test then silently gets skipped there (since we only fail hard for a 404
> error now).
>
> Maybe Eldon could comment why the downloads are blocked for python scripts
> but not for curl downloads?
>
> I the worst case, we have to mirror the asset to another place, I guess...
Ok, I've now also put the image here:
https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day05.tar.xz
(just had to use a different day number there since 13 was an image that I
did not want to sacrifice in the best-of roaster).
So if the qemu-advent-calendar.org server keeps refusing the downloads, you
should be able to use the mirrored tarball instead.
HTH,
Thomas
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-12 1:39 ` Thomas Huth
@ 2025-02-12 4:45 ` Eldon Stegall
2025-02-12 19:31 ` Thomas Huth
0 siblings, 1 reply; 50+ messages in thread
From: Eldon Stegall @ 2025-02-12 4:45 UTC (permalink / raw)
To: Thomas Huth; +Cc: Philippe Mathieu-Daudé, qemu-devel
On Wed, Feb 12, 2025 at 02:39:16AM +0100, Thomas Huth wrote:
> On 12/02/2025 01.41, Thomas Huth wrote:
> > On 11/02/2025 20.03, Philippe Mathieu-Daudé wrote:
> >> On 11/2/25 19:53, Philippe Mathieu-Daudé wrote:
> >>> On 11/2/25 19:48, Philippe Mathieu-Daudé wrote:
> >>>> On 11/2/25 19:26, Stefan Hajnoczi wrote:
> >>>>> On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
> >>>>> <philmd@linaro.org> wrote:
> >>>>>>
> >>>>>> The following changes since commit
> >>>>>> 54e91d1523b412b4cff7cb36c898fa9dc133e886:
> >>>>>>
> >>>>>> Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/
> >>>>>> armbru into staging (2025-02-10 10:47:31 -0500)
> >>>>>>
> >>>>>> are available in the Git repository at:
> >>>>>>
> >>>>>> https://github.com/philmd/qemu.git tags/hw-misc-20250210
> >>>>>>
> >>>>>> for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
> >>>>>>
> >>>>>> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
> >>>>>> (2025-02-10 21:30:44 +0100)
> >>>>>>
> >>>>>> ----------------------------------------------------------------
> >>>>>> Misc HW patches
> >>>>>>
> >>>>>> - Use qemu_hexdump_line() in TPM backend (Philippe)
> >>>>>> - Make various Xilinx devices endianness configurable (Philippe)
> >>>>>> - Remove magic number in APIC (Phil)
> >>>>>> - Disable thread-level cache topology (Zhao)
> >>>>>> - Xen QOM style cleanups (Bernhard)
> >>>>>> - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
> >>>>>> - Invert logic of machine no_sdcard flag (Philippe)
> >>>>>> - Housekeeping in MicroBlaze functional tests (Philippe)
> >>>>>
> >>>>> Please take a look at this CI failure:
> >>>>> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
> >>>>
> >>>> Hmm I can not reproduce locally this error:
> >>>>
> >>>> Exception: Asset cache is invalid and downloads disabled
> >>>
> >>> OK, I could reproduce by blowing my cache away.
> >>>
> >>> The problem seems in the "tests/functional: Have microblaze tests
> >>> inherit common parent class" patch, which does:
> >>>
> >>> -class MicroblazeelMachine(QemuSystemTest):
> >>> +class MicroblazeLittleEndianMachine(MicroblazeMachine):
> >>>
> >>> I presume, since MicroblazeLittleEndianMachine is no more a direct
> >>> child of QemuSystemTest, then the ASSET_IMAGE_* aren't automatically
> >>> downloaded.
> >>
> >> Well, apparently related to network failure:
> >>
> >> INFO:qemu-test:Downloading http://www.qemu-advent-calendar.org/2023/
> >> download/day13.tar.gz to /Users/philmd/.cache/qemu/download/
> >> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
> >> ERROR:qemu-test:Unable to download http://www.qemu-advent-
> >> calendar.org/2023/ download/day13.tar.gz: HTTP Error 403: Forbidden
> >>
> >> $ curl -v http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz
> >> > GET /2023/download/day13.tar.gz HTTP/1.1
> >> < HTTP/1.1 301 Moved Permanently
> >> < Location: https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz
> >>
> >> Using:
> >>
> >> -- >8 --
> >> diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/
> >> functional/test_microblaze_s3adsp1800.py
> >> index 177c8a685bc..949e627c84a 100755
> >> --- a/tests/functional/test_microblaze_s3adsp1800.py
> >> +++ b/tests/functional/test_microblaze_s3adsp1800.py
> >> @@ -24,3 +24,3 @@ class MicroblazeMachine(QemuSystemTest):
> >> ASSET_IMAGE_LE = Asset(
> >> - ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
> >> + ('https://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
> >>
> >> 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22')
> >> ---
> >>
> >> I still get:
> >>
> >> INFO:qemu-test:Downloading https://www.qemu-advent-calendar.org/2023/
> >> download/day13.tar.gz to /Users/philmd/.cache/qemu/download/
> >> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
> >>
> >> However:
> >>
> >> $ curl --http1.0 -v https://www.qemu-advent-calendar.org/2023/download/
> >> day13.tar.gz
> >> > GET /2023/download/day13.tar.gz HTTP/1.0
> >> < HTTP/1.0 200 OK
> >> < Content-Length: 4752277
> >> < Content-Type: application/gzip
> >>
> >> So I'm confused...
> >
> > Looks like this also happens in test runs without your patches:
> >
> > https://gitlab.com/qemu-project/qemu/-/jobs/9108828196#L844
> >
> > The test then silently gets skipped there (since we only fail hard for a 404
> > error now).
> >
> > Maybe Eldon could comment why the downloads are blocked for python scripts
> > but not for curl downloads?
> >
> > I the worst case, we have to mirror the asset to another place, I guess...
>
> Ok, I've now also put the image here:
>
> https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day05.tar.xz
>
> (just had to use a different day number there since 13 was an image that I
> did not want to sacrifice in the best-of roaster).
>
> So if the qemu-advent-calendar.org server keeps refusing the downloads, you
> should be able to use the mirrored tarball instead.
>
> HTH,
> Thomas
>
>
Hello! I recently switched some of the underlying object storage for
sites including the advent calendar, and this was a (very) unintended
consequence. I have now switched to a good old apache upstream for
these, so I would not expect this error to recur. Also, looking to make
another attempt at a calendar for 2025 (end of 2024 was a complicated
time for me). Let me know if you'd like to produce/contribute!
Thanks,
Eldon
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable
2025-02-10 20:41 ` [PULL 04/32] hw/timer/xilinx_timer: " Philippe Mathieu-Daudé
@ 2025-02-12 8:27 ` Thomas Huth
2025-02-12 9:19 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 50+ messages in thread
From: Thomas Huth @ 2025-02-12 8:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Richard Henderson
On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote:
> Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
> of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
> Add the "little-endian" property to select the device
> endianness, defaulting to little endian.
> Set the proper endianness for each machine using the device.
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Message-Id: <20250206131052.30207-5-philmd@linaro.org>
> ---
> hw/microblaze/petalogix_ml605_mmu.c | 1 +
> hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
> hw/ppc/virtex_ml507.c | 1 +
> hw/timer/xilinx_timer.c | 35 +++++++++++++++---------
> 4 files changed, 25 insertions(+), 13 deletions(-)
>
> diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
> index cf3b9574db3..bbda70aa93b 100644
> --- a/hw/microblaze/petalogix_ml605_mmu.c
> +++ b/hw/microblaze/petalogix_ml605_mmu.c
> @@ -127,6 +127,7 @@ petalogix_ml605_init(MachineState *machine)
>
> /* 2 timers at irq 2 @ 100 Mhz. */
> dev = qdev_new("xlnx.xps-timer");
> + qdev_prop_set_bit(dev, "little-endian", true);
> qdev_prop_set_uint32(dev, "one-timer-only", 0);
> qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000);
> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
> diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
> index fbf52ba8f2f..9d4316b4036 100644
> --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
> +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
> @@ -114,6 +114,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
>
> /* 2 timers at irq 2 @ 62 Mhz. */
> dev = qdev_new("xlnx.xps-timer");
> + qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
> qdev_prop_set_uint32(dev, "one-timer-only", 0);
> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> index 23238119273..f87c221d076 100644
> --- a/hw/ppc/virtex_ml507.c
> +++ b/hw/ppc/virtex_ml507.c
> @@ -230,6 +230,7 @@ static void virtex_init(MachineState *machine)
>
> /* 2 timers at irq 2 @ 62 Mhz. */
> dev = qdev_new("xlnx.xps-timer");
> + qdev_prop_set_bit(dev, "little-endian", false);
> qdev_prop_set_uint32(dev, "one-timer-only", 0);
> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
Hi,
with this patch applied, the ppc_virtex_ml507 functional test is now failing
for me ... could you please double-check whether "make check-functional-ppc"
still works for you?
Thanks,
Thomas
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-11 18:53 ` Philippe Mathieu-Daudé
2025-02-11 19:03 ` Philippe Mathieu-Daudé
2025-02-12 0:31 ` Thomas Huth
@ 2025-02-12 9:10 ` Daniel P. Berrangé
2025-02-12 11:57 ` Philippe Mathieu-Daudé
2 siblings, 1 reply; 50+ messages in thread
From: Daniel P. Berrangé @ 2025-02-12 9:10 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: Stefan Hajnoczi, Thomas Huth, qemu-devel
On Tue, Feb 11, 2025 at 07:53:32PM +0100, Philippe Mathieu-Daudé wrote:
> On 11/2/25 19:48, Philippe Mathieu-Daudé wrote:
> > On 11/2/25 19:26, Stefan Hajnoczi wrote:
> > > On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
> > > <philmd@linaro.org> wrote:
> > > >
> > > > The following changes since commit
> > > > 54e91d1523b412b4cff7cb36c898fa9dc133e886:
> > > >
> > > > Merge tag 'pull-qapi-2025-02-10-v2' of
> > > > https://repo.or.cz/qemu/ armbru into staging (2025-02-10
> > > > 10:47:31 -0500)
> > > >
> > > > are available in the Git repository at:
> > > >
> > > > https://github.com/philmd/qemu.git tags/hw-misc-20250210
> > > >
> > > > for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
> > > >
> > > > hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
> > > > (2025-02-10 21:30:44 +0100)
> > > >
> > > > ----------------------------------------------------------------
> > > > Misc HW patches
> > > >
> > > > - Use qemu_hexdump_line() in TPM backend (Philippe)
> > > > - Make various Xilinx devices endianness configurable (Philippe)
> > > > - Remove magic number in APIC (Phil)
> > > > - Disable thread-level cache topology (Zhao)
> > > > - Xen QOM style cleanups (Bernhard)
> > > > - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
> > > > - Invert logic of machine no_sdcard flag (Philippe)
> > > > - Housekeeping in MicroBlaze functional tests (Philippe)
> > >
> > > Please take a look at this CI failure:
> > > https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
> >
> > Hmm I can not reproduce locally this error:
> >
> > Exception: Asset cache is invalid and downloads disabled
>
> OK, I could reproduce by blowing my cache away.
>
> The problem seems in the "tests/functional: Have microblaze tests
> inherit common parent class" patch, which does:
>
> -class MicroblazeelMachine(QemuSystemTest):
> +class MicroblazeLittleEndianMachine(MicroblazeMachine):
>
> I presume, since MicroblazeLittleEndianMachine is no more a direct
> child of QemuSystemTest, then the ASSET_IMAGE_* aren't automatically
> downloaded.
Yes, my code assumes all assets are on the leaf test classes. I'll
look at a fix since it is easy enough to check parent classes too.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable
2025-02-12 8:27 ` Thomas Huth
@ 2025-02-12 9:19 ` Philippe Mathieu-Daudé
2025-02-12 9:34 ` Philippe Mathieu-Daudé
2025-02-12 10:24 ` Thomas Huth
0 siblings, 2 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-12 9:19 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: Richard Henderson
On 12/2/25 09:27, Thomas Huth wrote:
> On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote:
>> Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
>> of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
>> Add the "little-endian" property to select the device
>> endianness, defaulting to little endian.
>> Set the proper endianness for each machine using the device.
>>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Message-Id: <20250206131052.30207-5-philmd@linaro.org>
>> ---
>> hw/microblaze/petalogix_ml605_mmu.c | 1 +
>> hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
>> hw/ppc/virtex_ml507.c | 1 +
>> hw/timer/xilinx_timer.c | 35 +++++++++++++++---------
>> 4 files changed, 25 insertions(+), 13 deletions(-)
>>
>> diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/
>> petalogix_ml605_mmu.c
>> index cf3b9574db3..bbda70aa93b 100644
>> --- a/hw/microblaze/petalogix_ml605_mmu.c
>> +++ b/hw/microblaze/petalogix_ml605_mmu.c
>> @@ -127,6 +127,7 @@ petalogix_ml605_init(MachineState *machine)
>> /* 2 timers at irq 2 @ 100 Mhz. */
>> dev = qdev_new("xlnx.xps-timer");
>> + qdev_prop_set_bit(dev, "little-endian", true);
>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>> qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000);
>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>> diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/
>> petalogix_s3adsp1800_mmu.c
>> index fbf52ba8f2f..9d4316b4036 100644
>> --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
>> +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
>> @@ -114,6 +114,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
>> /* 2 timers at irq 2 @ 62 Mhz. */
>> dev = qdev_new("xlnx.xps-timer");
>> + qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
>> index 23238119273..f87c221d076 100644
>> --- a/hw/ppc/virtex_ml507.c
>> +++ b/hw/ppc/virtex_ml507.c
>> @@ -230,6 +230,7 @@ static void virtex_init(MachineState *machine)
>> /* 2 timers at irq 2 @ 62 Mhz. */
>> dev = qdev_new("xlnx.xps-timer");
>> + qdev_prop_set_bit(dev, "little-endian", false);
>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>
> Hi,
>
> with this patch applied, the ppc_virtex_ml507 functional test is now
> failing for me ... could you please double-check whether "make check-
> functional-ppc" still works for you?
Thanks, not this patch problem, but patch #2 misses:
-- >8 --
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 23238119273..723f62c904b 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -219,2 +219,3 @@ static void virtex_init(MachineState *machine)
dev = qdev_new("xlnx.xps-intc");
+ qdev_prop_set_bit(dev, "little-endian", false);
qdev_prop_set_uint32(dev, "kind-of-intr", 0);
---
Why is my CI green?
^ permalink raw reply related [flat|nested] 50+ messages in thread
* Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable
2025-02-12 9:19 ` Philippe Mathieu-Daudé
@ 2025-02-12 9:34 ` Philippe Mathieu-Daudé
2025-02-12 9:55 ` Philippe Mathieu-Daudé
2025-02-12 10:24 ` Thomas Huth
1 sibling, 1 reply; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-12 9:34 UTC (permalink / raw)
To: Thomas Huth, qemu-devel
Cc: Richard Henderson, Daniel P. Berrangé, Markus Armbruster,
Alex Bennée
On 12/2/25 10:19, Philippe Mathieu-Daudé wrote:
> On 12/2/25 09:27, Thomas Huth wrote:
>> On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote:
>>> Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
>>> of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
>>> Add the "little-endian" property to select the device
>>> endianness, defaulting to little endian.
>>> Set the proper endianness for each machine using the device.
>>>
>>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> Message-Id: <20250206131052.30207-5-philmd@linaro.org>
>>> ---
>>> hw/microblaze/petalogix_ml605_mmu.c | 1 +
>>> hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
>>> hw/ppc/virtex_ml507.c | 1 +
>>> hw/timer/xilinx_timer.c | 35 +++++++++++++++---------
>>> 4 files changed, 25 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/
>>> petalogix_ml605_mmu.c
>>> index cf3b9574db3..bbda70aa93b 100644
>>> --- a/hw/microblaze/petalogix_ml605_mmu.c
>>> +++ b/hw/microblaze/petalogix_ml605_mmu.c
>>> @@ -127,6 +127,7 @@ petalogix_ml605_init(MachineState *machine)
>>> /* 2 timers at irq 2 @ 100 Mhz. */
>>> dev = qdev_new("xlnx.xps-timer");
>>> + qdev_prop_set_bit(dev, "little-endian", true);
>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>> qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000);
>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>> diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/
>>> microblaze/ petalogix_s3adsp1800_mmu.c
>>> index fbf52ba8f2f..9d4316b4036 100644
>>> --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
>>> +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
>>> @@ -114,6 +114,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
>>> /* 2 timers at irq 2 @ 62 Mhz. */
>>> dev = qdev_new("xlnx.xps-timer");
>>> + qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
>>> index 23238119273..f87c221d076 100644
>>> --- a/hw/ppc/virtex_ml507.c
>>> +++ b/hw/ppc/virtex_ml507.c
>>> @@ -230,6 +230,7 @@ static void virtex_init(MachineState *machine)
>>> /* 2 timers at irq 2 @ 62 Mhz. */
>>> dev = qdev_new("xlnx.xps-timer");
>>> + qdev_prop_set_bit(dev, "little-endian", false);
>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>
>> Hi,
>>
>> with this patch applied, the ppc_virtex_ml507 functional test is now
>> failing for me ... could you please double-check whether "make check-
>> functional-ppc" still works for you?
>
> Thanks, not this patch problem, but patch #2 misses:
>
> -- >8 --
> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> index 23238119273..723f62c904b 100644
> --- a/hw/ppc/virtex_ml507.c
> +++ b/hw/ppc/virtex_ml507.c
> @@ -219,2 +219,3 @@ static void virtex_init(MachineState *machine)
> dev = qdev_new("xlnx.xps-intc");
> + qdev_prop_set_bit(dev, "little-endian", false);
It looks to me like another "default value problem", where using
a tri-state with default=unset would have catched.
"disas/dis-asm.h" defines:
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
Maybe endianness is common enough than we can add a QAPI enum,
in machine-common.json or even common.json?
Then I'd use qdev_prop_set_enum() here.
> qdev_prop_set_uint32(dev, "kind-of-intr", 0);
> ---
>
> Why is my CI green?
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable
2025-02-12 9:34 ` Philippe Mathieu-Daudé
@ 2025-02-12 9:55 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-12 9:55 UTC (permalink / raw)
To: Thomas Huth, qemu-devel
Cc: Richard Henderson, Daniel P. Berrangé, Markus Armbruster,
Alex Bennée
On 12/2/25 10:34, Philippe Mathieu-Daudé wrote:
> On 12/2/25 10:19, Philippe Mathieu-Daudé wrote:
>> On 12/2/25 09:27, Thomas Huth wrote:
>>> On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote:
>>>> Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
>>>> of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
>>>> Add the "little-endian" property to select the device
>>>> endianness, defaulting to little endian.
>>>> Set the proper endianness for each machine using the device.
>>>>
>>>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>> Message-Id: <20250206131052.30207-5-philmd@linaro.org>
>>>> ---
>>>> hw/microblaze/petalogix_ml605_mmu.c | 1 +
>>>> hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
>>>> hw/ppc/virtex_ml507.c | 1 +
>>>> hw/timer/xilinx_timer.c | 35 ++++++++++++++
>>>> +---------
>>>> 4 files changed, 25 insertions(+), 13 deletions(-)
>>>>
>>>> diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/
>>>> petalogix_ml605_mmu.c
>>>> index cf3b9574db3..bbda70aa93b 100644
>>>> --- a/hw/microblaze/petalogix_ml605_mmu.c
>>>> +++ b/hw/microblaze/petalogix_ml605_mmu.c
>>>> @@ -127,6 +127,7 @@ petalogix_ml605_init(MachineState *machine)
>>>> /* 2 timers at irq 2 @ 100 Mhz. */
>>>> dev = qdev_new("xlnx.xps-timer");
>>>> + qdev_prop_set_bit(dev, "little-endian", true);
>>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>>> qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000);
>>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>>> diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/
>>>> microblaze/ petalogix_s3adsp1800_mmu.c
>>>> index fbf52ba8f2f..9d4316b4036 100644
>>>> --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
>>>> +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
>>>> @@ -114,6 +114,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
>>>> /* 2 timers at irq 2 @ 62 Mhz. */
>>>> dev = qdev_new("xlnx.xps-timer");
>>>> + qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
>>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>>> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
>>>> index 23238119273..f87c221d076 100644
>>>> --- a/hw/ppc/virtex_ml507.c
>>>> +++ b/hw/ppc/virtex_ml507.c
>>>> @@ -230,6 +230,7 @@ static void virtex_init(MachineState *machine)
>>>> /* 2 timers at irq 2 @ 62 Mhz. */
>>>> dev = qdev_new("xlnx.xps-timer");
>>>> + qdev_prop_set_bit(dev, "little-endian", false);
>>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>>
>>> Hi,
>>>
>>> with this patch applied, the ppc_virtex_ml507 functional test is now
>>> failing for me ... could you please double-check whether "make check-
>>> functional-ppc" still works for you?
>>
>> Thanks, not this patch problem, but patch #2 misses:
>>
>> -- >8 --
>> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
>> index 23238119273..723f62c904b 100644
>> --- a/hw/ppc/virtex_ml507.c
>> +++ b/hw/ppc/virtex_ml507.c
>> @@ -219,2 +219,3 @@ static void virtex_init(MachineState *machine)
>> dev = qdev_new("xlnx.xps-intc");
>> + qdev_prop_set_bit(dev, "little-endian", false);
>
> It looks to me like another "default value problem", where using
> a tri-state with default=unset would have catched.
>
> "disas/dis-asm.h" defines:
>
> enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
>
> Maybe endianness is common enough than we can add a QAPI enum,
> in machine-common.json or even common.json?
>
> Then I'd use qdev_prop_set_enum() here.
I'll post a series doing that.
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable
2025-02-12 9:19 ` Philippe Mathieu-Daudé
2025-02-12 9:34 ` Philippe Mathieu-Daudé
@ 2025-02-12 10:24 ` Thomas Huth
2025-02-12 11:45 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 50+ messages in thread
From: Thomas Huth @ 2025-02-12 10:24 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Richard Henderson
On 12/02/2025 10.19, Philippe Mathieu-Daudé wrote:
> On 12/2/25 09:27, Thomas Huth wrote:
>> On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote:
>>> Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
>>> of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
>>> Add the "little-endian" property to select the device
>>> endianness, defaulting to little endian.
>>> Set the proper endianness for each machine using the device.
>>>
>>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> Message-Id: <20250206131052.30207-5-philmd@linaro.org>
>>> ---
>>> hw/microblaze/petalogix_ml605_mmu.c | 1 +
>>> hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
>>> hw/ppc/virtex_ml507.c | 1 +
>>> hw/timer/xilinx_timer.c | 35 +++++++++++++++---------
>>> 4 files changed, 25 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/
>>> petalogix_ml605_mmu.c
>>> index cf3b9574db3..bbda70aa93b 100644
>>> --- a/hw/microblaze/petalogix_ml605_mmu.c
>>> +++ b/hw/microblaze/petalogix_ml605_mmu.c
>>> @@ -127,6 +127,7 @@ petalogix_ml605_init(MachineState *machine)
>>> /* 2 timers at irq 2 @ 100 Mhz. */
>>> dev = qdev_new("xlnx.xps-timer");
>>> + qdev_prop_set_bit(dev, "little-endian", true);
>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>> qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000);
>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>> diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/
>>> petalogix_s3adsp1800_mmu.c
>>> index fbf52ba8f2f..9d4316b4036 100644
>>> --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
>>> +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
>>> @@ -114,6 +114,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
>>> /* 2 timers at irq 2 @ 62 Mhz. */
>>> dev = qdev_new("xlnx.xps-timer");
>>> + qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
>>> index 23238119273..f87c221d076 100644
>>> --- a/hw/ppc/virtex_ml507.c
>>> +++ b/hw/ppc/virtex_ml507.c
>>> @@ -230,6 +230,7 @@ static void virtex_init(MachineState *machine)
>>> /* 2 timers at irq 2 @ 62 Mhz. */
>>> dev = qdev_new("xlnx.xps-timer");
>>> + qdev_prop_set_bit(dev, "little-endian", false);
>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>
>> Hi,
>>
>> with this patch applied, the ppc_virtex_ml507 functional test is now
>> failing for me ... could you please double-check whether "make check-
>> functional-ppc" still works for you?
>
> Thanks, not this patch problem, but patch #2 misses:
>
> -- >8 --
> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> index 23238119273..723f62c904b 100644
> --- a/hw/ppc/virtex_ml507.c
> +++ b/hw/ppc/virtex_ml507.c
> @@ -219,2 +219,3 @@ static void virtex_init(MachineState *machine)
> dev = qdev_new("xlnx.xps-intc");
> + qdev_prop_set_bit(dev, "little-endian", false);
> qdev_prop_set_uint32(dev, "kind-of-intr", 0);
> ---
>
> Why is my CI green?
Looking at https://gitlab.com/philmd/qemu/-/pipelines/1664238124 it seems
like you did not start the functional test jobs?
Thomas
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable
2025-02-12 10:24 ` Thomas Huth
@ 2025-02-12 11:45 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-12 11:45 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: Richard Henderson
On 12/2/25 11:24, Thomas Huth wrote:
> On 12/02/2025 10.19, Philippe Mathieu-Daudé wrote:
>> On 12/2/25 09:27, Thomas Huth wrote:
>>> On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote:
>>>> Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
>>>> of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
>>>> Add the "little-endian" property to select the device
>>>> endianness, defaulting to little endian.
>>>> Set the proper endianness for each machine using the device.
>>>>
>>>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>> Message-Id: <20250206131052.30207-5-philmd@linaro.org>
>>>> ---
>>>> hw/microblaze/petalogix_ml605_mmu.c | 1 +
>>>> hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
>>>> hw/ppc/virtex_ml507.c | 1 +
>>>> hw/timer/xilinx_timer.c | 35 ++++++++++++++
>>>> +---------
>>>> 4 files changed, 25 insertions(+), 13 deletions(-)
>>>>
>>>> diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/
>>>> petalogix_ml605_mmu.c
>>>> index cf3b9574db3..bbda70aa93b 100644
>>>> --- a/hw/microblaze/petalogix_ml605_mmu.c
>>>> +++ b/hw/microblaze/petalogix_ml605_mmu.c
>>>> @@ -127,6 +127,7 @@ petalogix_ml605_init(MachineState *machine)
>>>> /* 2 timers at irq 2 @ 100 Mhz. */
>>>> dev = qdev_new("xlnx.xps-timer");
>>>> + qdev_prop_set_bit(dev, "little-endian", true);
>>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>>> qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000);
>>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>>> diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/
>>>> microblaze/ petalogix_s3adsp1800_mmu.c
>>>> index fbf52ba8f2f..9d4316b4036 100644
>>>> --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
>>>> +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
>>>> @@ -114,6 +114,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
>>>> /* 2 timers at irq 2 @ 62 Mhz. */
>>>> dev = qdev_new("xlnx.xps-timer");
>>>> + qdev_prop_set_bit(dev, "little-endian", !TARGET_BIG_ENDIAN);
>>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>>> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
>>>> index 23238119273..f87c221d076 100644
>>>> --- a/hw/ppc/virtex_ml507.c
>>>> +++ b/hw/ppc/virtex_ml507.c
>>>> @@ -230,6 +230,7 @@ static void virtex_init(MachineState *machine)
>>>> /* 2 timers at irq 2 @ 62 Mhz. */
>>>> dev = qdev_new("xlnx.xps-timer");
>>>> + qdev_prop_set_bit(dev, "little-endian", false);
>>>> qdev_prop_set_uint32(dev, "one-timer-only", 0);
>>>> qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000);
>>>> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>>
>>> Hi,
>>>
>>> with this patch applied, the ppc_virtex_ml507 functional test is now
>>> failing for me ... could you please double-check whether "make check-
>>> functional-ppc" still works for you?
>>
>> Thanks, not this patch problem, but patch #2 misses:
>>
>> -- >8 --
>> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
>> index 23238119273..723f62c904b 100644
>> --- a/hw/ppc/virtex_ml507.c
>> +++ b/hw/ppc/virtex_ml507.c
>> @@ -219,2 +219,3 @@ static void virtex_init(MachineState *machine)
>> dev = qdev_new("xlnx.xps-intc");
>> + qdev_prop_set_bit(dev, "little-endian", false);
>> qdev_prop_set_uint32(dev, "kind-of-intr", 0);
>> ---
>>
>> Why is my CI green?
>
> Looking at https://gitlab.com/philmd/qemu/-/pipelines/1664238124 it
> seems like you did not start the functional test jobs?
Doh, while doing my PR process I forgot even using push-ci-now these
need to be triggered manually :S
>
> Thomas
>
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-12 9:10 ` Daniel P. Berrangé
@ 2025-02-12 11:57 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 50+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-12 11:57 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: Stefan Hajnoczi, Thomas Huth, qemu-devel
On 12/2/25 10:10, Daniel P. Berrangé wrote:
> On Tue, Feb 11, 2025 at 07:53:32PM +0100, Philippe Mathieu-Daudé wrote:
>> On 11/2/25 19:48, Philippe Mathieu-Daudé wrote:
>>> On 11/2/25 19:26, Stefan Hajnoczi wrote:
>>>> On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé
>>>> <philmd@linaro.org> wrote:
>>>>>
>>>>> The following changes since commit
>>>>> 54e91d1523b412b4cff7cb36c898fa9dc133e886:
>>>>>
>>>>> Merge tag 'pull-qapi-2025-02-10-v2' of
>>>>> https://repo.or.cz/qemu/ armbru into staging (2025-02-10
>>>>> 10:47:31 -0500)
>>>>>
>>>>> are available in the Git repository at:
>>>>>
>>>>> https://github.com/philmd/qemu.git tags/hw-misc-20250210
>>>>>
>>>>> for you to fetch changes up to 1078a376932cc1d1c501ee3643fef329da6a189a:
>>>>>
>>>>> hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
>>>>> (2025-02-10 21:30:44 +0100)
>>>>>
>>>>> ----------------------------------------------------------------
>>>>> Misc HW patches
>>>>>
>>>>> - Use qemu_hexdump_line() in TPM backend (Philippe)
>>>>> - Make various Xilinx devices endianness configurable (Philippe)
>>>>> - Remove magic number in APIC (Phil)
>>>>> - Disable thread-level cache topology (Zhao)
>>>>> - Xen QOM style cleanups (Bernhard)
>>>>> - Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE (Philippe)
>>>>> - Invert logic of machine no_sdcard flag (Philippe)
>>>>> - Housekeeping in MicroBlaze functional tests (Philippe)
>>>>
>>>> Please take a look at this CI failure:
>>>> https://gitlab.com/qemu-project/qemu/-/jobs/9106591368
>>>
>>> Hmm I can not reproduce locally this error:
>>>
>>> Exception: Asset cache is invalid and downloads disabled
>>
>> OK, I could reproduce by blowing my cache away.
>>
>> The problem seems in the "tests/functional: Have microblaze tests
>> inherit common parent class" patch, which does:
>>
>> -class MicroblazeelMachine(QemuSystemTest):
>> +class MicroblazeLittleEndianMachine(MicroblazeMachine):
>>
>> I presume, since MicroblazeLittleEndianMachine is no more a direct
>> child of QemuSystemTest, then the ASSET_IMAGE_* aren't automatically
>> downloaded.
>
> Yes, my code assumes all assets are on the leaf test classes. I'll
> look at a fix since it is easy enough to check parent classes too.
Actually your code works fine :) I mis-interpreted the network issue:
DEBUG:qemu-test:Extract
/Users/philmd/.cache/qemu/download/b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22
format=Nonesub_dir=None member=None
INFO:qemu-test:Downloading
http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz to
/Users/philmd/.cache/qemu/download/b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
DEBUG:qemu-test:Unable to set xattr on
/Users/philmd/.cache/qemu/download/b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22.download:
module 'os' has no attribute 'setxattr'
INFO:qemu-test:Cached
http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz at
/Users/philmd/.cache/qemu/download/b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22
^ permalink raw reply [flat|nested] 50+ messages in thread
* Re: [PULL 00/32] Misc HW patches for 2025-02-10
2025-02-12 4:45 ` Eldon Stegall
@ 2025-02-12 19:31 ` Thomas Huth
0 siblings, 0 replies; 50+ messages in thread
From: Thomas Huth @ 2025-02-12 19:31 UTC (permalink / raw)
To: Eldon Stegall; +Cc: Philippe Mathieu-Daudé, qemu-devel
On 12/02/2025 05.45, Eldon Stegall wrote:
> On Wed, Feb 12, 2025 at 02:39:16AM +0100, Thomas Huth wrote:
>> On 12/02/2025 01.41, Thomas Huth wrote:
>>> On 11/02/2025 20.03, Philippe Mathieu-Daudé wrote:
>>>> On 11/2/25 19:53, Philippe Mathieu-Daudé wrote:
>>>>> On 11/2/25 19:48, Philippe Mathieu-Daudé wrote:
[...]
>>>> Well, apparently related to network failure:
>>>>
>>>> INFO:qemu-test:Downloading http://www.qemu-advent-calendar.org/2023/
>>>> download/day13.tar.gz to /Users/philmd/.cache/qemu/download/
>>>> b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22...
>>>> ERROR:qemu-test:Unable to download http://www.qemu-advent-
>>>> calendar.org/2023/ download/day13.tar.gz: HTTP Error 403: Forbidden
[...]
>>>> However:
>>>>
>>>> $ curl --http1.0 -v https://www.qemu-advent-calendar.org/2023/download/
>>>> day13.tar.gz
>>>> > GET /2023/download/day13.tar.gz HTTP/1.0
>>>> < HTTP/1.0 200 OK
>>>> < Content-Length: 4752277
>>>> < Content-Type: application/gzip
>>>>
>>>> So I'm confused...
>>>
>>> Looks like this also happens in test runs without your patches:
>>>
>>> https://gitlab.com/qemu-project/qemu/-/jobs/9108828196#L844
>>>
>>> The test then silently gets skipped there (since we only fail hard for a 404
>>> error now).
>>>
>>> Maybe Eldon could comment why the downloads are blocked for python scripts
>>> but not for curl downloads?
>>>
>>> I the worst case, we have to mirror the asset to another place, I guess...
[...]
> Hello! I recently switched some of the underlying object storage for
> sites including the advent calendar, and this was a (very) unintended
> consequence. I have now switched to a good old apache upstream for
> these, so I would not expect this error to recur.
Thanks a lot for the quick fix!
> Also, looking to make
> another attempt at a calendar for 2025 (end of 2024 was a complicated
> time for me). Let me know if you'd like to produce/contribute!
Sure, count me in for an image or two!
Thomas
^ permalink raw reply [flat|nested] 50+ messages in thread
end of thread, other threads:[~2025-02-12 19:32 UTC | newest]
Thread overview: 50+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 20:41 [PULL 00/32] Misc HW patches for 2025-02-10 Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 01/32] backends/tpm: Use qemu_hexdump_line() to avoid sprintf() Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 02/32] hw/intc/xilinx_intc: Make device endianness configurable Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 03/32] hw/net/xilinx_ethlite: " Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 04/32] hw/timer/xilinx_timer: " Philippe Mathieu-Daudé
2025-02-12 8:27 ` Thomas Huth
2025-02-12 9:19 ` Philippe Mathieu-Daudé
2025-02-12 9:34 ` Philippe Mathieu-Daudé
2025-02-12 9:55 ` Philippe Mathieu-Daudé
2025-02-12 10:24 ` Thomas Huth
2025-02-12 11:45 ` Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 05/32] hw/char/xilinx_uartlite: " Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 06/32] hw/ssi/xilinx_spi: " Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 07/32] hw/arm/xlnx-zynqmp: Use &error_abort for programming errors Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 08/32] hw/intc/apic: Fixes magic number use, removes outdated comment Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 09/32] hw/core/machine: Reject thread level cache Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 10/32] hw/sysbus: Use sizeof(BusState) in main_system_bus_create() Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 11/32] hw/sysbus: Declare QOM types using DEFINE_TYPES() macro Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 12/32] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 13/32] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 14/32] hw/display: Have RAMFB device " Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 15/32] hw/i386: Have X86_IOMMU devices " Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 16/32] hw/net: Have eTSEC device " Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 17/32] hw/tpm: Have TPM TIS sysbus " Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 18/32] hw/xen: Prefer QOM cast for XenLegacyDevice Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 19/32] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 20/32] hw/boards: Convert no_sdcard flag to OnOffAuto tri-state Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 21/32] hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 22/32] hw/boards: Rename no_sdcard -> auto_create_sdcard Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 23/32] hw/boards: Do not create unusable default if=sd drives Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 24/32] hw/arm: Remove all invalid uses of auto_create_sdcard=true Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 25/32] hw/riscv: " Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 26/32] hw/boards: Ensure machine setting auto_create_sdcard expose a SD Bus Philippe Mathieu-Daudé
2025-02-10 20:41 ` [PULL 27/32] tests/functional: Explicit endianness of microblaze assets Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 28/32] tests/functional: Allow microblaze tests to take a machine name argument Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 29/32] tests/functional: Remove sleep() kludges from microblaze tests Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 30/32] tests/functional: Have microblaze tests inherit common parent class Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 31/32] hw/riscv/opentitan: Include missing 'exec/address-spaces.h' header Philippe Mathieu-Daudé
2025-02-10 20:42 ` [PULL 32/32] hw/net/smc91c111: Ignore attempt to pop from empty RX fifo Philippe Mathieu-Daudé
2025-02-11 18:26 ` [PULL 00/32] Misc HW patches for 2025-02-10 Stefan Hajnoczi
2025-02-11 18:48 ` Philippe Mathieu-Daudé
2025-02-11 18:53 ` Philippe Mathieu-Daudé
2025-02-11 19:03 ` Philippe Mathieu-Daudé
2025-02-12 0:41 ` Thomas Huth
2025-02-12 1:39 ` Thomas Huth
2025-02-12 4:45 ` Eldon Stegall
2025-02-12 19:31 ` Thomas Huth
2025-02-12 0:31 ` Thomas Huth
2025-02-12 9:10 ` Daniel P. Berrangé
2025-02-12 11:57 ` Philippe Mathieu-Daudé
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).