mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST
Now that all of the Property arrays are counted, we can remove the terminator object from each array. Update the assertions in device_class_set_props to match. With struct Property being 88 bytes, this was a rather large form of terminator. Saves 30k from qemu-system-aarch64. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-21-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
ebe9685f12
commit
5fcabe628b
@@ -201,7 +201,6 @@ static const Property cpu_common_props[] = {
|
||||
DEFINE_PROP_LINK("memory", CPUState, memory, TYPE_MEMORY_REGION,
|
||||
MemoryRegion *),
|
||||
#endif
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
|
||||
@@ -401,7 +401,6 @@ the old behaviour or the new behaviour::
|
||||
DEFINE_PROP_UINT32("acpi-index", PCIDevice, acpi_index, 0),
|
||||
+ DEFINE_PROP_BIT("x-pcie-err-unc-mask", PCIDevice, cap_present,
|
||||
+ QEMU_PCIE_ERR_UNC_MASK_BITNR, true),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
Notice that we enable the feature for new machine types.
|
||||
|
||||
@@ -107,7 +107,6 @@ manually instantiated:
|
||||
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
|
||||
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
|
||||
DEV_NVECTORS_UNSPECIFIED),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void virtio_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
|
||||
|
||||
@@ -246,7 +246,6 @@ static const VMStateDescription vmstate_virtio_9p = {
|
||||
static const Property virtio_9p_properties[] = {
|
||||
DEFINE_PROP_STRING("mount_tag", V9fsVirtioState, state.fsconf.tag),
|
||||
DEFINE_PROP_STRING("fsdev", V9fsVirtioState, state.fsconf.fsdev_id),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void virtio_9p_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
@@ -1016,7 +1016,6 @@ static const Property erst_properties[] = {
|
||||
TYPE_MEMORY_BACKEND, HostMemoryBackend *),
|
||||
DEFINE_PROP_UINT32(ACPI_ERST_RECORD_SIZE_PROP, ERSTDeviceState,
|
||||
default_record_size, ERST_RECORD_SIZE),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void erst_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
@@ -318,7 +318,6 @@ static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
|
||||
|
||||
static const Property acpi_ged_properties[] = {
|
||||
DEFINE_PROP_UINT32("ged-event", AcpiGedState, ged_event_bitmap, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_memhp_state = {
|
||||
|
||||
@@ -617,7 +617,6 @@ static const Property piix4_pm_properties[] = {
|
||||
DEFINE_PROP_BOOL("smm-enabled", PIIX4PMState, smm_enabled, false),
|
||||
DEFINE_PROP_BOOL("x-not-migrate-acpi-index", PIIX4PMState,
|
||||
not_migrate_acpi_index, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void piix4_pm_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
@@ -216,7 +216,6 @@ static void vmgenid_realize(DeviceState *dev, Error **errp)
|
||||
|
||||
static const Property vmgenid_device_properties[] = {
|
||||
DEFINE_PROP_UUID(VMGENID_GUID, VmGenIdState, guid),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void vmgenid_device_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
@@ -289,7 +289,6 @@ static const VMStateDescription vmstate_aspeed_adc_engine = {
|
||||
static const Property aspeed_adc_engine_properties[] = {
|
||||
DEFINE_PROP_UINT32("engine-id", AspeedADCEngineState, engine_id, 0),
|
||||
DEFINE_PROP_UINT32("nr-channels", AspeedADCEngineState, nr_channels, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void aspeed_adc_engine_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
@@ -269,7 +269,6 @@ static const VMStateDescription vmstate_npcm7xx_adc = {
|
||||
|
||||
static const Property npcm7xx_timer_properties[] = {
|
||||
DEFINE_PROP_UINT32("iref", NPCM7xxADCState, iref, NPCM7XX_ADC_DEFAULT_IREF),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void npcm7xx_adc_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
@@ -552,7 +552,6 @@ static const Property armv7m_properties[] = {
|
||||
DEFINE_PROP_BOOL("dsp", ARMv7MState, dsp, true),
|
||||
DEFINE_PROP_UINT32("mpu-ns-regions", ARMv7MState, mpu_ns_regions, UINT_MAX),
|
||||
DEFINE_PROP_UINT32("mpu-s-regions", ARMv7MState, mpu_s_regions, UINT_MAX),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_armv7m = {
|
||||
@@ -635,7 +634,6 @@ static const Property bitband_properties[] = {
|
||||
DEFINE_PROP_UINT32("base", BitBandState, base, 0),
|
||||
DEFINE_PROP_LINK("source-memory", BitBandState, source_memory,
|
||||
TYPE_MEMORY_REGION, MemoryRegion *),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void bitband_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
@@ -144,7 +144,6 @@ static const Property aspeed_soc_properties[] = {
|
||||
MemoryRegion *),
|
||||
DEFINE_PROP_LINK("memory", AspeedSoCState, memory, TYPE_MEMORY_REGION,
|
||||
MemoryRegion *),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void aspeed_soc_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
@@ -311,7 +311,6 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp)
|
||||
|
||||
static const Property fsl_imx25_properties[] = {
|
||||
DEFINE_PROP_UINT32("fec-phy-num", FslIMX25State, phy_num, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void fsl_imx25_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
@@ -483,7 +483,6 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
|
||||
|
||||
static const Property fsl_imx6_properties[] = {
|
||||
DEFINE_PROP_UINT32("fec-phy-num", FslIMX6State, phy_num, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void fsl_imx6_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
@@ -725,7 +725,6 @@ static const Property fsl_imx6ul_properties[] = {
|
||||
true),
|
||||
DEFINE_PROP_BOOL("fec2-phy-connected", FslIMX6ULState, phy_connected[1],
|
||||
true),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void fsl_imx6ul_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
@@ -743,7 +743,6 @@ static const Property fsl_imx7_properties[] = {
|
||||
true),
|
||||
DEFINE_PROP_BOOL("fec2-phy-connected", FslIMX7State, phy_connected[1],
|
||||
true),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void fsl_imx7_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
@@ -696,7 +696,6 @@ DEFINE_MACHINE("integratorcp", integratorcp_machine_init)
|
||||
|
||||
static const Property core_properties[] = {
|
||||
DEFINE_PROP_UINT32("memsz", IntegratorCMState, memsz, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void core_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
@@ -234,7 +234,6 @@ static const Property m2sxxx_soc_properties[] = {
|
||||
/* default divisors in Libero GUI */
|
||||
DEFINE_PROP_UINT8("apb0div", MSF2State, apb0div, 2),
|
||||
DEFINE_PROP_UINT8("apb1div", MSF2State, apb1div, 2),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void m2sxxx_soc_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
@@ -813,7 +813,6 @@ static void npcm7xx_realize(DeviceState *dev, Error **errp)
|
||||
static const Property npcm7xx_properties[] = {
|
||||
DEFINE_PROP_LINK("dram-mr", NPCM7xxState, dram, TYPE_MEMORY_REGION,
|
||||
MemoryRegion *),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void npcm7xx_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
@@ -214,7 +214,6 @@ static const Property nrf51_soc_properties[] = {
|
||||
DEFINE_PROP_UINT32("sram-size", NRF51State, sram_size, NRF51822_SRAM_SIZE),
|
||||
DEFINE_PROP_UINT32("flash-size", NRF51State, flash_size,
|
||||
NRF51822_FLASH_SIZE),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void nrf51_soc_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user