hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines
v2 cover hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines
The -2.8 and -2.9 machine types of the i440fx and q35 machines are older than 6 years, so according to our support policy we can remove them, together with a lot of the compatibility knobs that they were using.
This is a respin of Philippe's original series here:
https://lore.kernel.org/qemu-devel/[email protected]
The following three patches still need a review:
- hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition
- hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
- tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machine
Changes in v2:
- Rebased all patches to current master, and fixed the contextual conflicts
- Added Igor's Reviewed-bys
- Dropped the "hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition" patch since the code is still required (the guest can decide whether to use this feature or not)
- Dropped the two "hw/nvram/fw_cfg" patches since Igor mentioned that it still might be useful to keep this configuration knob
- Fix "hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition" according to Igor's review
- Adjusted "hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field":
The problematic hunk has already been merged in upstream, so I dropped it from this patch.
- Added the final patch to drop a qtest that required this machine
Philippe Mathieu-Daudé (15):
hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines hw/i386/pc: Remove pc_compat_2_8[] array
hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field hw/core/machine: Remove hw_compat_2_8[] array hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines hw/i386/pc: Remove pc_compat_2_9[] array
hw/core/machine: Remove hw_compat_2_9[] array hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
Thomas Huth (1):
tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9
machine
include/hw/core/boards.h | 6 ----- include/hw/i386/pc.h | 6 ----- include/hw/i386/x86-iommu.h | 1 - include/hw/pci/pci.h | 2 -- include/hw/virtio/virtio-net.h | 1 - include/hw/virtio/virtio-pci.h | 12 ---------- hw/block/pflash_cfi01.c | 14 +++--------- hw/core/machine.c | 22 ------------------ hw/i386/intel_iommu.c | 13 ++--------- hw/i386/kvm/clock.c | 18 --------------- hw/i386/pc.c | 14 ------------ hw/i386/pc_piix.c | 18 --------------- hw/i386/pc_q35.c | 18 --------------- hw/i386/x86-iommu.c | 1 - hw/net/virtio-net.c | 8 ++----- hw/pci-bridge/gen_pcie_root_port.c | 16 ++----------- hw/pci/pci.c | 2 -- hw/pci/pcie.c | 6 ++--- hw/virtio/virtio-pci.c | 35 ++++++++--------------------- tests/qtest/test-x86-cpuid-compat.c | 11 --------- 20 files changed, 20 insertions(+), 204 deletions(-)
Signature · 1 line
2.53.0
PATCH v2 1/16 hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines
From: Philippe Mathieu-Daudé <[email protected]>
These machines has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") they can now be removed.
Message-ID: <[email protected]>
--- hw/i386/pc_piix.c | 9 --------- hw/i386/pc_q35.c | 9 --------- 2 files changed, 18 deletions(-)
hw/i386/pc_piix.c +0 -9
@@ -714,15 +714,6 @@ static void pc_i440fx_machine_2_9_options(MachineClass *m)DEFINE_I440FX_MACHINE (2 ,9 ); -static void pc_i440fx_machine_2_8_options (MachineClass *m) -{ -pc_i440fx_machine_2_9_options (m); -compat_props_add (m->compat_props, hw_compat_2_8, hw_compat_2_8_len); -compat_props_add (m->compat_props, pc_compat_2_8, pc_compat_2_8_len); -} - -DEFINE_I440FX_MACHINE (2 ,8 ); -#ifdef CONFIG_XEN static void xenfv_machine_4_2_options (MachineClass *m) {
hw/i386/pc_q35.c +0 -9
@@ -661,12 +661,3 @@ static void pc_q35_machine_2_9_options(MachineClass *m) }DEFINE_Q35_MACHINE (2 ,9 ); - -static void pc_q35_machine_2_8_options (MachineClass *m) -{ -pc_q35_machine_2_9_options (m); -compat_props_add (m->compat_props, hw_compat_2_8, hw_compat_2_8_len); -compat_props_add (m->compat_props, pc_compat_2_8, pc_compat_2_8_len); -} - -DEFINE_Q35_MACHINE (2 ,8 );
Signature · 1 line
2.53.0
PATCH v2 2/16 hw/i386/pc: Remove pc_compat_2_8[] array
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The pc_compat_2_8[] array was only used by the pc-q35-2.8 and pc-i440fx-2.8 machines, which got removed. Remove it.
Message-ID: <[email protected]>
--- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 9 --------- 2 files changed, 12 deletions(-)
include/hw/i386/pc.h +0 -3
@@ -292,9 +292,6 @@ extern const size_t pc_compat_2_10_len;extern GlobalProperty pc_compat_2_9[];extern const size_t pc_compat_2_9_len; -extern GlobalProperty pc_compat_2_8[]; -extern const size_t pc_compat_2_8_len; -#define DEFINE_PC_MACHINE (suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, \ const void *data) \
hw/i386/pc.c +0 -9
@@ -247,15 +247,6 @@ GlobalProperty pc_compat_2_9[] = { };const size_t pc_compat_2_9_len =G_N_ELEMENTS (pc_compat_2_9); -GlobalProperty pc_compat_2_8[] = { - {TYPE_X86_CPU ,"tcg-cpuid" ,"off" }, - {"kvmclock" ,"x-mach-use-reliable-get-clock" ,"off" }, - {"ICH9-LPC" ,"x-smi-broadcast" ,"off" }, - {TYPE_X86_CPU ,"vmware-cpuid-freq" ,"off" }, - {"Haswell-" TYPE_X86_CPU ,"stepping" ,"1" }, -}; -const size_t pc_compat_2_8_len =G_N_ELEMENTS (pc_compat_2_8); -/* * @PC_FW_DATA: * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables
Signature · 1 line
2.53.0
PATCH v2 3/16 hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The KVMClockState::mach_use_reliable_get_clock boolean was only used by the pc-q35-2.8 and pc-i440fx-2.8 machines, which got removed. Remove it, along with the 'x-mach-use-reliable-get-clock' property.
Message-ID: <[email protected]>
--- hw/i386/kvm/clock.c | 18 ------------------ 1 file changed, 18 deletions(-)
hw/i386/kvm/clock.c +0 -18
@@ -23,7 +23,6 @@#include "migration/vmstate.h" #include "hw/core/sysbus.h" #include "hw/i386/kvm/clock.h" -#include "hw/core/qdev-properties.h" #include "exec/cpu-common.h" #include "qapi/error.h"
@@ -44,9 +43,6 @@ struct KVMClockState {/* whether the 'clock' value was obtained in the 'paused' state */ bool runstate_paused; -/* whether machine type supports reliable KVM_GET_CLOCK */ -bool mach_use_reliable_get_clock; -/* whether the 'clock' value was obtained in a host with * reliable KVM_GET_CLOCK */ bool clock_is_reliable;
@@ -233,18 +229,10 @@ static void kvmclock_realize(DeviceState *dev, Error **errp)qemu_add_vm_change_state_handler (kvmclock_vm_state_change, s); } -static bool kvmclock_clock_is_reliable_needed (void *opaque) -{ -KVMClockState *s = opaque; - -return s->mach_use_reliable_get_clock; -} -static const VMStateDescription kvmclock_reliable_get_clock = { .name ="kvmclock/clock_is_reliable" , .version_id =1 , .minimum_version_id =1 , - .needed = kvmclock_clock_is_reliable_needed, .fields = (const VMStateField []) {VMSTATE_BOOL (clock_is_reliable, KVMClockState),VMSTATE_END_OF_LIST ()
@@ -305,18 +293,12 @@ static const VMStateDescription kvmclock_vmsd = { } }; -static const Property kvmclock_properties[] = { -DEFINE_PROP_BOOL ("x-mach-use-reliable-get-clock" , KVMClockState, - mach_use_reliable_get_clock, true), -}; -static void kvmclock_class_init (ObjectClass *klass,const void *data) {DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = kvmclock_realize; dc->vmsd = &kvmclock_vmsd; -device_class_set_props (dc, kvmclock_properties); }static const TypeInfo kvmclock_info = {
Signature · 1 line
2.53.0
PATCH v2 4/16 hw/core/machine: Remove hw_compat_2_8[] array
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The hw_compat_2_8[] array was only used by the pc-q35-2.8 and pc-i440fx-2.8 machines, which got removed. Remove it.
Message-ID: <[email protected]>
--- include/hw/core/boards.h | 3 --- hw/core/machine.c | 14 -------------- 2 files changed, 17 deletions(-)
include/hw/core/boards.h +0 -3
@@ -880,7 +880,4 @@ extern const size_t hw_compat_2_10_len;extern GlobalProperty hw_compat_2_9[];extern const size_t hw_compat_2_9_len; -extern GlobalProperty hw_compat_2_8[]; -extern const size_t hw_compat_2_8_len; -#endif
hw/core/machine.c +0 -14
@@ -272,20 +272,6 @@ GlobalProperty hw_compat_2_9[] = { };const size_t hw_compat_2_9_len =G_N_ELEMENTS (hw_compat_2_9); -GlobalProperty hw_compat_2_8[] = { - {"fw_cfg_mem" ,"x-file-slots" ,"0x10" }, - {"fw_cfg_io" ,"x-file-slots" ,"0x10" }, - {"pflash_cfi01" ,"old-multiple-chip-handling" ,"on" }, - {"pci-bridge" ,"shpc" ,"on" }, - {TYPE_PCI_DEVICE ,"x-pcie-extcap-init" ,"off" }, - {"virtio-pci" ,"x-pcie-deverr-init" ,"off" }, - {"virtio-pci" ,"x-pcie-lnkctl-init" ,"off" }, - {"virtio-pci" ,"x-pcie-pm-init" ,"off" }, - {"cirrus-vga" ,"vgamem_mb" ,"8" }, - {"isa-cirrus-vga" ,"vgamem_mb" ,"8" }, -}; -const size_t hw_compat_2_8_len =G_N_ELEMENTS (hw_compat_2_8); -MachineState *current_machine;static char *machine_get_kernel (Object *obj,Error **errp)
Signature · 1 line
2.53.0
PATCH v2 5/16 hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The PFlashCFI01::old_multiple_chip_handling boolean was only set in the hw_compat_2_8[] array, via the 'old-multiple-chip-handling=on' property. We removed all machines using that array, let's remove that property and all the code around it.
Message-ID: <[email protected]>
--- hw/block/pflash_cfi01.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
hw/block/pflash_cfi01.c +3 -11
@@ -84,7 +84,6 @@ struct PFlashCFI01 {char *name;void *storage;VMChangeStateEntry *vmstate; -bool old_multiple_chip_handling;/* block update buffer */ unsigned char *blk_bytes;
@@ -703,13 +702,8 @@ static void pflash_cfi01_fill_cfi_table(PFlashCFI01 *pfl)* in the cfi_table[]. */ num_devices = pfl->device_width ? (pfl->bank_width / pfl->device_width) :1 ; -if (pfl->old_multiple_chip_handling) { - blocks_per_device = pfl->nb_blocs / num_devices; - sector_len_per_device = pfl->sector_len; - }else { - blocks_per_device = pfl->nb_blocs; - sector_len_per_device = pfl->sector_len / num_devices; - } + blocks_per_device = pfl->nb_blocs; + sector_len_per_device = pfl->sector_len / num_devices; device_len = sector_len_per_device * blocks_per_device;/* Hardcoded CFI table */
@@ -765,7 +759,7 @@ static void pflash_cfi01_fill_cfi_table(PFlashCFI01 *pfl) pfl->cfi_table[0x2A ] =0x0B ; } pfl->writeblock_size =1 << pfl->cfi_table[0x2A ]; -if (!pfl->old_multiple_chip_handling && num_devices >1 ) { +if (num_devices >1 ) { pfl->writeblock_size *= num_devices; }
@@ -930,8 +924,6 @@ static const Property pflash_cfi01_properties[] = {DEFINE_PROP_UINT16 ("id2" , PFlashCFI01, ident2,0 ),DEFINE_PROP_UINT16 ("id3" , PFlashCFI01, ident3,0 ), DEFINE_PROP_STRING("name", PFlashCFI01, name), -DEFINE_PROP_BOOL ("old-multiple-chip-handling" , PFlashCFI01, - old_multiple_chip_handling, false), };static void pflash_cfi01_class_init (ObjectClass *klass,const void *data)
Signature · 1 line
2.53.0
PATCH v2 6/16 hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
QEMU_PCIE_EXTCAP_INIT was only used by the hw_compat_2_8[] array, via the 'x-pcie-extcap-init=off' property. We removed all machines using that array, let's remove all the code around QEMU_PCIE_EXTCAP_INIT.
Message-ID: <[email protected]>
--- include/hw/pci/pci.h | 2 -- hw/pci/pci.c | 2 -- hw/pci/pcie.c | 6 ++---- 3 files changed, 2 insertions(+), 8 deletions(-)
include/hw/pci/pci.h +0 -2
@@ -219,8 +219,6 @@ enum {/* Link active status in endpoint capability is always set */ #define QEMU_PCIE_LNKSTA_DLLLA_BITNR 8 QEMU_PCIE_LNKSTA_DLLLA = (1 << QEMU_PCIE_LNKSTA_DLLLA_BITNR), -#define QEMU_PCIE_EXTCAP_INIT_BITNR 9 - QEMU_PCIE_EXTCAP_INIT = (1 << QEMU_PCIE_EXTCAP_INIT_BITNR),#define QEMU_PCIE_CXL_BITNR 10 QEMU_PCIE_CAP_CXL = (1 << QEMU_PCIE_CXL_BITNR),#define QEMU_PCIE_ERR_UNC_MASK_BITNR 11
hw/pci/pci.c +0 -2
@@ -84,8 +84,6 @@ static const Property pci_props[] = { QEMU_PCI_CAP_MULTIFUNCTION_BITNR, false),DEFINE_PROP_BIT ("x-pcie-lnksta-dllla" , PCIDevice, cap_present,QEMU_PCIE_LNKSTA_DLLLA_BITNR , true), -DEFINE_PROP_BIT ("x-pcie-extcap-init" , PCIDevice, cap_present, -QEMU_PCIE_EXTCAP_INIT_BITNR , true),DEFINE_PROP_STRING ("failover_pair_id" , PCIDevice, failover_pair_id), DEFINE_PROP_UINT32("acpi-index", PCIDevice, acpi_index, 0),
hw/pci/pcie.c +2 -4
@@ -250,10 +250,8 @@ int pcie_cap_init(PCIDevice *dev, uint8_t offset,pci_set_word (dev->wmask + pos +PCI_EXP_DEVCTL2 ,PCI_EXP_DEVCTL2_EETLPPB ); -if (dev->cap_present &QEMU_PCIE_EXTCAP_INIT ) { -/* read-only to behave like a 'NULL' Extended Capability Header */ -pci_set_long (dev->wmask +PCI_CONFIG_SPACE_SIZE ,0 ); - } +/* read-only to behave like a 'NULL' Extended Capability Header */ +pci_set_long (dev->wmask +PCI_CONFIG_SPACE_SIZE ,0 );return pos; }
Signature · 1 line
2.53.0
PATCH v2 7/16 hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
VIRTIO_PCI_FLAG_INIT_DEVERR was only used by the hw_compat_2_8[] array, via the 'x-pcie-deverr-init=off' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_INIT_DEVERR (see commit 9a4c0e220d8 for similar VIRTIO_PCI_FLAG_* enum removal).
Message-ID: <[email protected]>
--- include/hw/virtio/virtio-pci.h | 4 ---- hw/virtio/virtio-pci.c | 8 ++------ 2 files changed, 2 insertions(+), 10 deletions(-)
include/hw/virtio/virtio-pci.h +0 -4
@@ -35,7 +35,6 @@ enum {VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT ,VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT ,VIRTIO_PCI_FLAG_ATS_BIT , -VIRTIO_PCI_FLAG_INIT_DEVERR_BIT ,VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT ,VIRTIO_PCI_FLAG_INIT_PM_BIT , VIRTIO_PCI_FLAG_INIT_FLR_BIT,
@@ -63,9 +62,6 @@ enum {/* address space translation service */ #define VIRTIO_PCI_FLAG_ATS (1 << VIRTIO_PCI_FLAG_ATS_BIT) -/* Init error enabling flags */ -#define VIRTIO_PCI_FLAG_INIT_DEVERR (1 << VIRTIO_PCI_FLAG_INIT_DEVERR_BIT) -/* Init Link Control register */ #define VIRTIO_PCI_FLAG_INIT_LNKCTL (1 << VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT)
hw/virtio/virtio-pci.c +2 -6
@@ -2307,10 +2307,8 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp) proxy->last_pcie_cap_offset +=PCI_ERR_SIZEOF ; } -if (proxy->flags &VIRTIO_PCI_FLAG_INIT_DEVERR ) { -/* Init error enabling flags */ -pcie_cap_deverr_init (pci_dev); - } +/* Init error enabling flags */ +pcie_cap_deverr_init (pci_dev);if (proxy->flags &VIRTIO_PCI_FLAG_INIT_LNKCTL ) {/* Init Link Control Register */
@@ -2446,8 +2444,6 @@ static const Property virtio_pci_properties[] = { VIRTIO_PCI_FLAG_ATS_BIT, false),DEFINE_PROP_BIT ("x-ats-page-aligned" , VirtIOPCIProxy, flags,VIRTIO_PCI_FLAG_ATS_PAGE_ALIGNED_BIT , true), -DEFINE_PROP_BIT ("x-pcie-deverr-init" , VirtIOPCIProxy, flags, -VIRTIO_PCI_FLAG_INIT_DEVERR_BIT , true),DEFINE_PROP_BIT ("x-pcie-lnkctl-init" , VirtIOPCIProxy, flags,VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT , true), DEFINE_PROP_BIT("x-pcie-pm-init", VirtIOPCIProxy, flags,
Signature · 1 line
2.53.0
PATCH v2 8/16 hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
VIRTIO_PCI_FLAG_INIT_LNKCTL was only used by the hw_compat_2_8[] array, via the 'x-pcie-lnkctl-init=off' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_INIT_LNKCTL (see commit 9a4c0e220d8 for similar VIRTIO_PCI_FLAG_* enum removal).
Message-ID: <[email protected]>
--- include/hw/virtio/virtio-pci.h | 4 ---- hw/virtio/virtio-pci.c | 8 ++------ 2 files changed, 2 insertions(+), 10 deletions(-)
include/hw/virtio/virtio-pci.h +0 -4
@@ -35,7 +35,6 @@ enum {VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT ,VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT ,VIRTIO_PCI_FLAG_ATS_BIT , -VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT ,VIRTIO_PCI_FLAG_INIT_PM_BIT ,VIRTIO_PCI_FLAG_INIT_FLR_BIT , VIRTIO_PCI_FLAG_AER_BIT,
@@ -62,9 +61,6 @@ enum {/* address space translation service */ #define VIRTIO_PCI_FLAG_ATS (1 << VIRTIO_PCI_FLAG_ATS_BIT) -/* Init Link Control register */ -#define VIRTIO_PCI_FLAG_INIT_LNKCTL (1 << VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT) -/* Init Power Management */ #define VIRTIO_PCI_FLAG_INIT_PM (1 << VIRTIO_PCI_FLAG_INIT_PM_BIT)
hw/virtio/virtio-pci.c +2 -6
@@ -2310,10 +2310,8 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp)/* Init error enabling flags */ pcie_cap_deverr_init (pci_dev); -if (proxy->flags &VIRTIO_PCI_FLAG_INIT_LNKCTL ) { -/* Init Link Control Register */ -pcie_cap_lnkctl_init (pci_dev); - } +/* Init Link Control Register */ +pcie_cap_lnkctl_init (pci_dev);if (proxy->flags &VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET ) { pci_set_word(pci_dev->config + pos + PCI_PM_CTRL,
@@ -2444,8 +2442,6 @@ static const Property virtio_pci_properties[] = { VIRTIO_PCI_FLAG_ATS_BIT, false),DEFINE_PROP_BIT ("x-ats-page-aligned" , VirtIOPCIProxy, flags,VIRTIO_PCI_FLAG_ATS_PAGE_ALIGNED_BIT , true), -DEFINE_PROP_BIT ("x-pcie-lnkctl-init" , VirtIOPCIProxy, flags, -VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT , true),DEFINE_PROP_BIT ("x-pcie-pm-init" , VirtIOPCIProxy, flags,VIRTIO_PCI_FLAG_INIT_PM_BIT , true), DEFINE_PROP_BIT("x-pcie-pm-no-soft-reset", VirtIOPCIProxy, flags,
Signature · 1 line
2.53.0
PATCH v2 9/16 hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
VIRTIO_PCI_FLAG_INIT_PM was only used by the hw_compat_2_8[] array, via the 'x-pcie-pm-init=off' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_INIT_PM (see commit 9a4c0e220d8 for similar VIRTIO_PCI_FLAG_* enum removal).
Message-ID: <[email protected]>
--- include/hw/virtio/virtio-pci.h | 4 ---- hw/virtio/virtio-pci.c | 19 +++++-------------- 2 files changed, 5 insertions(+), 18 deletions(-)
include/hw/virtio/virtio-pci.h +0 -4
@@ -35,7 +35,6 @@ enum {VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT ,VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT ,VIRTIO_PCI_FLAG_ATS_BIT , -VIRTIO_PCI_FLAG_INIT_PM_BIT ,VIRTIO_PCI_FLAG_INIT_FLR_BIT ,VIRTIO_PCI_FLAG_AER_BIT , VIRTIO_PCI_FLAG_ATS_PAGE_ALIGNED_BIT,
@@ -61,9 +60,6 @@ enum {/* address space translation service */ #define VIRTIO_PCI_FLAG_ATS (1 << VIRTIO_PCI_FLAG_ATS_BIT) -/* Init Power Management */ -#define VIRTIO_PCI_FLAG_INIT_PM (1 << VIRTIO_PCI_FLAG_INIT_PM_BIT) -/* Init The No_Soft_Reset bit of Power Management */ #define VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET \ (1 << VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET_BIT)
hw/virtio/virtio-pci.c +5 -14
@@ -2318,11 +2318,9 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp) PCI_PM_CTRL_NO_SOFT_RESET); } -if (proxy->flags &VIRTIO_PCI_FLAG_INIT_PM ) { -/* Init Power Management Control Register */ -pci_set_word (pci_dev->wmask + pos +PCI_PM_CTRL , -PCI_PM_CTRL_STATE_MASK ); - } +/* Init Power Management Control Register */ +pci_set_word (pci_dev->wmask + pos +PCI_PM_CTRL , +PCI_PM_CTRL_STATE_MASK );if (proxy->flags &VIRTIO_PCI_FLAG_ATS ) { pcie_ats_init(pci_dev, proxy->last_pcie_cap_offset,
@@ -2418,16 +2416,11 @@ static void virtio_pci_bus_reset_hold(Object *obj, ResetType type)virtio_pci_reset (qdev);if (pci_is_express (dev)) { -VirtIOPCIProxy *proxy =VIRTIO_PCI (dev); -pcie_cap_deverr_reset (dev);pcie_cap_lnkctl_reset (dev); -if (proxy->flags &VIRTIO_PCI_FLAG_INIT_PM ) { -pci_word_test_and_clear_mask ( - dev->config + dev->pm_cap +PCI_PM_CTRL , -PCI_PM_CTRL_STATE_MASK ); - } +pci_word_test_and_clear_mask (dev->config + dev->pm_cap +PCI_PM_CTRL , +PCI_PM_CTRL_STATE_MASK ); } }
@@ -2442,8 +2435,6 @@ static const Property virtio_pci_properties[] = { VIRTIO_PCI_FLAG_ATS_BIT, false),DEFINE_PROP_BIT ("x-ats-page-aligned" , VirtIOPCIProxy, flags,VIRTIO_PCI_FLAG_ATS_PAGE_ALIGNED_BIT , true), -DEFINE_PROP_BIT ("x-pcie-pm-init" , VirtIOPCIProxy, flags, -VIRTIO_PCI_FLAG_INIT_PM_BIT , true),DEFINE_PROP_BIT ("x-pcie-pm-no-soft-reset" , VirtIOPCIProxy, flags,VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET_BIT , false), DEFINE_PROP_BIT("x-pcie-flr-init", VirtIOPCIProxy, flags,
Signature · 1 line
2.53.0
PATCH v2 10/16 hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
These machines has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") they can now be removed.
Message-ID: <[email protected]>
--- hw/i386/pc_piix.c | 9 --------- hw/i386/pc_q35.c | 9 --------- 2 files changed, 18 deletions(-)
hw/i386/pc_piix.c +0 -9
@@ -705,15 +705,6 @@ static void pc_i440fx_machine_2_10_options(MachineClass *m)DEFINE_I440FX_MACHINE (2 ,10 ); -static void pc_i440fx_machine_2_9_options (MachineClass *m) -{ -pc_i440fx_machine_2_10_options (m); -compat_props_add (m->compat_props, hw_compat_2_9, hw_compat_2_9_len); -compat_props_add (m->compat_props, pc_compat_2_9, pc_compat_2_9_len); -} - -DEFINE_I440FX_MACHINE (2 ,9 ); -#ifdef CONFIG_XEN static void xenfv_machine_4_2_options (MachineClass *m) {
hw/i386/pc_q35.c +0 -9
@@ -652,12 +652,3 @@ static void pc_q35_machine_2_10_options(MachineClass *m) }DEFINE_Q35_MACHINE (2 ,10 ); - -static void pc_q35_machine_2_9_options (MachineClass *m) -{ -pc_q35_machine_2_10_options (m); -compat_props_add (m->compat_props, hw_compat_2_9, hw_compat_2_9_len); -compat_props_add (m->compat_props, pc_compat_2_9, pc_compat_2_9_len); -} - -DEFINE_Q35_MACHINE (2 ,9 );
Signature · 1 line
2.53.0
PATCH v2 11/16 hw/i386/pc: Remove pc_compat_2_9[] array
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The pc_compat_2_9[] array was only used by the pc-q35-2.9 and pc-i440fx-2.9 machines, which got removed. Remove it.
Message-ID: <[email protected]>
--- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 5 ----- 2 files changed, 8 deletions(-)
include/hw/i386/pc.h +0 -3
@@ -289,9 +289,6 @@ extern const size_t pc_compat_2_11_len;extern GlobalProperty pc_compat_2_10[];extern const size_t pc_compat_2_10_len; -extern GlobalProperty pc_compat_2_9[]; -extern const size_t pc_compat_2_9_len; -#define DEFINE_PC_MACHINE (suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, \ const void *data) \
hw/i386/pc.c +0 -5
@@ -242,11 +242,6 @@ GlobalProperty pc_compat_2_10[] = { };const size_t pc_compat_2_10_len =G_N_ELEMENTS (pc_compat_2_10); -GlobalProperty pc_compat_2_9[] = { - {"mch" ,"extended-tseg-mbytes" ,"0" }, -}; -const size_t pc_compat_2_9_len =G_N_ELEMENTS (pc_compat_2_9); -/* * @PC_FW_DATA: * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables
Signature · 1 line
2.53.0
PATCH v2 12/16 hw/core/machine: Remove hw_compat_2_9[] array
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The hw_compat_2_9[] array was only used by the pc-q35-2.9 and pc-i440fx-2.9 machines, which got removed. Remove it.
Message-ID: <[email protected]>
--- include/hw/core/boards.h | 3 --- hw/core/machine.c | 8 -------- 2 files changed, 11 deletions(-)
include/hw/core/boards.h +0 -3
@@ -877,7 +877,4 @@ extern const size_t hw_compat_2_11_len;extern GlobalProperty hw_compat_2_10[];extern const size_t hw_compat_2_10_len; -extern GlobalProperty hw_compat_2_9[]; -extern const size_t hw_compat_2_9_len; -#endif
hw/core/machine.c +0 -8
@@ -264,14 +264,6 @@ GlobalProperty hw_compat_2_10[] = { };const size_t hw_compat_2_10_len =G_N_ELEMENTS (hw_compat_2_10); -GlobalProperty hw_compat_2_9[] = { - {"pci-bridge" ,"shpc" ,"off" }, - {"intel-iommu" ,"pt" ,"off" }, - {"virtio-net-device" ,"x-mtu-bypass-backend" ,"off" }, - {"pcie-root-port" ,"x-migrate-msix" ,"false" }, -}; -const size_t hw_compat_2_9_len =G_N_ELEMENTS (hw_compat_2_9); -MachineState *current_machine;static char *machine_get_kernel (Object *obj,Error **errp)
Signature · 1 line
2.53.0
PATCH v2 13/16 hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The VirtIONet::mtu_bypass_backend boolean was only set in the hw_compat_2_9[] array, via the 'x-mtu-bypass-backend=off' property. We removed all machines using that array, lets remove that property and all the code around it.
Message-ID: <[email protected]>
--- include/hw/virtio/virtio-net.h | 1 - hw/net/virtio-net.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-)
include/hw/virtio/virtio-net.h +0 -1
@@ -218,7 +218,6 @@ struct VirtIONet {uint64_t saved_guest_offloads;AnnounceTimer announce_timer;bool needs_vnet_hdr_swap; -bool mtu_bypass_backend;/* primary failover device is hidden*/ bool failover_primary_hidden;bool failover;
hw/net/virtio-net.c +2 -6
@@ -935,8 +935,7 @@ static void virtio_net_set_features(VirtIODevice *vdev,int i;virtio_features_copy (features, in_features); -if (n->mtu_bypass_backend && - !virtio_has_feature (vdev->backend_features,VIRTIO_NET_F_MTU )) { +if (!virtio_has_feature (vdev->backend_features,VIRTIO_NET_F_MTU )) {virtio_clear_feature_ex (features,VIRTIO_NET_F_MTU ); }
@@ -3160,8 +3159,7 @@ static void virtio_net_get_features(VirtIODevice *vdev, uint64_t *features,vhost_net_get_features_ex (get_vhost_net (nc->peer), features);virtio_features_copy (vdev->backend_features_ex, features); -if (n->mtu_bypass_backend && - (n->host_features &1ULL <<VIRTIO_NET_F_MTU )) { +if ((n->host_features &1ULL <<VIRTIO_NET_F_MTU ) !=0 ) {virtio_add_feature_ex (features,VIRTIO_NET_F_MTU ); }
@@ -4251,8 +4249,6 @@ static const Property virtio_net_properties[] = {DEFINE_PROP_UINT16 ("tx_queue_size" , VirtIONet, net_conf.tx_queue_size,VIRTIO_NET_TX_QUEUE_DEFAULT_SIZE ),DEFINE_PROP_UINT16 ("host_mtu" , VirtIONet, net_conf.mtu,0 ), -DEFINE_PROP_BOOL ("x-mtu-bypass-backend" , VirtIONet, mtu_bypass_backend, - true),DEFINE_PROP_INT32 ("speed" , VirtIONet, net_conf.speed,SPEED_UNKNOWN ),DEFINE_PROP_STRING ("duplex" , VirtIONet, net_conf.duplex_str), DEFINE_PROP_BOOL("failover", VirtIONet, failover, false),
Signature · 1 line
2.53.0
PATCH v2 14/16 hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The GenPCIERootPort::migrate_msix boolean was only set in the hw_compat_2_9[] array, via the 'x-migrate-msix=false' property. We removed all machines using that array, lets remove that property and all the code around it.
Message-ID: <[email protected]>
--- hw/pci-bridge/gen_pcie_root_port.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
hw/pci-bridge/gen_pcie_root_port.c +2 -14
@@ -35,8 +35,6 @@ struct GenPCIERootPort {PCIESlot parent_obj;/*< public >*/ -bool migrate_msix; -/* additional resources to reserve */ PCIResReserve res_reserve; };
@@ -66,13 +64,6 @@ static void gen_rp_interrupts_uninit(PCIDevice *d)msix_uninit_exclusive_bar (d); } -static bool gen_rp_test_migrate_msix (void *opaque,int version_id) -{ -GenPCIERootPort *rp = opaque; - -return rp->migrate_msix; -} -static void gen_rp_realize (DeviceState *dev,Error **errp) {PCIDevice *d =PCI_DEVICE (dev);
@@ -121,16 +112,13 @@ static const VMStateDescription vmstate_rp_dev = {VMSTATE_PCI_DEVICE (parent_obj.parent_obj.parent_obj, PCIESlot),VMSTATE_STRUCT (parent_obj.parent_obj.parent_obj.exp.aer_log, PCIESlot,0 , vmstate_pcie_aer_log, PCIEAERLog), -VMSTATE_MSIX_TEST (parent_obj.parent_obj.parent_obj.parent_obj, - GenPCIERootPort, - gen_rp_test_migrate_msix), +VMSTATE_MSIX (parent_obj.parent_obj.parent_obj.parent_obj, + GenPCIERootPort), VMSTATE_END_OF_LIST() } };static const Property gen_rp_props[] = { -DEFINE_PROP_BOOL ("x-migrate-msix" , GenPCIERootPort, - migrate_msix, true),DEFINE_PROP_UINT32 ("bus-reserve" , GenPCIERootPort, res_reserve.bus,-1 ), DEFINE_PROP_SIZE("io-reserve", GenPCIERootPort,
Signature · 1 line
2.53.0
PATCH v2 15/16 hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The X86IOMMUState::pt_supported boolean was only set in the hw_compat_2_9[] array, via the 'pt=off' property. We removed all machines using that array, lets remove that property and all the code around it, always setting the VTD_ECAP_PT capability.
Message-ID: <[email protected]>
--- include/hw/i386/x86-iommu.h | 1 - hw/i386/intel_iommu.c | 13 ++----------- hw/i386/x86-iommu.c | 1 - 3 files changed, 2 insertions(+), 13 deletions(-)
include/hw/i386/x86-iommu.h +0 -1
@@ -63,7 +63,6 @@ struct X86IOMMUState {SysBusDevice busdev;OnOffAuto intr_supported;/* Whether vIOMMU supports IR */ bool dt_supported;/* Whether vIOMMU supports DT */ -bool pt_supported;/* Whether vIOMMU supports pass-through */ bool dma_translation;/* Whether vIOMMU supports DMA translation */ QLIST_HEAD(, IEC_Notifier) iec_notifiers; /* IEC notify list */ };
hw/i386/intel_iommu.c +2 -11
@@ -1072,6 +1072,7 @@ static inline bool vtd_ce_type_check(X86IOMMUState *x86_iommu, {switch (vtd_ce_get_type (ce)) {case VTD_CONTEXT_TT_MULTI_LEVEL : +case VTD_CONTEXT_TT_PASS_THROUGH :/* Always supported */ break ;case VTD_CONTEXT_TT_DEV_IOTLB :
@@ -1080,12 +1081,6 @@ static inline bool vtd_ce_type_check(X86IOMMUState *x86_iommu,return false; }break ; -case VTD_CONTEXT_TT_PASS_THROUGH : -if (!x86_iommu->pt_supported) { -error_report_once ("%s: PT specified but not supported" , __func__); -return false; - } -break ;default :/* Unknown type */ error_report_once("%s: unknown ce type: %"PRIu32, __func__,
@@ -5004,7 +4999,7 @@ static void vtd_cap_init(IntelIOMMUState *s) {X86IOMMUState *x86_iommu =X86_IOMMU_DEVICE (s); - s->cap =VTD_CAP_FRO |VTD_CAP_NFR |VTD_CAP_ND | + s->cap =VTD_CAP_FRO |VTD_CAP_NFR |VTD_CAP_ND |VTD_ECAP_PT |VTD_CAP_MAMV |VTD_CAP_PSI |VTD_CAP_SSLPS |VTD_CAP_ESRTPS |VTD_CAP_MGAW (s->aw_bits);if (s->dma_drain) {
@@ -5032,10 +5027,6 @@ static void vtd_cap_init(IntelIOMMUState *s) s->ecap |=VTD_ECAP_DT ; } -if (x86_iommu->pt_supported) { - s->ecap |=VTD_ECAP_PT ; - } -if (s->caching_mode) { s->cap |=VTD_CAP_CM ; }
hw/i386/x86-iommu.c +0 -1
@@ -129,7 +129,6 @@ static const Property x86_iommu_properties[] = {DEFINE_PROP_ON_OFF_AUTO ("intremap" , X86IOMMUState, intr_supported,ON_OFF_AUTO_AUTO ),DEFINE_PROP_BOOL ("device-iotlb" , X86IOMMUState, dt_supported, false), -DEFINE_PROP_BOOL ("pt" , X86IOMMUState, pt_supported, true), DEFINE_PROP_BOOL("dma-translation", X86IOMMUState, dma_translation, true), };
Signature · 1 line
2.53.0
Re: [PATCH v2 15/16] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
Quoted 8 lines · On Wed, 25 Feb 2026 10:20:23 +0100 Thomas Huth <[email protected]> wrote:
From: Philippe Mathieu-Daudé <[email protected]>
The
X86IOMMUState::pt_supportedboolean was only set in the hw_compat_2_9[] array, via the 'pt=off' property. We removed all machines using that array, lets remove that property and all the code around it, always setting theVTD_ECAP_PTcapability.
Quoted 4 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>Message-ID: <[email protected]>
[thuth: Dropped the hunks that were already merged via commit 31753d5a336f]Signed-off-by Thomas Huth <[email protected]>
Quoted 75 lines
--- include/hw/i386/x86-iommu.h | 1 - hw/i386/intel_iommu.c | 13 ++----------- hw/i386/x86-iommu.c | 1 - 3 files changed, 2 insertions(+), 13 deletions(-)include/hw/i386/x86-iommu.h +0
-1@@ -63,7 +63,6 @@ struct X86IOMMUState {SysBusDevice busdev;OnOffAuto intr_supported;/* Whether vIOMMU supports IR */ bool dt_supported;/* Whether vIOMMU supports DT */ -bool pt_supported;/* Whether vIOMMU supports pass-through */ bool dma_translation;/* Whether vIOMMU supports DMA translation */ QLIST_HEAD(, IEC_Notifier) iec_notifiers; /* IEC notify list */ };hw/i386/intel_iommu.c +2
-11@@ -1072,6 +1072,7 @@ static inline bool vtd_ce_type_check(X86IOMMUState *x86_iommu, {switch (vtd_ce_get_type (ce)) {case VTD_CONTEXT_TT_MULTI_LEVEL : +case VTD_CONTEXT_TT_PASS_THROUGH :/* Always supported */ break ;case VTD_CONTEXT_TT_DEV_IOTLB :@@ -1080,12 +1081,6 @@ static inline bool vtd_ce_type_check(X86IOMMUState *x86_iommu,return false; }break ; -case VTD_CONTEXT_TT_PASS_THROUGH : -if (!x86_iommu->pt_supported) { -error_report_once ("%s: PT specified but not supported" , __func__); -return false; - } -break ;default :/* Unknown type */ error_report_once("%s: unknown ce type: %"PRIu32, __func__,@@ -5004,7 +4999,7 @@ static void vtd_cap_init(IntelIOMMUState *s) {X86IOMMUState *x86_iommu =X86_IOMMU_DEVICE (s); - s->cap =VTD_CAP_FRO |VTD_CAP_NFR |VTD_CAP_ND | + s->cap =VTD_CAP_FRO |VTD_CAP_NFR |VTD_CAP_ND |VTD_ECAP_PT |VTD_CAP_MAMV |VTD_CAP_PSI |VTD_CAP_SSLPS |VTD_CAP_ESRTPS |VTD_CAP_MGAW (s->aw_bits);if (s->dma_drain) {@@ -5032,10 +5027,6 @@ static void vtd_cap_init(IntelIOMMUState *s) s->ecap |=VTD_ECAP_DT ; } -if (x86_iommu->pt_supported) { - s->ecap |=VTD_ECAP_PT ; - } -if (s->caching_mode) { s->cap |=VTD_CAP_CM ; }hw/i386/x86-iommu.c +0
-1@@ -129,7 +129,6 @@ static const Property x86_iommu_properties[] = {DEFINE_PROP_ON_OFF_AUTO ("intremap" , X86IOMMUState, intr_supported,ON_OFF_AUTO_AUTO ),DEFINE_PROP_BOOL ("device-iotlb" , X86IOMMUState, dt_supported, false), -DEFINE_PROP_BOOL ("pt" , X86IOMMUState, pt_supported, true), DEFINE_PROP_BOOL("dma-translation", X86IOMMUState, dma_translation, true), };
PATCH v2 16/16 tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machine
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
The machine has been removed, so the related test can now be removed, too.
--- tests/qtest/test-x86-cpuid-compat.c | 11 ----------- 1 file changed, 11 deletions(-)
tests/qtest/test-x86-cpuid-compat.c +0 -11
@@ -343,17 +343,6 @@ int main(int argc, char **argv)"486" ,"xlevel2=0xC0000002,xstore=on" , NULL, "xlevel2", 0xC0000002); -/* Check compatibility of old machine-types that didn't -* auto-increase level/xlevel/xlevel2: */ -if (qtest_has_machine ("pc-i440fx-2.9" )) { -add_cpuid_test ("x86/cpuid/auto-level7/pc-i440fx-2.9/off" , -"Conroe" ,NULL ,"pc-i440fx-2.9" , -"level" ,10 ); -add_cpuid_test ("x86/cpuid/auto-level7/pc-i440fx-2.9/on" , -"Conroe" ,"erms=on" ,"pc-i440fx-2.9" , -"level" ,10 ); - } -/* Test feature parsing */ add_feature_test("x86/cpuid/features/plus", "486", "+arat",
Signature · 1 line
2.53.0
Re: [PATCH v2 16/16] tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machine
Quoted 21 lines · Thomas Huth
From: Thomas Huth <[email protected]>
The machine has been removed, so the related test can now be removed, too.
Signed-off-by Thomas Huth <[email protected]>--- tests/qtest/test-x86-cpuid-compat.c | 11 ----------- 1 file changed, 11 deletions(-)tests/qtest/test-x86-cpuid-compat.c +0
-4@@ -343,17 +343,6 @@ int main(int argc, char **argv)"486" ,"xlevel2=0xC0000002,xstore=on" , NULL, "xlevel2", 0xC0000002); -/* Check compatibility of old machine-types that didn't -* auto-increase level/xlevel/xlevel2: */ -if (qtest_has_machine ("pc-i440fx-2.9" )) { - add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.9/off",
tests/qtest/test-x86-cpuid-compat.c int main(int argc, char **argv) · line 348
Quoted 10 lines
tests/qtest/test-x86-cpuid-compat.c +0
-7-"Conroe" ,NULL ,"pc-i440fx-2.9" , - "level", 10); -add_cpuid_test ("x86/cpuid/auto-level7/pc-i440fx-2.9/on" , -"Conroe" ,"erms=on" ,"pc-i440fx-2.9" , -"level" ,10 ); - } -/* Test feature parsing */ add_feature_test("x86/cpuid/features/plus", "486", "+arat",
Re: [PATCH v2 16/16] tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machine
In reply to Thomas HuthQuoted 5 lines · On Wed, 25 Feb 2026 10:20:24 +0100 Thomas Huth <[email protected]> wrote:
From: Thomas Huth <[email protected]>
The machine has been removed, so the related test can now be removed, too.
Signed-off-by Thomas Huth <[email protected]>
Quoted 26 lines
--- tests/qtest/test-x86-cpuid-compat.c | 11 ----------- 1 file changed, 11 deletions(-)tests/qtest/test-x86-cpuid-compat.c +0
-11@@ -343,17 +343,6 @@ int main(int argc, char **argv)"486" ,"xlevel2=0xC0000002,xstore=on" , NULL, "xlevel2", 0xC0000002); -/* Check compatibility of old machine-types that didn't -* auto-increase level/xlevel/xlevel2: */ -if (qtest_has_machine ("pc-i440fx-2.9" )) { -add_cpuid_test ("x86/cpuid/auto-level7/pc-i440fx-2.9/off" , -"Conroe" ,NULL ,"pc-i440fx-2.9" , -"level" ,10 ); -add_cpuid_test ("x86/cpuid/auto-level7/pc-i440fx-2.9/on" , -"Conroe" ,"erms=on" ,"pc-i440fx-2.9" , -"level" ,10 ); - } -/* Test feature parsing */ add_feature_test("x86/cpuid/features/plus", "486", "+arat",
[PATCH 17/16] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
v2:
- do not check for SMI features if hotplug happens when SMI is not enabled. (matters for qtest and possibly seabios)
- removing property also removes default ICH9_LPC_SMI_F_BROADCAST_BIT put default back in place only set it initfn() instead
The ICH9_LPC_SMI_F_BROADCAST_BIT feature bit was only set in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off' property. We removed all machines using that array, lets remove that property and all the code around it.
--- hw/acpi/ich9.c | 4 ++-- hw/isa/lpc_ich9.c | 23 ++++------------------- 2 files changed, 6 insertions(+), 21 deletions(-)
hw/acpi/ich9.c +2 -2
@@ -432,7 +432,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ))) {error_setg (errp,"cpu hotplug with SMI wasn't enabled by firmware" ); error_append_hint(errp, "update machine type to newer than 5.1 "
@@ -476,7 +476,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, }else if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT ))) {error_setg (errp,"cpu hot-unplug with SMI wasn't enabled " "by firmware" );
hw/isa/lpc_ich9.c +4 -19
@@ -404,15 +404,6 @@ static void smi_features_ok_callback(void *opaque) guest_cpu_hotplug_features = guest_features & (BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ) |BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )); -if (!(guest_features &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT )) && - guest_cpu_hotplug_features) { -/* -* cpu hot-[un]plug with SMI requires SMI broadcast, -* leave @features_ok at zero -*/ -return ; - } -if (guest_cpu_hotplug_features ==BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )) {/* cpu hot-unplug is unsupported without cpu-hotplug */
@@ -474,14 +465,9 @@ static void ich9_apm_ctrl_changed(uint32_t val, void *arg)/* SMI_EN = PMBASE + 30. SMI control and enable register */ if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN ) { -if (lpc->smi_negotiated_features & - (UINT64_C (1 ) <<ICH9_LPC_SMI_F_BROADCAST_BIT )) { -CPUState *cs; -CPU_FOREACH (cs) { -cpu_interrupt (cs,CPU_INTERRUPT_SMI ); - } - }else { -cpu_interrupt (current_cpu,CPU_INTERRUPT_SMI ); +CPUState *cs; +CPU_FOREACH (cs) { +cpu_interrupt (cs,CPU_INTERRUPT_SMI ); } } }
@@ -685,6 +671,7 @@ static void ich9_lpc_initfn(Object *obj)static const uint8_t acpi_enable_cmd =ICH9_APM_ACPI_ENABLE ;static const uint8_t acpi_disable_cmd =ICH9_APM_ACPI_DISABLE ; + lpc->smi_host_features =BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT );object_initialize_child (obj,"rtc" , &lpc->rtc,TYPE_MC146818_RTC );
@@ -834,8 +821,6 @@ static const Property ich9_lpc_properties[] = {DEFINE_PROP_BOOL ("noreboot" , ICH9LPCState, pin_strap.spkr_hi, false),DEFINE_PROP_BOOL ("smm-compat" , ICH9LPCState, pm.smm_compat, false),DEFINE_PROP_BOOL ("smm-enabled" , ICH9LPCState, pm.smm_enabled, false), -DEFINE_PROP_BIT64 ("x-smi-broadcast" , ICH9LPCState, smi_host_features, -ICH9_LPC_SMI_F_BROADCAST_BIT , true),DEFINE_PROP_BIT64 ("x-smi-cpu-hotplug" , ICH9LPCState, smi_host_features,ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT , true), DEFINE_PROP_BIT64("x-smi-cpu-hotunplug", ICH9LPCState, smi_host_features,
Signature · 1 line
2.47.3
Re: [PATCH 17/16] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
Quoted 81 lines · Igor Mammedov
From: Philippe Mathieu-Daudé <[email protected]>
v2:
- do not check for SMI features if hotplug happens when SMI is not enabled. (matters for qtest and possibly seabios)
- removing property also removes defaultICH9_LPC_SMI_F_BROADCAST_BITput default back in place only set itinitfn()insteadThe
ICH9_LPC_SMI_F_BROADCAST_BITfeature bit was only set in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off' property. We removed all machines using that array, lets remove that property and all the code around it.Signed-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Igor Mammedov <[email protected]>--- hw/acpi/ich9.c | 4 ++-- hw/isa/lpc_ich9.c | 23 ++++------------------- 2 files changed, 6 insertions(+), 21 deletions(-)hw/acpi/ich9.c +2
-2@@ -432,7 +432,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ))) {error_setg (errp,"cpu hotplug with SMI wasn't enabled by firmware" ); error_append_hint(errp, "update machine type to newer than 5.1 "@@ -476,7 +476,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, }else if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT ))) {error_setg (errp,"cpu hot-unplug with SMI wasn't enabled " "by firmware" );hw/isa/lpc_ich9.c +3
-17@@ -404,15 +404,6 @@ static void smi_features_ok_callback(void *opaque) guest_cpu_hotplug_features = guest_features & (BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ) |BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )); -if (!(guest_features &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT )) && - guest_cpu_hotplug_features) { -/* -* cpu hot-[un]plug with SMI requires SMI broadcast, -* leave @features_ok at zero -*/ -return ; - } -if (guest_cpu_hotplug_features ==BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )) {/* cpu hot-unplug is unsupported without cpu-hotplug */ @@ -474,14 +465,9 @@ static void ich9_apm_ctrl_changed(uint32_t val, void *arg)/* SMI_EN = PMBASE + 30. SMI control and enable register */ if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN ) { -if (lpc->smi_negotiated_features & - (UINT64_C (1 ) <<ICH9_LPC_SMI_F_BROADCAST_BIT )) { -CPUState *cs; -CPU_FOREACH (cs) { -cpu_interrupt (cs,CPU_INTERRUPT_SMI ); - } - }else { -cpu_interrupt (current_cpu,CPU_INTERRUPT_SMI ); +CPUState *cs; +CPU_FOREACH (cs) { +cpu_interrupt (cs,CPU_INTERRUPT_SMI ); } } }
hw/isa/lpc_ich9.c static void ich9_lpc_initfn(Object *obj) · line 674
Quoted 4 lines
hw/isa/lpc_ich9.c +1
-0@@ -685,6 +671,7 @@ static void ich9_lpc_initfn(Object *obj)static const uint8_t acpi_enable_cmd =ICH9_APM_ACPI_ENABLE ;static const uint8_t acpi_disable_cmd =ICH9_APM_ACPI_DISABLE ; + lpc->smi_host_features =BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT );
Shouldn't that rather be a "|=" instead of the "=" so that we don't lose the other bits?
Thomas
Quoted 11 lines
hw/isa/lpc_ich9.c +0
-2object_initialize_child (obj,"rtc" , &lpc->rtc,TYPE_MC146818_RTC );@@ -834,8 +821,6 @@ static const Property ich9_lpc_properties[] = {DEFINE_PROP_BOOL ("noreboot" , ICH9LPCState, pin_strap.spkr_hi, false),DEFINE_PROP_BOOL ("smm-compat" , ICH9LPCState, pm.smm_compat, false),DEFINE_PROP_BOOL ("smm-enabled" , ICH9LPCState, pm.smm_enabled, false), -DEFINE_PROP_BIT64 ("x-smi-broadcast" , ICH9LPCState, smi_host_features, -ICH9_LPC_SMI_F_BROADCAST_BIT , true),DEFINE_PROP_BIT64 ("x-smi-cpu-hotplug" , ICH9LPCState, smi_host_features,ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT , true), DEFINE_PROP_BIT64("x-smi-cpu-hotunplug", ICH9LPCState, smi_host_features,
Re: [PATCH 17/16] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
Quoted 83 lines · On Wed, 4 Mar 2026 18:20:27 +0100 Thomas Huth <[email protected]> wrote:
Quoted 82 lines · Igor Mammedov
From: Philippe Mathieu-Daudé <[email protected]>
v2:
- do not check for SMI features if hotplug happens when SMI is not enabled. (matters for qtest and possibly seabios)
- removing property also removes defaultICH9_LPC_SMI_F_BROADCAST_BITput default back in place only set itinitfn()insteadThe
ICH9_LPC_SMI_F_BROADCAST_BITfeature bit was only set in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off' property. We removed all machines using that array, lets remove that property and all the code around it.Signed-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Igor Mammedov <[email protected]>--- hw/acpi/ich9.c | 4 ++-- hw/isa/lpc_ich9.c | 23 ++++------------------- 2 files changed, 6 insertions(+), 21 deletions(-)hw/acpi/ich9.c +2
-2@@ -432,7 +432,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ))) {error_setg (errp,"cpu hotplug with SMI wasn't enabled by firmware" ); error_append_hint(errp, "update machine type to newer than 5.1 "@@ -476,7 +476,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, }else if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT ))) {error_setg (errp,"cpu hot-unplug with SMI wasn't enabled " "by firmware" );hw/isa/lpc_ich9.c +3
-17@@ -404,15 +404,6 @@ static void smi_features_ok_callback(void *opaque) guest_cpu_hotplug_features = guest_features & (BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ) |BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )); -if (!(guest_features &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT )) && - guest_cpu_hotplug_features) { -/* -* cpu hot-[un]plug with SMI requires SMI broadcast, -* leave @features_ok at zero -*/ -return ; - } -if (guest_cpu_hotplug_features ==BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )) {/* cpu hot-unplug is unsupported without cpu-hotplug */ @@ -474,14 +465,9 @@ static void ich9_apm_ctrl_changed(uint32_t val, void *arg)/* SMI_EN = PMBASE + 30. SMI control and enable register */ if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN ) { -if (lpc->smi_negotiated_features & - (UINT64_C (1 ) <<ICH9_LPC_SMI_F_BROADCAST_BIT )) { -CPUState *cs; -CPU_FOREACH (cs) { -cpu_interrupt (cs,CPU_INTERRUPT_SMI ); - } - }else { -cpu_interrupt (current_cpu,CPU_INTERRUPT_SMI ); +CPUState *cs; +CPU_FOREACH (cs) { +cpu_interrupt (cs,CPU_INTERRUPT_SMI ); } } }@@ -685,6 +671,7 @@ static void ich9_lpc_initfn(Object *obj)
Quoted 6 lines
hw/isa/lpc_ich9.c static void ich9_lpc_initfn(Object *obj) · line 674
Quoted 3 lines
hw/isa/lpc_ich9.c +1
-0static const uint8_t acpi_enable_cmd =ICH9_APM_ACPI_ENABLE ;static const uint8_t acpi_disable_cmd =ICH9_APM_ACPI_DISABLE ; + lpc->smi_host_features =BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT );Shouldn't that rather be a "|=" instead of the "=" so that we don't lose the other bits?
Indeed it should be '|=',
can you fix it up on merge or should I better send fixed up version?
Quoted 16 lines
Thomas
Quoted 11 lines
hw/isa/lpc_ich9.c +0
-2object_initialize_child (obj,"rtc" , &lpc->rtc,TYPE_MC146818_RTC );@@ -834,8 +821,6 @@ static const Property ich9_lpc_properties[] = {DEFINE_PROP_BOOL ("noreboot" , ICH9LPCState, pin_strap.spkr_hi, false),DEFINE_PROP_BOOL ("smm-compat" , ICH9LPCState, pm.smm_compat, false),DEFINE_PROP_BOOL ("smm-enabled" , ICH9LPCState, pm.smm_enabled, false), -DEFINE_PROP_BIT64 ("x-smi-broadcast" , ICH9LPCState, smi_host_features, -ICH9_LPC_SMI_F_BROADCAST_BIT , true),DEFINE_PROP_BIT64 ("x-smi-cpu-hotplug" , ICH9LPCState, smi_host_features,ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT , true), DEFINE_PROP_BIT64("x-smi-cpu-hotunplug", ICH9LPCState, smi_host_features,
Re: [PATCH 17/16] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
Quoted 93 lines · Igor Mammedov
Quoted 83 lines · On Wed, 4 Mar 2026 18:20:27 +0100 Thomas Huth <[email protected]> wrote:
Quoted 82 lines · Igor Mammedov
From: Philippe Mathieu-Daudé <[email protected]>
v2:
- do not check for SMI features if hotplug happens when SMI is not enabled. (matters for qtest and possibly seabios)
- removing property also removes defaultICH9_LPC_SMI_F_BROADCAST_BITput default back in place only set itinitfn()insteadThe
ICH9_LPC_SMI_F_BROADCAST_BITfeature bit was only set in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off' property. We removed all machines using that array, lets remove that property and all the code around it.Signed-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Igor Mammedov <[email protected]>--- hw/acpi/ich9.c | 4 ++-- hw/isa/lpc_ich9.c | 23 ++++------------------- 2 files changed, 6 insertions(+), 21 deletions(-)hw/acpi/ich9.c +2
-2@@ -432,7 +432,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ))) {error_setg (errp,"cpu hotplug with SMI wasn't enabled by firmware" ); error_append_hint(errp, "update machine type to newer than 5.1 "@@ -476,7 +476,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, }else if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT ))) {error_setg (errp,"cpu hot-unplug with SMI wasn't enabled " "by firmware" );hw/isa/lpc_ich9.c +3
-17@@ -404,15 +404,6 @@ static void smi_features_ok_callback(void *opaque) guest_cpu_hotplug_features = guest_features & (BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ) |BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )); -if (!(guest_features &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT )) && - guest_cpu_hotplug_features) { -/* -* cpu hot-[un]plug with SMI requires SMI broadcast, -* leave @features_ok at zero -*/ -return ; - } -if (guest_cpu_hotplug_features ==BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )) {/* cpu hot-unplug is unsupported without cpu-hotplug */ @@ -474,14 +465,9 @@ static void ich9_apm_ctrl_changed(uint32_t val, void *arg)/* SMI_EN = PMBASE + 30. SMI control and enable register */ if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN ) { -if (lpc->smi_negotiated_features & - (UINT64_C (1 ) <<ICH9_LPC_SMI_F_BROADCAST_BIT )) { -CPUState *cs; -CPU_FOREACH (cs) { -cpu_interrupt (cs,CPU_INTERRUPT_SMI ); - } - }else { -cpu_interrupt (current_cpu,CPU_INTERRUPT_SMI ); +CPUState *cs; +CPU_FOREACH (cs) { +cpu_interrupt (cs,CPU_INTERRUPT_SMI ); } } }@@ -685,6 +671,7 @@ static void ich9_lpc_initfn(Object *obj)Quoted 6 lines
hw/isa/lpc_ich9.c static void ich9_lpc_initfn(Object *obj) · line 674
Quoted 3 lines
hw/isa/lpc_ich9.c +1
-0static const uint8_t acpi_enable_cmd =ICH9_APM_ACPI_ENABLE ;static const uint8_t acpi_disable_cmd =ICH9_APM_ACPI_DISABLE ; + lpc->smi_host_features =BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT );Shouldn't that rather be a "|=" instead of the "=" so that we don't lose the other bits?
Quoted 2 lines
Indeed it should be '|=',
can you fix it up on merge or should I better send fixed up version?
I tried to fix it, but I still see an issue with the bios-tables-test qtest during "make check" - it does not finish anymore and is finally killed by the timeout. Does "make check-qtest" work for you?
Thomas
Re: [PATCH 17/16] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
Quoted 94 lines · On Thu, 5 Mar 2026 13:33:21 +0100 Thomas Huth <[email protected]> wrote:
Quoted 93 lines · Igor Mammedov
Quoted 89 lines · On Wed, 4 Mar 2026 18:20:27 +0100 Thomas Huth <[email protected]> wrote:
Quoted 81 lines · Igor Mammedov
From: Philippe Mathieu-Daudé <[email protected]>
v2:
- do not check for SMI features if hotplug happens when SMI is not enabled. (matters for qtest and possibly seabios)
- removing property also removes defaultICH9_LPC_SMI_F_BROADCAST_BITput default back in place only set itinitfn()insteadThe
ICH9_LPC_SMI_F_BROADCAST_BITfeature bit was only set in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off' property. We removed all machines using that array, lets remove that property and all the code around it.Signed-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Igor Mammedov <[email protected]>--- hw/acpi/ich9.c | 4 ++-- hw/isa/lpc_ich9.c | 23 ++++------------------- 2 files changed, 6 insertions(+), 21 deletions(-)hw/acpi/ich9.c +2
-2@@ -432,7 +432,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ))) {error_setg (errp,"cpu hotplug with SMI wasn't enabled by firmware" ); error_append_hint(errp, "update machine type to newer than 5.1 "@@ -476,7 +476,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, }else if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT ))) {error_setg (errp,"cpu hot-unplug with SMI wasn't enabled " "by firmware" );hw/isa/lpc_ich9.c +3
-17@@ -404,15 +404,6 @@ static void smi_features_ok_callback(void *opaque) guest_cpu_hotplug_features = guest_features & (BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ) |BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )); -if (!(guest_features &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT )) && - guest_cpu_hotplug_features) { -/* -* cpu hot-[un]plug with SMI requires SMI broadcast, -* leave @features_ok at zero -*/ -return ; - } -if (guest_cpu_hotplug_features ==BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )) {/* cpu hot-unplug is unsupported without cpu-hotplug */ @@ -474,14 +465,9 @@ static void ich9_apm_ctrl_changed(uint32_t val, void *arg)/* SMI_EN = PMBASE + 30. SMI control and enable register */ if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN ) { -if (lpc->smi_negotiated_features & - (UINT64_C (1 ) <<ICH9_LPC_SMI_F_BROADCAST_BIT )) { -CPUState *cs; -CPU_FOREACH (cs) { -cpu_interrupt (cs,CPU_INTERRUPT_SMI ); - } - }else { -cpu_interrupt (current_cpu,CPU_INTERRUPT_SMI ); +CPUState *cs; +CPU_FOREACH (cs) { +cpu_interrupt (cs,CPU_INTERRUPT_SMI ); } } }hw/isa/lpc_ich9.c static void ich9_lpc_initfn(Object *obj) · line 674
Quoted 4 lines
hw/isa/lpc_ich9.c +1
-0@@ -685,6 +671,7 @@ static void ich9_lpc_initfn(Object *obj)static const uint8_t acpi_enable_cmd =ICH9_APM_ACPI_ENABLE ;static const uint8_t acpi_disable_cmd =ICH9_APM_ACPI_DISABLE ; + lpc->smi_host_features =BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT );Shouldn't that rather be a "|=" instead of the "=" so that we don't lose the other bits?
Quoted 6 lines
Quoted 2 lines
Indeed it should be '|=',
can you fix it up on merge or should I better send fixed up version?I tried to fix it, but I still see an issue with the bios-tables-test qtest during "make check" - it does not finish anymore and is finally killed by the timeout. Does "make check-qtest" work for you?
cpu hotplug test did work, let me fix and check tests again
Quoted 3 lines
Thomas
Re: [PATCH 17/16] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
Quoted 97 lines · On Thu, 5 Mar 2026 15:32:18 +0100 Igor Mammedov <[email protected]> wrote:
Quoted 94 lines · On Thu, 5 Mar 2026 13:33:21 +0100 Thomas Huth <[email protected]> wrote:
Quoted 93 lines · Igor Mammedov
Quoted 89 lines · On Wed, 4 Mar 2026 18:20:27 +0100 Thomas Huth <[email protected]> wrote:
Quoted 81 lines · Igor Mammedov
From: Philippe Mathieu-Daudé <[email protected]>
v2:
- do not check for SMI features if hotplug happens when SMI is not enabled. (matters for qtest and possibly seabios)
- removing property also removes defaultICH9_LPC_SMI_F_BROADCAST_BITput default back in place only set itinitfn()insteadThe
ICH9_LPC_SMI_F_BROADCAST_BITfeature bit was only set in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off' property. We removed all machines using that array, lets remove that property and all the code around it.Signed-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Igor Mammedov <[email protected]>--- hw/acpi/ich9.c | 4 ++-- hw/isa/lpc_ich9.c | 23 ++++------------------- 2 files changed, 6 insertions(+), 21 deletions(-)hw/acpi/ich9.c +2
-2@@ -432,7 +432,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ))) {error_setg (errp,"cpu hotplug with SMI wasn't enabled by firmware" ); error_append_hint(errp, "update machine type to newer than 5.1 "@@ -476,7 +476,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, }else if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT ))) {error_setg (errp,"cpu hot-unplug with SMI wasn't enabled " "by firmware" );hw/isa/lpc_ich9.c +3
-17@@ -404,15 +404,6 @@ static void smi_features_ok_callback(void *opaque) guest_cpu_hotplug_features = guest_features & (BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ) |BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )); -if (!(guest_features &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT )) && - guest_cpu_hotplug_features) { -/* -* cpu hot-[un]plug with SMI requires SMI broadcast, -* leave @features_ok at zero -*/ -return ; - } -if (guest_cpu_hotplug_features ==BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT )) {/* cpu hot-unplug is unsupported without cpu-hotplug */ @@ -474,14 +465,9 @@ static void ich9_apm_ctrl_changed(uint32_t val, void *arg)/* SMI_EN = PMBASE + 30. SMI control and enable register */ if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN ) { -if (lpc->smi_negotiated_features & - (UINT64_C (1 ) <<ICH9_LPC_SMI_F_BROADCAST_BIT )) { -CPUState *cs; -CPU_FOREACH (cs) { -cpu_interrupt (cs,CPU_INTERRUPT_SMI ); - } - }else { -cpu_interrupt (current_cpu,CPU_INTERRUPT_SMI ); +CPUState *cs; +CPU_FOREACH (cs) { +cpu_interrupt (cs,CPU_INTERRUPT_SMI ); } } }hw/isa/lpc_ich9.c static void ich9_lpc_initfn(Object *obj) · line 674
Quoted 4 lines
hw/isa/lpc_ich9.c +1
-0@@ -685,6 +671,7 @@ static void ich9_lpc_initfn(Object *obj)static const uint8_t acpi_enable_cmd =ICH9_APM_ACPI_ENABLE ;static const uint8_t acpi_disable_cmd =ICH9_APM_ACPI_DISABLE ; + lpc->smi_host_features =BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT );Shouldn't that rather be a "|=" instead of the "=" so that we don't lose the other bits?
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Indeed it should be '|=',
can you fix it up on merge or should I better send fixed up version?I tried to fix it, but I still see an issue with the bios-tables-test qtest during "make check" - it does not finish anymore and is finally killed by the timeout. Does "make check-qtest" work for you?
cpu hotplug test did work, let me fix and check tests again
what breaks is '-M q35 -smp >1 + seabios",
where the later asks for SMI => unexpected broadcast with this patch and as result unhappy SeaBIOS, I'll send v3 as reply here.
Quoted 5 lines
Quoted 4 lines
Thomas
[PATCH v3 17/16] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
In reply to Igor MammedovFrom: Philippe Mathieu-Daudé <[email protected]>
The ICH9_LPC_SMI_F_BROADCAST_BIT feature bit was only set in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off' property. We removed all machines using that array, lets remove that property.
However the code related to ICH9_LPC_SMI_F_BROADCAST_BIT (OVMF optimization hack) has to stay as SMI broadcast is not what hw do by default, and it will cause guest reboots if SMI is triggered if firmware is not aware about it (SeaBIOS and pretty much everything else except of OVMF).
---
v3:
- use |= when initializing smi_host_features (Thomas)
- send SMI broadcast is OVMF hack, and has be be negotiated before it's used
v2:
- do not check for SMI features if hotplug happens when
SMI is not enabled. (matters for qtest and possibly seabios)
- removing property also removes default ICH9_LPC_SMI_F_BROADCAST_BIT put default back in place only set it initfn() instead
--- hw/acpi/ich9.c | 4 ++-- hw/isa/lpc_ich9.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
hw/acpi/ich9.c +2 -2
@@ -432,7 +432,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT ))) {error_setg (errp,"cpu hotplug with SMI wasn't enabled by firmware" ); error_append_hint(errp, "update machine type to newer than 5.1 "
@@ -476,7 +476,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, }else if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; -if (negotiated &BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT ) && +if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN && !(negotiated &BIT_ULL (ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT ))) {error_setg (errp,"cpu hot-unplug with SMI wasn't enabled " "by firmware" );
hw/isa/lpc_ich9.c +3 -3
@@ -476,11 +476,12 @@ static void ich9_apm_ctrl_changed(uint32_t val, void *arg)if (lpc->pm.smi_en &ICH9_PMIO_SMI_EN_APMC_EN ) {if (lpc->smi_negotiated_features & (UINT64_C (1 ) <<ICH9_LPC_SMI_F_BROADCAST_BIT )) { +/* optimization for OVMF with ICH9_LPC_SMI_F_BROADCAST_BIT */ CPUState *cs;CPU_FOREACH (cs) {cpu_interrupt (cs,CPU_INTERRUPT_SMI ); } - }else { + }else {/* default ich9 behavior, SeaBIOS doesn't have SMI broadcast */ cpu_interrupt (current_cpu,CPU_INTERRUPT_SMI ); } }
@@ -685,6 +686,7 @@ static void ich9_lpc_initfn(Object *obj)static const uint8_t acpi_enable_cmd =ICH9_APM_ACPI_ENABLE ;static const uint8_t acpi_disable_cmd =ICH9_APM_ACPI_DISABLE ; + lpc->smi_host_features |=BIT_ULL (ICH9_LPC_SMI_F_BROADCAST_BIT );object_initialize_child (obj,"rtc" , &lpc->rtc,TYPE_MC146818_RTC );
@@ -834,8 +836,6 @@ static const Property ich9_lpc_properties[] = {DEFINE_PROP_BOOL ("noreboot" , ICH9LPCState, pin_strap.spkr_hi, false),DEFINE_PROP_BOOL ("smm-compat" , ICH9LPCState, pm.smm_compat, false),DEFINE_PROP_BOOL ("smm-enabled" , ICH9LPCState, pm.smm_enabled, false), -DEFINE_PROP_BIT64 ("x-smi-broadcast" , ICH9LPCState, smi_host_features, -ICH9_LPC_SMI_F_BROADCAST_BIT , true),DEFINE_PROP_BIT64 ("x-smi-cpu-hotplug" , ICH9LPCState, smi_host_features,ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT , true), DEFINE_PROP_BIT64("x-smi-cpu-hotunplug", ICH9LPCState, smi_host_features,
Signature · 1 line
2.47.3
Quoted 48 lines · Thomas Huth
The -2.8 and -2.9 machine types of the i440fx and q35 machines are older than 6 years, so according to our support policy we can remove them, together with a lot of the compatibility knobs that they were using.
This is a respin of Philippe's original series here:
https://lore.kernel.org/qemu-devel/[email protected]
The following three patches still need a review:
- hw/pci/pcie: Remove
QEMU_PCIE_EXTCAP_INITdefinition
- hw/i386/x86-iommu: RemoveX86IOMMUState::pt_supportedfield
- tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machineChanges in v2:
- Rebased all patches to current master, and fixed the contextual conflicts
- Added Igor's Reviewed-bys
- Dropped the "hw/southbridge/ich9: RemoveICH9_LPC_SMI_F_BROADCAST_BITdefinition" patch since the code is still required (the guest can decide whether to use this feature or not)
- Dropped the two "hw/nvram/fw_cfg" patches since Igor mentioned that it still might be useful to keep this configuration knob
- Fix "hw/pci/pcie: RemoveQEMU_PCIE_EXTCAP_INITdefinition" according to Igor's review
- Adjusted "hw/i386/x86-iommu: RemoveX86IOMMUState::pt_supportedfield":
The problematic hunk has already been merged in upstream, so I dropped it from this patch.
- Added the final patch to drop a qtest that required this machinePhilippe Mathieu-Daudé (15):
hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines hw/i386/pc: Remove pc_compat_2_8[] array
hw/i386/kvm: RemoveKVMClockState::mach_use_reliable_get_clockfield hw/core/machine: Remove hw_compat_2_8[] array hw/block/pflash: RemovePFlashCFI01::old_multiple_chip_handlingfield hw/pci/pcie: RemoveQEMU_PCIE_EXTCAP_INITdefinition hw/virtio/virtio-pci: RemoveVIRTIO_PCI_FLAG_INIT_DEVERRdefinition hw/virtio/virtio-pci: RemoveVIRTIO_PCI_FLAG_INIT_LNKCTLdefinition hw/virtio/virtio-pci: RemoveVIRTIO_PCI_FLAG_INIT_PMdefinition hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines hw/i386/pc: Remove pc_compat_2_9[] array
hw/core/machine: Remove hw_compat_2_9[] array hw/net/virtio-net: RemoveVirtIONet::mtu_bypass_backendfield hw/pci-bridge/gen_pcie_rp: RemoveGenPCIERootPort::migrate_msixfield hw/i386/x86-iommu: RemoveX86IOMMUState::pt_supportedfield
Quoted 3 lines
Thomas Huth (1):
tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9
machine
If there are no objections (and Paolo or Michael do not plan to take these with their next pull request anyway), I'll add these patches (excluding 17 which needs some more work) to my next pull request, so that we finally get these in before the next softfreeze.
Thomas