* [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines
@ 2025-05-01 21:04 Philippe Mathieu-Daudé
2025-05-01 21:04 ` [PATCH 01/18] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines Philippe Mathieu-Daudé
` (17 more replies)
0 siblings, 18 replies; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
The versioned 'pc' and 'q35' machines up to 2.12 been marked
as deprecated two releases ago, and are older than 6 years,
so according to our support policy we can remove them.
This series only includes the 2.8 and 2.9 machines removal,
as it is a big enough number of LoC removed. Rest will
follow.
Based-on: <20250501183628.87479-1-philmd@linaro.org>
Philippe Mathieu-Daudé (18):
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/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
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/nvram/fw_cfg: Remove FWCfgState::file_slots field
hw/nvram/fw_cfg: Inline fw_cfg_file_slots()
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
include/hw/boards.h | 6 -----
include/hw/i386/pc.h | 6 -----
include/hw/i386/x86-iommu.h | 1 -
include/hw/nvram/fw_cfg.h | 1 -
include/hw/pci/pci.h | 2 --
include/hw/southbridge/ich9.h | 1 -
include/hw/virtio/virtio-net.h | 1 -
include/hw/virtio/virtio-pci.h | 12 ----------
hw/acpi/ich9.c | 6 ++---
hw/block/pflash_cfi01.c | 14 +++---------
hw/core/machine.c | 22 -------------------
hw/i386/amd_iommu.c | 12 ++--------
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/isa/lpc_ich9.c | 22 +++----------------
hw/net/virtio-net.c | 8 ++-----
hw/nvram/fw_cfg.c | 35 ++++--------------------------
hw/pci-bridge/gen_pcie_root_port.c | 16 ++------------
hw/pci/pci.c | 2 --
hw/pci/pcie.c | 5 -----
hw/virtio/virtio-pci.c | 35 ++++++++----------------------
25 files changed, 29 insertions(+), 260 deletions(-)
--
2.47.1
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 01/18] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-03 15:21 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 02/18] hw/i386/pc: Remove pc_compat_2_8[] array Philippe Mathieu-Daudé
` (16 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/pc_piix.c | 9 ---------
hw/i386/pc_q35.c | 9 ---------
2 files changed, 18 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 98bd8d0e67b..0d6ad9db627 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -746,15 +746,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_ISAPC
static void isapc_machine_options(MachineClass *m)
{
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index a1f46cd8f03..54c18100122 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -639,12 +639,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);
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 02/18] hw/i386/pc: Remove pc_compat_2_8[] array
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
2025-05-01 21:04 ` [PATCH 01/18] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-03 15:21 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition Philippe Mathieu-Daudé
` (15 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/i386/pc.h | 3 ---
hw/i386/pc.c | 9 ---------
2 files changed, 12 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 319ec82f709..db02cbc0d65 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -286,9 +286,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) \
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index ee7095c89a8..5f07a44d447 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -232,15 +232,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
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
2025-05-01 21:04 ` [PATCH 01/18] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines Philippe Mathieu-Daudé
2025-05-01 21:04 ` [PATCH 02/18] hw/i386/pc: Remove pc_compat_2_8[] array Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-03 15:25 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 04/18] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field Philippe Mathieu-Daudé
` (14 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/southbridge/ich9.h | 1 -
hw/acpi/ich9.c | 6 ++----
hw/isa/lpc_ich9.c | 22 +++-------------------
3 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/include/hw/southbridge/ich9.h b/include/hw/southbridge/ich9.h
index 1e231e89c92..4764c03ac2d 100644
--- a/include/hw/southbridge/ich9.h
+++ b/include/hw/southbridge/ich9.h
@@ -244,7 +244,6 @@ struct ICH9LPCState {
#define ICH9_LPC_SMI_NEGOTIATED_FEAT_PROP "x-smi-negotiated-features"
/* bit positions used in fw_cfg SMI feature negotiation */
-#define ICH9_LPC_SMI_F_BROADCAST_BIT 0
#define ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT 1
#define ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT 2
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index c7a735bf642..40564605735 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -477,8 +477,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) &&
- !(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT))) {
+ if (!(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 "
"and firmware that suppors CPU hotplug with SMM");
@@ -526,8 +525,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
!lpc->pm.cpu_hotplug_legacy) {
uint64_t negotiated = lpc->smi_negotiated_features;
- if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) &&
- !(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) {
+ if (!(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) {
error_setg(errp, "cpu hot-unplug with SMI wasn't enabled "
"by firmware");
error_append_hint(errp, "update machine type to a version having "
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 71afb45b631..c57a06e0dde 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -400,15 +400,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 */
@@ -470,14 +461,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);
}
}
}
@@ -830,8 +816,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,
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 04/18] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-03 15:27 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 05/18] hw/core/machine: Remove hw_compat_2_8[] array Philippe Mathieu-Daudé
` (13 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/kvm/clock.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index f56382717f7..726ebfcb0cb 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -23,7 +23,6 @@
#include "migration/vmstate.h"
#include "hw/sysbus.h"
#include "hw/i386/kvm/clock.h"
-#include "hw/qdev-properties.h"
#include "qapi/error.h"
#include <linux/kvm.h>
@@ -43,9 +42,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;
@@ -232,18 +228,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()
@@ -304,18 +292,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 = {
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 05/18] hw/core/machine: Remove hw_compat_2_8[] array
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 04/18] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-03 15:28 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 06/18] hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field Philippe Mathieu-Daudé
` (12 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/boards.h | 3 ---
hw/core/machine.c | 14 --------------
2 files changed, 17 deletions(-)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 77707c4376a..84bd3735c42 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -835,7 +835,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
diff --git a/hw/core/machine.c b/hw/core/machine.c
index bde19a2ff67..bc0606cf740 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -252,20 +252,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)
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 06/18] hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 05/18] hw/core/machine: Remove hw_compat_2_8[] array Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-05 15:06 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 07/18] hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition Philippe Mathieu-Daudé
` (11 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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, lets remove that
property and all the code around it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/block/pflash_cfi01.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 168101d8dfe..bba099a0c9e 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -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)
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 07/18] hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 06/18] hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-05 15:14 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 08/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition Philippe Mathieu-Daudé
` (10 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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, lets remove all the code around
QEMU_PCIE_EXTCAP_INIT.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/pci/pci.h | 2 --
hw/pci/pci.c | 2 --
hw/pci/pcie.c | 5 -----
3 files changed, 9 deletions(-)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index c2fe6caa2c6..6c72a61c4b6 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -210,8 +210,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
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index fe38c4c0287..36206c77b7c 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -90,8 +90,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),
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 1b12db6fa29..a3969423bd3 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -245,11 +245,6 @@ 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);
- }
-
return pos;
}
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 08/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (6 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 07/18] hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:07 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 09/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition Philippe Mathieu-Daudé
` (9 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/virtio/virtio-pci.h | 4 ----
hw/virtio/virtio-pci.c | 8 ++------
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
index 8abc5f8f20d..ed142932f7b 100644
--- a/include/hw/virtio/virtio-pci.h
+++ b/include/hw/virtio/virtio-pci.h
@@ -34,7 +34,6 @@ enum {
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT,
VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_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,
@@ -62,9 +61,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)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 4e0d4bda6ed..0075ae590db 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2215,10 +2215,8 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp)
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 */
@@ -2349,8 +2347,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,
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 09/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (7 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 08/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:10 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 10/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition Philippe Mathieu-Daudé
` (8 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/virtio/virtio-pci.h | 4 ----
hw/virtio/virtio-pci.c | 8 ++------
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
index ed142932f7b..a8dd613ffbc 100644
--- a/include/hw/virtio/virtio-pci.h
+++ b/include/hw/virtio/virtio-pci.h
@@ -34,7 +34,6 @@ enum {
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT,
VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_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,
@@ -61,9 +60,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)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 0075ae590db..5b86a9a447c 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2218,10 +2218,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,
@@ -2347,8 +2345,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,
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 10/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (8 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 09/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:11 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 11/18] hw/nvram/fw_cfg: Remove FWCfgState::file_slots field Philippe Mathieu-Daudé
` (7 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/virtio/virtio-pci.h | 4 ----
hw/virtio/virtio-pci.c | 19 +++++--------------
2 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
index a8dd613ffbc..d1f7403cbdf 100644
--- a/include/hw/virtio/virtio-pci.h
+++ b/include/hw/virtio/virtio-pci.h
@@ -34,7 +34,6 @@ enum {
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT,
VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_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,
@@ -60,9 +59,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)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 5b86a9a447c..9ec92d5a736 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2226,11 +2226,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, last_pcie_cap_offset,
@@ -2323,16 +2321,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);
}
}
@@ -2345,8 +2338,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,
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 11/18] hw/nvram/fw_cfg: Remove FWCfgState::file_slots field
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (9 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 10/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:24 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 12/18] hw/nvram/fw_cfg: Inline fw_cfg_file_slots() Philippe Mathieu-Daudé
` (6 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
The FWCfgState::file_slots integer was only set in the
hw_compat_2_8[] array, via the 'x-file-slots=0x10' property.
We removed all machines using that array, lets remove that
property and all the code around it. The number of slots is
always FW_CFG_FILE_SLOTS_DFLT (32).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/nvram/fw_cfg.h | 1 -
hw/nvram/fw_cfg.c | 24 +-----------------------
2 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index d41b9328fd1..07a31d214db 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -59,7 +59,6 @@ struct FWCfgState {
SysBusDevice parent_obj;
/*< public >*/
- uint16_t file_slots;
FWCfgEntry *entries[2];
int *entry_order;
FWCfgFiles *files;
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 54cfa07d3f5..71c41c979d7 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -257,7 +257,7 @@ static void fw_cfg_write(FWCfgState *s, uint8_t value)
static inline uint16_t fw_cfg_file_slots(const FWCfgState *s)
{
- return s->file_slots;
+ return FW_CFG_FILE_SLOTS_DFLT;
}
/* Note: this function returns an exclusive limit. */
@@ -1153,24 +1153,6 @@ static const TypeInfo fw_cfg_info = {
static void fw_cfg_file_slots_allocate(FWCfgState *s, Error **errp)
{
- uint16_t file_slots_max;
-
- if (fw_cfg_file_slots(s) < FW_CFG_FILE_SLOTS_MIN) {
- error_setg(errp, "\"file_slots\" must be at least 0x%x",
- FW_CFG_FILE_SLOTS_MIN);
- return;
- }
-
- /* (UINT16_MAX & FW_CFG_ENTRY_MASK) is the highest inclusive selector value
- * that we permit. The actual (exclusive) value coming from the
- * configuration is (FW_CFG_FILE_FIRST + fw_cfg_file_slots(s)). */
- file_slots_max = (UINT16_MAX & FW_CFG_ENTRY_MASK) - FW_CFG_FILE_FIRST + 1;
- if (fw_cfg_file_slots(s) > file_slots_max) {
- error_setg(errp, "\"file_slots\" must not exceed 0x%" PRIx16,
- file_slots_max);
- return;
- }
-
s->entries[0] = g_new0(FWCfgEntry, fw_cfg_max_entry(s));
s->entries[1] = g_new0(FWCfgEntry, fw_cfg_max_entry(s));
s->entry_order = g_new0(int, fw_cfg_max_entry(s));
@@ -1179,8 +1161,6 @@ static void fw_cfg_file_slots_allocate(FWCfgState *s, Error **errp)
static const Property fw_cfg_io_properties[] = {
DEFINE_PROP_BOOL("dma_enabled", FWCfgIoState, parent_obj.dma_enabled,
true),
- DEFINE_PROP_UINT16("x-file-slots", FWCfgIoState, parent_obj.file_slots,
- FW_CFG_FILE_SLOTS_DFLT),
};
static void fw_cfg_io_realize(DeviceState *dev, Error **errp)
@@ -1228,8 +1208,6 @@ static const Property fw_cfg_mem_properties[] = {
DEFINE_PROP_UINT32("data_width", FWCfgMemState, data_width, -1),
DEFINE_PROP_BOOL("dma_enabled", FWCfgMemState, parent_obj.dma_enabled,
true),
- DEFINE_PROP_UINT16("x-file-slots", FWCfgMemState, parent_obj.file_slots,
- FW_CFG_FILE_SLOTS_DFLT),
};
static void fw_cfg_mem_realize(DeviceState *dev, Error **errp)
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 12/18] hw/nvram/fw_cfg: Inline fw_cfg_file_slots()
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (10 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 11/18] hw/nvram/fw_cfg: Remove FWCfgState::file_slots field Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:29 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 13/18] hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines Philippe Mathieu-Daudé
` (5 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
Now than fw_cfg_file_slots() only returns
FW_CFG_FILE_SLOTS_DFLT, we can inline it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/nvram/fw_cfg.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 71c41c979d7..de65ee8342e 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -255,15 +255,10 @@ static void fw_cfg_write(FWCfgState *s, uint8_t value)
/* nothing, write support removed in QEMU v2.4+ */
}
-static inline uint16_t fw_cfg_file_slots(const FWCfgState *s)
-{
- return FW_CFG_FILE_SLOTS_DFLT;
-}
-
/* Note: this function returns an exclusive limit. */
static inline uint32_t fw_cfg_max_entry(const FWCfgState *s)
{
- return FW_CFG_FILE_FIRST + fw_cfg_file_slots(s);
+ return FW_CFG_FILE_FIRST + FW_CFG_FILE_SLOTS_DFLT;
}
static int fw_cfg_select(FWCfgState *s, uint16_t key)
@@ -845,13 +840,13 @@ void fw_cfg_add_file_callback(FWCfgState *s, const char *filename,
int order = 0;
if (!s->files) {
- dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * fw_cfg_file_slots(s);
+ dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * FW_CFG_FILE_SLOTS_DFLT;
s->files = g_malloc0(dsize);
fw_cfg_add_bytes(s, FW_CFG_FILE_DIR, s->files, dsize);
}
count = be32_to_cpu(s->files->count);
- assert(count < fw_cfg_file_slots(s));
+ assert(count < FW_CFG_FILE_SLOTS_DFLT);
/* Find the insertion point, sorting by file name. */
for (index = count;
@@ -926,7 +921,7 @@ void *fw_cfg_modify_file(FWCfgState *s, const char *filename,
}
}
- assert(index < fw_cfg_file_slots(s));
+ assert(index < FW_CFG_FILE_SLOTS_DFLT);
/* add new one */
fw_cfg_add_file_callback(s, filename, NULL, NULL, NULL, data, len, true);
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 13/18] hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (11 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 12/18] hw/nvram/fw_cfg: Inline fw_cfg_file_slots() Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:30 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 14/18] hw/i386/pc: Remove pc_compat_2_9[] array Philippe Mathieu-Daudé
` (4 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/pc_piix.c | 9 ---------
hw/i386/pc_q35.c | 9 ---------
2 files changed, 18 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 0d6ad9db627..5c7d0c50f8e 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -737,15 +737,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_ISAPC
static void isapc_machine_options(MachineClass *m)
{
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 54c18100122..d66d64b3b62 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -630,12 +630,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);
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 14/18] hw/i386/pc: Remove pc_compat_2_9[] array
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (12 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 13/18] hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:31 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 15/18] hw/core/machine: Remove hw_compat_2_9[] array Philippe Mathieu-Daudé
` (3 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/i386/pc.h | 3 ---
hw/i386/pc.c | 5 -----
2 files changed, 8 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index db02cbc0d65..455b869cce9 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -283,9 +283,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) \
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 5f07a44d447..298091932ab 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -227,11 +227,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
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 15/18] hw/core/machine: Remove hw_compat_2_9[] array
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (13 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 14/18] hw/i386/pc: Remove pc_compat_2_9[] array Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:31 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 16/18] hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field Philippe Mathieu-Daudé
` (2 subsequent siblings)
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/boards.h | 3 ---
hw/core/machine.c | 8 --------
2 files changed, 11 deletions(-)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 84bd3735c42..513eb2a54fd 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -832,7 +832,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
diff --git a/hw/core/machine.c b/hw/core/machine.c
index bc0606cf740..486d1adb4b9 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -244,14 +244,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)
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 16/18] hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (14 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 15/18] hw/core/machine: Remove hw_compat_2_9[] array Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:33 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 17/18] hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field Philippe Mathieu-Daudé
2025-05-01 21:04 ` [PATCH 18/18] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field Philippe Mathieu-Daudé
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/virtio/virtio-net.h | 1 -
hw/net/virtio-net.c | 8 ++------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index b9ea9e824e3..353e872f677 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -214,7 +214,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;
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 2de037c2736..a8a43ffa242 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -801,8 +801,7 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features,
features = vhost_net_get_features(get_vhost_net(nc->peer), features);
vdev->backend_features = features;
- if (n->mtu_bypass_backend &&
- (n->host_features & 1ULL << VIRTIO_NET_F_MTU)) {
+ if (n->host_features & (1ULL << VIRTIO_NET_F_MTU)) {
features |= (1ULL << VIRTIO_NET_F_MTU);
}
@@ -953,8 +952,7 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features)
Error *err = NULL;
int i;
- 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)) {
features &= ~(1ULL << VIRTIO_NET_F_MTU);
}
@@ -4121,8 +4119,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),
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 17/18] hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (15 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 16/18] hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:34 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 18/18] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field Philippe Mathieu-Daudé
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/pci-bridge/gen_pcie_root_port.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_root_port.c
index d9078e783bf..831d21225e9 100644
--- a/hw/pci-bridge/gen_pcie_root_port.c
+++ b/hw/pci-bridge/gen_pcie_root_port.c
@@ -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,
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 18/18] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
` (16 preceding siblings ...)
2025-05-01 21:04 ` [PATCH 17/18] hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field Philippe Mathieu-Daudé
@ 2025-05-01 21:04 ` Philippe Mathieu-Daudé
2025-06-06 13:42 ` Igor Mammedov
17 siblings, 1 reply; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-01 21:04 UTC (permalink / raw)
To: qemu-devel
Cc: Clément Mathieu--Drif, Zhao Liu, Hanna Reitz, Igor Mammedov,
Marcel Apfelbaum, Philippe Mathieu-Daudé, Paolo Bonzini,
Eduardo Habkost, qemu-block, Jason Wang, Richard Henderson,
Yanan Wang, Ani Sinha, Michael S. Tsirkin, Thomas Huth,
Gerd Hoffmann, Kevin Wolf, Yi Liu
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.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/i386/x86-iommu.h | 1 -
hw/i386/amd_iommu.c | 12 ++----------
hw/i386/intel_iommu.c | 13 ++-----------
hw/i386/x86-iommu.c | 1 -
4 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/include/hw/i386/x86-iommu.h b/include/hw/i386/x86-iommu.h
index bfd21649d08..d6e52b1eb6b 100644
--- a/include/hw/i386/x86-iommu.h
+++ b/include/hw/i386/x86-iommu.h
@@ -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 */
QLIST_HEAD(, IEC_Notifier) iec_notifiers; /* IEC notify list */
};
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 2cf7e24a21d..516e231bf13 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1426,7 +1426,6 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn)
AMDVIState *s = opaque;
AMDVIAddressSpace **iommu_as, *amdvi_dev_as;
int bus_num = pci_bus_num(bus);
- X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(s);
iommu_as = s->address_spaces[bus_num];
@@ -1486,15 +1485,8 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn)
AMDVI_INT_ADDR_FIRST,
&amdvi_dev_as->iommu_ir, 1);
- if (!x86_iommu->pt_supported) {
- memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, false);
- memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu),
- true);
- } else {
- memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu),
- false);
- memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, true);
- }
+ memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, false);
+ memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu), true);
}
return &iommu_as[devfn]->as;
}
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index c980cecb4ee..cc08dc41441 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -1066,6 +1066,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:
@@ -1074,12 +1075,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__,
@@ -4520,7 +4515,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_SLLPS |
VTD_CAP_MGAW(s->aw_bits);
if (s->dma_drain) {
@@ -4548,10 +4543,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;
}
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
index d34a6849f4a..ca7cd953e98 100644
--- a/hw/i386/x86-iommu.c
+++ b/hw/i386/x86-iommu.c
@@ -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),
};
static void x86_iommu_class_init(ObjectClass *klass, const void *data)
--
2.47.1
^ permalink raw reply related [flat|nested] 39+ messages in thread
* Re: [PATCH 01/18] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines
2025-05-01 21:04 ` [PATCH 01/18] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines Philippe Mathieu-Daudé
@ 2025-06-03 15:21 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-03 15:21 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:39 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/i386/pc_piix.c | 9 ---------
> hw/i386/pc_q35.c | 9 ---------
> 2 files changed, 18 deletions(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 98bd8d0e67b..0d6ad9db627 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -746,15 +746,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_ISAPC
> static void isapc_machine_options(MachineClass *m)
> {
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index a1f46cd8f03..54c18100122 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -639,12 +639,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);
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 02/18] hw/i386/pc: Remove pc_compat_2_8[] array
2025-05-01 21:04 ` [PATCH 02/18] hw/i386/pc: Remove pc_compat_2_8[] array Philippe Mathieu-Daudé
@ 2025-06-03 15:21 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-03 15:21 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:40 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/i386/pc.h | 3 ---
> hw/i386/pc.c | 9 ---------
> 2 files changed, 12 deletions(-)
>
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 319ec82f709..db02cbc0d65 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -286,9 +286,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) \
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index ee7095c89a8..5f07a44d447 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -232,15 +232,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
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
2025-05-01 21:04 ` [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition Philippe Mathieu-Daudé
@ 2025-06-03 15:25 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-03 15:25 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:41 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/southbridge/ich9.h | 1 -
> hw/acpi/ich9.c | 6 ++----
> hw/isa/lpc_ich9.c | 22 +++-------------------
> 3 files changed, 5 insertions(+), 24 deletions(-)
>
> diff --git a/include/hw/southbridge/ich9.h b/include/hw/southbridge/ich9.h
> index 1e231e89c92..4764c03ac2d 100644
> --- a/include/hw/southbridge/ich9.h
> +++ b/include/hw/southbridge/ich9.h
> @@ -244,7 +244,6 @@ struct ICH9LPCState {
> #define ICH9_LPC_SMI_NEGOTIATED_FEAT_PROP "x-smi-negotiated-features"
>
> /* bit positions used in fw_cfg SMI feature negotiation */
> -#define ICH9_LPC_SMI_F_BROADCAST_BIT 0
> #define ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT 1
> #define ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT 2
>
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index c7a735bf642..40564605735 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -477,8 +477,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) &&
> - !(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT))) {
> + if (!(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 "
> "and firmware that suppors CPU hotplug with SMM");
> @@ -526,8 +525,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
> !lpc->pm.cpu_hotplug_legacy) {
> uint64_t negotiated = lpc->smi_negotiated_features;
>
> - if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) &&
> - !(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) {
> + if (!(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) {
> error_setg(errp, "cpu hot-unplug with SMI wasn't enabled "
> "by firmware");
> error_append_hint(errp, "update machine type to a version having "
> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
> index 71afb45b631..c57a06e0dde 100644
> --- a/hw/isa/lpc_ich9.c
> +++ b/hw/isa/lpc_ich9.c
> @@ -400,15 +400,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 */
> @@ -470,14 +461,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);
> }
> }
> }
> @@ -830,8 +816,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,
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 04/18] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field
2025-05-01 21:04 ` [PATCH 04/18] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field Philippe Mathieu-Daudé
@ 2025-06-03 15:27 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-03 15:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:42 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/i386/kvm/clock.c | 18 ------------------
> 1 file changed, 18 deletions(-)
>
> diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
> index f56382717f7..726ebfcb0cb 100644
> --- a/hw/i386/kvm/clock.c
> +++ b/hw/i386/kvm/clock.c
> @@ -23,7 +23,6 @@
> #include "migration/vmstate.h"
> #include "hw/sysbus.h"
> #include "hw/i386/kvm/clock.h"
> -#include "hw/qdev-properties.h"
> #include "qapi/error.h"
>
> #include <linux/kvm.h>
> @@ -43,9 +42,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;
> @@ -232,18 +228,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()
> @@ -304,18 +292,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 = {
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 05/18] hw/core/machine: Remove hw_compat_2_8[] array
2025-05-01 21:04 ` [PATCH 05/18] hw/core/machine: Remove hw_compat_2_8[] array Philippe Mathieu-Daudé
@ 2025-06-03 15:28 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-03 15:28 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:43 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/boards.h | 3 ---
> hw/core/machine.c | 14 --------------
> 2 files changed, 17 deletions(-)
>
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index 77707c4376a..84bd3735c42 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -835,7 +835,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
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index bde19a2ff67..bc0606cf740 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -252,20 +252,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)
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 06/18] hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field
2025-05-01 21:04 ` [PATCH 06/18] hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field Philippe Mathieu-Daudé
@ 2025-06-05 15:06 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-05 15:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:44 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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, lets remove that
> property and all the code around it.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/block/pflash_cfi01.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
> index 168101d8dfe..bba099a0c9e 100644
> --- a/hw/block/pflash_cfi01.c
> +++ b/hw/block/pflash_cfi01.c
> @@ -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)
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 07/18] hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition
2025-05-01 21:04 ` [PATCH 07/18] hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition Philippe Mathieu-Daudé
@ 2025-06-05 15:14 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-05 15:14 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:45 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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, lets remove all the code around
> QEMU_PCIE_EXTCAP_INIT.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/hw/pci/pci.h | 2 --
> hw/pci/pci.c | 2 --
> hw/pci/pcie.c | 5 -----
> 3 files changed, 9 deletions(-)
>
> diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
> index c2fe6caa2c6..6c72a61c4b6 100644
> --- a/include/hw/pci/pci.h
> +++ b/include/hw/pci/pci.h
> @@ -210,8 +210,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
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index fe38c4c0287..36206c77b7c 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -90,8 +90,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),
> diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
> index 1b12db6fa29..a3969423bd3 100644
> --- a/hw/pci/pcie.c
> +++ b/hw/pci/pcie.c
> @@ -245,11 +245,6 @@ 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) {
so this one is true by default, and with knob removed
anything inside block should be called unconditionally (i.e. not like diff below),
aren't it?
> - /* read-only to behave like a 'NULL' Extended Capability Header */
> - pci_set_long(dev->wmask + PCI_CONFIG_SPACE_SIZE, 0);
> - }
> -
> return pos;
> }
>
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 08/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition
2025-05-01 21:04 ` [PATCH 08/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition Philippe Mathieu-Daudé
@ 2025-06-06 13:07 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:07 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:46 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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).
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/virtio/virtio-pci.h | 4 ----
> hw/virtio/virtio-pci.c | 8 ++------
> 2 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
> index 8abc5f8f20d..ed142932f7b 100644
> --- a/include/hw/virtio/virtio-pci.h
> +++ b/include/hw/virtio/virtio-pci.h
> @@ -34,7 +34,6 @@ enum {
> VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT,
> VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_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,
> @@ -62,9 +61,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)
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 4e0d4bda6ed..0075ae590db 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -2215,10 +2215,8 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp)
> 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 */
> @@ -2349,8 +2347,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,
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 09/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition
2025-05-01 21:04 ` [PATCH 09/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition Philippe Mathieu-Daudé
@ 2025-06-06 13:10 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:10 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:47 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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).
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/virtio/virtio-pci.h | 4 ----
> hw/virtio/virtio-pci.c | 8 ++------
> 2 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
> index ed142932f7b..a8dd613ffbc 100644
> --- a/include/hw/virtio/virtio-pci.h
> +++ b/include/hw/virtio/virtio-pci.h
> @@ -34,7 +34,6 @@ enum {
> VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT,
> VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_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,
> @@ -61,9 +60,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)
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 0075ae590db..5b86a9a447c 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -2218,10 +2218,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,
> @@ -2347,8 +2345,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,
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 10/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition
2025-05-01 21:04 ` [PATCH 10/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition Philippe Mathieu-Daudé
@ 2025-06-06 13:11 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:11 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:48 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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).
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/virtio/virtio-pci.h | 4 ----
> hw/virtio/virtio-pci.c | 19 +++++--------------
> 2 files changed, 5 insertions(+), 18 deletions(-)
>
> diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
> index a8dd613ffbc..d1f7403cbdf 100644
> --- a/include/hw/virtio/virtio-pci.h
> +++ b/include/hw/virtio/virtio-pci.h
> @@ -34,7 +34,6 @@ enum {
> VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT,
> VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_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,
> @@ -60,9 +59,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)
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 5b86a9a447c..9ec92d5a736 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -2226,11 +2226,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, last_pcie_cap_offset,
> @@ -2323,16 +2321,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);
> }
> }
>
> @@ -2345,8 +2338,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,
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 11/18] hw/nvram/fw_cfg: Remove FWCfgState::file_slots field
2025-05-01 21:04 ` [PATCH 11/18] hw/nvram/fw_cfg: Remove FWCfgState::file_slots field Philippe Mathieu-Daudé
@ 2025-06-06 13:24 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:24 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Gerd Hoffmann
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Kevin Wolf, Yi Liu
On Thu, 1 May 2025 23:04:49 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> The FWCfgState::file_slots integer was only set in the
> hw_compat_2_8[] array, via the 'x-file-slots=0x10' property.
> We removed all machines using that array, lets remove that
> property and all the code around it. The number of slots is
> always FW_CFG_FILE_SLOTS_DFLT (32).
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
I'd keep this one,
alternatively if we decide to nuke it in favor of a constant,
I'd get rid of fw_cfg_file_slots() and simplify fw_cfg_file_slots_allocate() at the same time
Gerd,
WDYT?
> ---
> include/hw/nvram/fw_cfg.h | 1 -
> hw/nvram/fw_cfg.c | 24 +-----------------------
> 2 files changed, 1 insertion(+), 24 deletions(-)
>
> diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
> index d41b9328fd1..07a31d214db 100644
> --- a/include/hw/nvram/fw_cfg.h
> +++ b/include/hw/nvram/fw_cfg.h
> @@ -59,7 +59,6 @@ struct FWCfgState {
> SysBusDevice parent_obj;
> /*< public >*/
>
> - uint16_t file_slots;
> FWCfgEntry *entries[2];
> int *entry_order;
> FWCfgFiles *files;
> diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> index 54cfa07d3f5..71c41c979d7 100644
> --- a/hw/nvram/fw_cfg.c
> +++ b/hw/nvram/fw_cfg.c
> @@ -257,7 +257,7 @@ static void fw_cfg_write(FWCfgState *s, uint8_t value)
>
> static inline uint16_t fw_cfg_file_slots(const FWCfgState *s)
> {
> - return s->file_slots;
> + return FW_CFG_FILE_SLOTS_DFLT;
> }
>
>
> /* Note: this function returns an exclusive limit. */
> @@ -1153,24 +1153,6 @@ static const TypeInfo fw_cfg_info = {
>
> static void fw_cfg_file_slots_allocate(FWCfgState *s, Error **errp)
> {
> - uint16_t file_slots_max;
> -
> - if (fw_cfg_file_slots(s) < FW_CFG_FILE_SLOTS_MIN) {
> - error_setg(errp, "\"file_slots\" must be at least 0x%x",
> - FW_CFG_FILE_SLOTS_MIN);
> - return;
> - }
> -
> - /* (UINT16_MAX & FW_CFG_ENTRY_MASK) is the highest inclusive selector value
> - * that we permit. The actual (exclusive) value coming from the
> - * configuration is (FW_CFG_FILE_FIRST + fw_cfg_file_slots(s)). */
> - file_slots_max = (UINT16_MAX & FW_CFG_ENTRY_MASK) - FW_CFG_FILE_FIRST + 1;
> - if (fw_cfg_file_slots(s) > file_slots_max) {
> - error_setg(errp, "\"file_slots\" must not exceed 0x%" PRIx16,
> - file_slots_max);
> - return;
> - }
> -
> s->entries[0] = g_new0(FWCfgEntry, fw_cfg_max_entry(s));
> s->entries[1] = g_new0(FWCfgEntry, fw_cfg_max_entry(s));
> s->entry_order = g_new0(int, fw_cfg_max_entry(s));
> @@ -1179,8 +1161,6 @@ static void fw_cfg_file_slots_allocate(FWCfgState *s, Error **errp)
> static const Property fw_cfg_io_properties[] = {
> DEFINE_PROP_BOOL("dma_enabled", FWCfgIoState, parent_obj.dma_enabled,
> true),
> - DEFINE_PROP_UINT16("x-file-slots", FWCfgIoState, parent_obj.file_slots,
> - FW_CFG_FILE_SLOTS_DFLT),
> };
>
> static void fw_cfg_io_realize(DeviceState *dev, Error **errp)
> @@ -1228,8 +1208,6 @@ static const Property fw_cfg_mem_properties[] = {
> DEFINE_PROP_UINT32("data_width", FWCfgMemState, data_width, -1),
> DEFINE_PROP_BOOL("dma_enabled", FWCfgMemState, parent_obj.dma_enabled,
> true),
> - DEFINE_PROP_UINT16("x-file-slots", FWCfgMemState, parent_obj.file_slots,
> - FW_CFG_FILE_SLOTS_DFLT),
> };
>
> static void fw_cfg_mem_realize(DeviceState *dev, Error **errp)
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 12/18] hw/nvram/fw_cfg: Inline fw_cfg_file_slots()
2025-05-01 21:04 ` [PATCH 12/18] hw/nvram/fw_cfg: Inline fw_cfg_file_slots() Philippe Mathieu-Daudé
@ 2025-06-06 13:29 ` Igor Mammedov
2025-06-16 5:05 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:50 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> Now than fw_cfg_file_slots() only returns
> FW_CFG_FILE_SLOTS_DFLT, we can inline it.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
does this even compile?
I see more usages of fw_cfg_file_slots(), then being removed here.
git grep "fw_cfg_file_slots("
hw/nvram/fw_cfg.c:static inline uint16_t fw_cfg_file_slots(const FWCfgState *s)
hw/nvram/fw_cfg.c: return FW_CFG_FILE_FIRST + fw_cfg_file_slots(s);
hw/nvram/fw_cfg.c: dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * fw_cfg_file_slots(s);
hw/nvram/fw_cfg.c: assert(count < fw_cfg_file_slots(s));
hw/nvram/fw_cfg.c: assert(index < fw_cfg_file_slots(s));
hw/nvram/fw_cfg.c: if (fw_cfg_file_slots(s) < FW_CFG_FILE_SLOTS_MIN) {
hw/nvram/fw_cfg.c: * configuration is (FW_CFG_FILE_FIRST + fw_cfg_file_slots(s)). */
hw/nvram/fw_cfg.c: if (fw_cfg_file_slots(s) > file_slots_max) {
if we decide to remove x-file-slots, this patch probably needs some fixing
> ---
> hw/nvram/fw_cfg.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> index 71c41c979d7..de65ee8342e 100644
> --- a/hw/nvram/fw_cfg.c
> +++ b/hw/nvram/fw_cfg.c
> @@ -255,15 +255,10 @@ static void fw_cfg_write(FWCfgState *s, uint8_t value)
> /* nothing, write support removed in QEMU v2.4+ */
> }
>
> -static inline uint16_t fw_cfg_file_slots(const FWCfgState *s)
> -{
> - return FW_CFG_FILE_SLOTS_DFLT;
> -}
> -
> /* Note: this function returns an exclusive limit. */
> static inline uint32_t fw_cfg_max_entry(const FWCfgState *s)
> {
> - return FW_CFG_FILE_FIRST + fw_cfg_file_slots(s);
> + return FW_CFG_FILE_FIRST + FW_CFG_FILE_SLOTS_DFLT;
> }
>
> static int fw_cfg_select(FWCfgState *s, uint16_t key)
> @@ -845,13 +840,13 @@ void fw_cfg_add_file_callback(FWCfgState *s, const char *filename,
> int order = 0;
>
> if (!s->files) {
> - dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * fw_cfg_file_slots(s);
> + dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * FW_CFG_FILE_SLOTS_DFLT;
> s->files = g_malloc0(dsize);
> fw_cfg_add_bytes(s, FW_CFG_FILE_DIR, s->files, dsize);
> }
>
> count = be32_to_cpu(s->files->count);
> - assert(count < fw_cfg_file_slots(s));
> + assert(count < FW_CFG_FILE_SLOTS_DFLT);
>
> /* Find the insertion point, sorting by file name. */
> for (index = count;
> @@ -926,7 +921,7 @@ void *fw_cfg_modify_file(FWCfgState *s, const char *filename,
> }
> }
>
> - assert(index < fw_cfg_file_slots(s));
> + assert(index < FW_CFG_FILE_SLOTS_DFLT);
>
> /* add new one */
> fw_cfg_add_file_callback(s, filename, NULL, NULL, NULL, data, len, true);
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 13/18] hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines
2025-05-01 21:04 ` [PATCH 13/18] hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines Philippe Mathieu-Daudé
@ 2025-06-06 13:30 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:30 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:51 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> hw/i386/pc_piix.c | 9 ---------
> hw/i386/pc_q35.c | 9 ---------
> 2 files changed, 18 deletions(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 0d6ad9db627..5c7d0c50f8e 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -737,15 +737,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_ISAPC
> static void isapc_machine_options(MachineClass *m)
> {
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 54c18100122..d66d64b3b62 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -630,12 +630,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);
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 14/18] hw/i386/pc: Remove pc_compat_2_9[] array
2025-05-01 21:04 ` [PATCH 14/18] hw/i386/pc: Remove pc_compat_2_9[] array Philippe Mathieu-Daudé
@ 2025-06-06 13:31 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:31 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:52 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/i386/pc.h | 3 ---
> hw/i386/pc.c | 5 -----
> 2 files changed, 8 deletions(-)
>
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index db02cbc0d65..455b869cce9 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -283,9 +283,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) \
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 5f07a44d447..298091932ab 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -227,11 +227,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
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 15/18] hw/core/machine: Remove hw_compat_2_9[] array
2025-05-01 21:04 ` [PATCH 15/18] hw/core/machine: Remove hw_compat_2_9[] array Philippe Mathieu-Daudé
@ 2025-06-06 13:31 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:31 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:53 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/boards.h | 3 ---
> hw/core/machine.c | 8 --------
> 2 files changed, 11 deletions(-)
>
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index 84bd3735c42..513eb2a54fd 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -832,7 +832,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
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index bc0606cf740..486d1adb4b9 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -244,14 +244,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)
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 16/18] hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field
2025-05-01 21:04 ` [PATCH 16/18] hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field Philippe Mathieu-Daudé
@ 2025-06-06 13:33 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:33 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:54 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> include/hw/virtio/virtio-net.h | 1 -
> hw/net/virtio-net.c | 8 ++------
> 2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
> index b9ea9e824e3..353e872f677 100644
> --- a/include/hw/virtio/virtio-net.h
> +++ b/include/hw/virtio/virtio-net.h
> @@ -214,7 +214,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;
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 2de037c2736..a8a43ffa242 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -801,8 +801,7 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features,
> features = vhost_net_get_features(get_vhost_net(nc->peer), features);
> vdev->backend_features = features;
>
> - if (n->mtu_bypass_backend &&
> - (n->host_features & 1ULL << VIRTIO_NET_F_MTU)) {
> + if (n->host_features & (1ULL << VIRTIO_NET_F_MTU)) {
> features |= (1ULL << VIRTIO_NET_F_MTU);
> }
>
> @@ -953,8 +952,7 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features)
> Error *err = NULL;
> int i;
>
> - 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)) {
> features &= ~(1ULL << VIRTIO_NET_F_MTU);
> }
>
> @@ -4121,8 +4119,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),
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 17/18] hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field
2025-05-01 21:04 ` [PATCH 17/18] hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field Philippe Mathieu-Daudé
@ 2025-06-06 13:34 ` Igor Mammedov
0 siblings, 0 replies; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:34 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
On Thu, 1 May 2025 23:04:55 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/pci-bridge/gen_pcie_root_port.c | 16 ++--------------
> 1 file changed, 2 insertions(+), 14 deletions(-)
>
> diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_root_port.c
> index d9078e783bf..831d21225e9 100644
> --- a/hw/pci-bridge/gen_pcie_root_port.c
> +++ b/hw/pci-bridge/gen_pcie_root_port.c
> @@ -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,
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 18/18] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
2025-05-01 21:04 ` [PATCH 18/18] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field Philippe Mathieu-Daudé
@ 2025-06-06 13:42 ` Igor Mammedov
2025-06-12 21:39 ` Alejandro Jimenez
0 siblings, 1 reply; 39+ messages in thread
From: Igor Mammedov @ 2025-06-06 13:42 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu, peterx
On Thu, 1 May 2025 23:04:56 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/hw/i386/x86-iommu.h | 1 -
> hw/i386/amd_iommu.c | 12 ++----------
> hw/i386/intel_iommu.c | 13 ++-----------
> hw/i386/x86-iommu.c | 1 -
> 4 files changed, 4 insertions(+), 23 deletions(-)
>
> diff --git a/include/hw/i386/x86-iommu.h b/include/hw/i386/x86-iommu.h
> index bfd21649d08..d6e52b1eb6b 100644
> --- a/include/hw/i386/x86-iommu.h
> +++ b/include/hw/i386/x86-iommu.h
> @@ -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 */
> QLIST_HEAD(, IEC_Notifier) iec_notifiers; /* IEC notify list */
> };
>
> diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
> index 2cf7e24a21d..516e231bf13 100644
> --- a/hw/i386/amd_iommu.c
> +++ b/hw/i386/amd_iommu.c
> @@ -1426,7 +1426,6 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn)
> AMDVIState *s = opaque;
> AMDVIAddressSpace **iommu_as, *amdvi_dev_as;
> int bus_num = pci_bus_num(bus);
> - X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(s);
>
> iommu_as = s->address_spaces[bus_num];
>
> @@ -1486,15 +1485,8 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn)
> AMDVI_INT_ADDR_FIRST,
> &amdvi_dev_as->iommu_ir, 1);
>
> - if (!x86_iommu->pt_supported) {
> - memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, false);
> - memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu),
> - true);
> - } else {
> - memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu),
> - false);
> - memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, true);
> - }
> + memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, false);
> + memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu), true);
given default is 'true', this hunk seems to be backwards,
shouldn't it be 'else' branch code
> }
> return &iommu_as[devfn]->as;
> }
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index c980cecb4ee..cc08dc41441 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -1066,6 +1066,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:
> @@ -1074,12 +1075,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__,
> @@ -4520,7 +4515,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_SLLPS |
> VTD_CAP_MGAW(s->aw_bits);
> if (s->dma_drain) {
> @@ -4548,10 +4543,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;
> }
> diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
> index d34a6849f4a..ca7cd953e98 100644
> --- a/hw/i386/x86-iommu.c
> +++ b/hw/i386/x86-iommu.c
> @@ -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),
> };
>
> static void x86_iommu_class_init(ObjectClass *klass, const void *data)
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 18/18] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
2025-06-06 13:42 ` Igor Mammedov
@ 2025-06-12 21:39 ` Alejandro Jimenez
0 siblings, 0 replies; 39+ messages in thread
From: Alejandro Jimenez @ 2025-06-12 21:39 UTC (permalink / raw)
To: Igor Mammedov, Philippe Mathieu-Daudé
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu, peterx
On 6/6/25 9:42 AM, Igor Mammedov wrote:
> On Thu, 1 May 2025 23:04:56 +0200
> Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
>> @@ -1486,15 +1485,8 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn)
>> AMDVI_INT_ADDR_FIRST,
>> &amdvi_dev_as->iommu_ir, 1);
>>
>> - if (!x86_iommu->pt_supported) {
>> - memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, false);
>> - memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu),
>> - true);
>> - } else {
>> - memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu),
>> - false);
>> - memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, true);
>> - }
>> + memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, false);
>> + memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu), true);
>
> given default is 'true', this hunk seems to be backwards,
> shouldn't it be 'else' branch code
>
I believe this is trying to preserve the change recently introduced in:
31753d5a336f ("hw/i386/amd_iommu: Fix device setup failure when PT is on.")
However, that doesn't explain the logic of enabling those specific
memory regions, which I think is also prone to cause confusion. I tried
to explain the "trick" and argued against it here[0].
I am ultimately rewriting that code in a series to add DMA remap
support[1], which hopefully makes it easier to follow which memory
regions are active under specific configurations.
Thank you,
Alejandro
[0]
https://lore.kernel.org/qemu-devel/914314b3-611d-4da3-9050-3c8c1b881e40@oracle.com/
[1]
https://lore.kernel.org/qemu-devel/20250502021605.1795985-1-alejandro.j.jimenez@oracle.com/
>
>> }
>> return &iommu_as[devfn]->as;
>> }
>> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
>> index c980cecb4ee..cc08dc41441 100644
>> --- a/hw/i386/intel_iommu.c
>> +++ b/hw/i386/intel_iommu.c
>> @@ -1066,6 +1066,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:
>> @@ -1074,12 +1075,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__,
>> @@ -4520,7 +4515,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_SLLPS |
>> VTD_CAP_MGAW(s->aw_bits);
>> if (s->dma_drain) {
>> @@ -4548,10 +4543,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;
>> }
>> diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
>> index d34a6849f4a..ca7cd953e98 100644
>> --- a/hw/i386/x86-iommu.c
>> +++ b/hw/i386/x86-iommu.c
>> @@ -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),
>> };
>>
>> static void x86_iommu_class_init(ObjectClass *klass, const void *data)
>
>
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 12/18] hw/nvram/fw_cfg: Inline fw_cfg_file_slots()
2025-06-06 13:29 ` Igor Mammedov
@ 2025-06-16 5:05 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 39+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-06-16 5:05 UTC (permalink / raw)
To: Igor Mammedov
Cc: qemu-devel, Clément Mathieu--Drif, Zhao Liu, Hanna Reitz,
Marcel Apfelbaum, Paolo Bonzini, Eduardo Habkost, qemu-block,
Jason Wang, Richard Henderson, Yanan Wang, Ani Sinha,
Michael S. Tsirkin, Thomas Huth, Gerd Hoffmann, Kevin Wolf,
Yi Liu
Hi Igor,
On 6/6/25 15:29, Igor Mammedov wrote:
> On Thu, 1 May 2025 23:04:50 +0200
> Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
>> Now than fw_cfg_file_slots() only returns
>> FW_CFG_FILE_SLOTS_DFLT, we can inline it.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
> does this even compile?
> I see more usages of fw_cfg_file_slots(), then being removed here.
>
> git grep "fw_cfg_file_slots("
> hw/nvram/fw_cfg.c:static inline uint16_t fw_cfg_file_slots(const FWCfgState *s)
> hw/nvram/fw_cfg.c: return FW_CFG_FILE_FIRST + fw_cfg_file_slots(s);
> hw/nvram/fw_cfg.c: dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * fw_cfg_file_slots(s);
> hw/nvram/fw_cfg.c: assert(count < fw_cfg_file_slots(s));
> hw/nvram/fw_cfg.c: assert(index < fw_cfg_file_slots(s));
> hw/nvram/fw_cfg.c: if (fw_cfg_file_slots(s) < FW_CFG_FILE_SLOTS_MIN) {
> hw/nvram/fw_cfg.c: * configuration is (FW_CFG_FILE_FIRST + fw_cfg_file_slots(s)). */
> hw/nvram/fw_cfg.c: if (fw_cfg_file_slots(s) > file_slots_max) {
No problem in the branch I posted, commit from April (and yes,
it does compile fine):
$ git grep "fw_cfg_file_slots(" 09deca844303fde6761
$
I'm OK to rebase/respin once the prerequisite series are merged.
Regards,
Phil.
>
> if we decide to remove x-file-slots, this patch probably needs some fixing
>> ---
>> hw/nvram/fw_cfg.c | 13 ++++---------
>> 1 file changed, 4 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 39+ messages in thread
end of thread, other threads:[~2025-06-16 5:06 UTC | newest]
Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
2025-05-01 21:04 ` [PATCH 01/18] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines Philippe Mathieu-Daudé
2025-06-03 15:21 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 02/18] hw/i386/pc: Remove pc_compat_2_8[] array Philippe Mathieu-Daudé
2025-06-03 15:21 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition Philippe Mathieu-Daudé
2025-06-03 15:25 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 04/18] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field Philippe Mathieu-Daudé
2025-06-03 15:27 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 05/18] hw/core/machine: Remove hw_compat_2_8[] array Philippe Mathieu-Daudé
2025-06-03 15:28 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 06/18] hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field Philippe Mathieu-Daudé
2025-06-05 15:06 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 07/18] hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition Philippe Mathieu-Daudé
2025-06-05 15:14 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 08/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition Philippe Mathieu-Daudé
2025-06-06 13:07 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 09/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition Philippe Mathieu-Daudé
2025-06-06 13:10 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 10/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition Philippe Mathieu-Daudé
2025-06-06 13:11 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 11/18] hw/nvram/fw_cfg: Remove FWCfgState::file_slots field Philippe Mathieu-Daudé
2025-06-06 13:24 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 12/18] hw/nvram/fw_cfg: Inline fw_cfg_file_slots() Philippe Mathieu-Daudé
2025-06-06 13:29 ` Igor Mammedov
2025-06-16 5:05 ` Philippe Mathieu-Daudé
2025-05-01 21:04 ` [PATCH 13/18] hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines Philippe Mathieu-Daudé
2025-06-06 13:30 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 14/18] hw/i386/pc: Remove pc_compat_2_9[] array Philippe Mathieu-Daudé
2025-06-06 13:31 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 15/18] hw/core/machine: Remove hw_compat_2_9[] array Philippe Mathieu-Daudé
2025-06-06 13:31 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 16/18] hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field Philippe Mathieu-Daudé
2025-06-06 13:33 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 17/18] hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field Philippe Mathieu-Daudé
2025-06-06 13:34 ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 18/18] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field Philippe Mathieu-Daudé
2025-06-06 13:42 ` Igor Mammedov
2025-06-12 21:39 ` Alejandro Jimenez
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).