* [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines
@ 2024-06-17 7:10 Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 01/23] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines Philippe Mathieu-Daudé
` (23 more replies)
0 siblings, 24 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:10 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?=
Series fully reviewed. Since Igor reviewed, I plan to merge
it myself if no feedback from Paolo / Michael.
Since v5:
- Addressed Igor review comments
- Added R-b tags
Since v4:
- Rebased on top of 7b68a5fe2f ("Merge tag 'for-upstream')
- Removed obsolete comment (Daniel)
- Clean DEFINE_I440FX_MACHINE (Daniel, new patch).
Since v3:
- Deprecate up to 2.12 (Thomas)
Since v2:
- Addressed Zhao review comments
Since v1:
- Addressed Zhao and Thomas review comments
Clashes a bit with Daniel general deprecation policy for all
versioned machines:
https://lists.nongnu.org/archive/html/qemu-devel/2024-05/msg00084.html
Philippe Mathieu-Daudé (23):
hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines
hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine
hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag
hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag
hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size
hw/acpi/ich9: Remove 'memory-hotplug-support' property
hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug'
hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine
target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h'
hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded
hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults()
hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid()
hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm
hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug()
hw/mem/memory-device: Remove legacy_align from
memory_device_pre_plug()
hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine
hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob
hw/i386/pc: Remove PCMachineClass::rsdp_in_ram
hw/i386/acpi: Remove AcpiBuildState::rsdp field
hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine
hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro
target/i386: Remove X86CPU::kvm_no_smi_migration field
hw/i386/pc: Replace PCMachineClass::acpi_data_size by
PC_ACPI_DATA_SIZE
docs/about/deprecated.rst | 4 +-
docs/about/removed-features.rst | 2 +-
hw/usb/hcd-xhci.h | 4 +-
include/hw/firmware/smbios.h | 3 +-
include/hw/i386/pc.h | 22 ----
include/hw/mem/memory-device.h | 2 +-
include/hw/mem/pc-dimm.h | 3 +-
target/i386/cpu.h | 3 -
target/i386/kvm/kvm-cpu.h | 41 ------
hw/acpi/ich9.c | 46 +------
hw/arm/virt.c | 5 +-
hw/i386/acpi-build.c | 96 ++-------------
hw/i386/fw_cfg.c | 3 +-
hw/i386/pc.c | 107 +++-------------
hw/i386/pc_piix.c | 171 +++++---------------------
hw/loongarch/virt.c | 4 +-
hw/mem/memory-device.c | 12 +-
hw/mem/pc-dimm.c | 6 +-
hw/ppc/spapr.c | 2 +-
hw/riscv/virt.c | 2 +-
hw/smbios/smbios.c | 13 +-
hw/usb/hcd-xhci-nec.c | 4 -
hw/usb/hcd-xhci-pci.c | 4 +-
hw/usb/hcd-xhci.c | 42 ++-----
hw/virtio/virtio-md-pci.c | 2 +-
target/i386/cpu.c | 2 -
target/i386/kvm/kvm-cpu.c | 3 +-
target/i386/kvm/kvm.c | 7 +-
tests/avocado/mem-addr-space-check.py | 9 +-
29 files changed, 98 insertions(+), 526 deletions(-)
delete mode 100644 target/i386/kvm/kvm-cpu.h
--
2.41.0
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v6 01/23] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
@ 2024-06-17 7:10 ` Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 02/23] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine Philippe Mathieu-Daudé
` (22 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:10 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
Similarly to the commit c7437f0ddb "docs/about: Mark the
old pc-i440fx-2.0 - 2.3 machine types as deprecated",
deprecate the 2.4 to 2.12 machines.
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
docs/about/deprecated.rst | 4 ++--
hw/i386/pc_piix.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index b62877e51c..66a5f43626 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -212,8 +212,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name
better reflects the way this property affects all random data within
the device tree blob, not just the ``kaslr-seed`` node.
-``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''
+``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These old machine types are quite neglected nowadays and thus might have
various pitfalls with regards to live migration. Use a newer machine type
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ebb51de380..02878060d0 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -742,6 +742,7 @@ DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,
static void pc_i440fx_2_12_machine_options(MachineClass *m)
{
pc_i440fx_3_0_machine_options(m);
+ m->deprecation_reason = "old and unattended - use a newer version instead";
compat_props_add(m->compat_props, hw_compat_2_12, hw_compat_2_12_len);
compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len);
}
@@ -847,7 +848,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m)
{
pc_i440fx_2_4_machine_options(m);
m->hw_version = "2.3.0";
- m->deprecation_reason = "old and unattended - use a newer version instead";
compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len);
compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len);
}
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 02/23] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 01/23] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines Philippe Mathieu-Daudé
@ 2024-06-17 7:10 ` Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 03/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag Philippe Mathieu-Daudé
` (21 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:10 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
The pc-i440fx-2.0 machine was deprecated for the 8.2
release (see commit c7437f0ddb "docs/about: Mark the
old pc-i440fx-2.0 - 2.3 machine types as deprecated"),
time to remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
docs/about/deprecated.rst | 2 +-
docs/about/removed-features.rst | 2 +-
include/hw/i386/pc.h | 3 ---
hw/i386/pc.c | 15 -------------
hw/i386/pc_piix.c | 37 ---------------------------------
5 files changed, 2 insertions(+), 57 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 66a5f43626..e12eab1f72 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -212,7 +212,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name
better reflects the way this property affects all random data within
the device tree blob, not just the ``kaslr-seed`` node.
-``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
+``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These old machine types are quite neglected nowadays and thus might have
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index eaae82b8a5..f84bfaf2b6 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0)
This machine has been renamed ``fuloong2e``.
-``pc-0.10`` up to ``pc-i440fx-1.7`` (removed in 4.0 up to 8.2)
+``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These machine types were very old and likely could not be used for live
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index ca7904ac2c..3e606949fb 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -318,9 +318,6 @@ extern const size_t pc_compat_2_2_len;
extern GlobalProperty pc_compat_2_1[];
extern const size_t pc_compat_2_1_len;
-extern GlobalProperty pc_compat_2_0[];
-extern const size_t pc_compat_2_0_len;
-
#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
{ \
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 0469af00a7..d0f2628d46 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -320,21 +320,6 @@ GlobalProperty pc_compat_2_1[] = {
};
const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1);
-GlobalProperty pc_compat_2_0[] = {
- PC_CPU_MODEL_IDS("2.0.0")
- { "virtio-scsi-pci", "any_layout", "off" },
- { "PIIX4_PM", "memory-hotplug-support", "off" },
- { "apic", "version", "0x11" },
- { "nec-usb-xhci", "superspeed-ports-first", "off" },
- { "nec-usb-xhci", "force-pcie-endcap", "on" },
- { "pci-serial", "prog_if", "0" },
- { "pci-serial-2x", "prog_if", "0" },
- { "pci-serial-4x", "prog_if", "0" },
- { "virtio-net-pci", "guest_announce", "off" },
- { "ICH9-LPC", "memory-hotplug-support", "off" },
-};
-const size_t pc_compat_2_0_len = G_N_ELEMENTS(pc_compat_2_0);
-
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
{
GSIState *s;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 02878060d0..a750a0e6ab 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -441,11 +441,6 @@ static void pc_compat_2_1_fn(MachineState *machine)
x86_cpu_change_kvm_default("svm", NULL);
}
-static void pc_compat_2_0_fn(MachineState *machine)
-{
- pc_compat_2_1_fn(machine);
-}
-
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
@@ -887,38 +882,6 @@ static void pc_i440fx_2_1_machine_options(MachineClass *m)
DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn,
pc_i440fx_2_1_machine_options);
-static void pc_i440fx_2_0_machine_options(MachineClass *m)
-{
- PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
-
- pc_i440fx_2_1_machine_options(m);
- m->hw_version = "2.0.0";
- compat_props_add(m->compat_props, pc_compat_2_0, pc_compat_2_0_len);
- pcmc->smbios_legacy_mode = true;
- pcmc->has_reserved_memory = false;
- /* This value depends on the actual DSDT and SSDT compiled into
- * the source QEMU; unfortunately it depends on the binary and
- * not on the machine type, so we cannot make pc-i440fx-1.7 work on
- * both QEMU 1.7 and QEMU 2.0.
- *
- * Large variations cause migration to fail for more than one
- * consecutive value of the "-smp" maxcpus option.
- *
- * For small variations of the kind caused by different iasl versions,
- * the 4k rounding usually leaves slack. However, there could be still
- * one or two values that break. For QEMU 1.7 and QEMU 2.0 the
- * slack is only ~10 bytes before one "-smp maxcpus" value breaks!
- *
- * 6652 is valid for QEMU 2.0, the right value for pc-i440fx-1.7 on
- * QEMU 1.7 it is 6414. For RHEL/CentOS 7.0 it is 6418.
- */
- pcmc->legacy_acpi_table_size = 6652;
- pcmc->acpi_data_size = 0x10000;
-}
-
-DEFINE_I440FX_MACHINE(v2_0, "pc-i440fx-2.0", pc_compat_2_0_fn,
- pc_i440fx_2_0_machine_options);
-
#ifdef CONFIG_ISAPC
static void isapc_machine_options(MachineClass *m)
{
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 03/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 01/23] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 02/23] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine Philippe Mathieu-Daudé
@ 2024-06-17 7:10 ` Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 04/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag Philippe Mathieu-Daudé
` (20 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:10 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
XHCI_FLAG_FORCE_PCIE_ENDCAP was only used by the
pc-i440fx-2.0 machine, which got removed. Remove it
and simplify usb_xhci_pci_realize().
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
hw/usb/hcd-xhci.h | 1 -
hw/usb/hcd-xhci-nec.c | 2 --
hw/usb/hcd-xhci-pci.c | 3 +--
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h
index 98f598382a..1efa4858fb 100644
--- a/hw/usb/hcd-xhci.h
+++ b/hw/usb/hcd-xhci.h
@@ -37,7 +37,6 @@ typedef struct XHCIEPContext XHCIEPContext;
enum xhci_flags {
XHCI_FLAG_SS_FIRST = 1,
- XHCI_FLAG_FORCE_PCIE_ENDCAP,
XHCI_FLAG_ENABLE_STREAMS,
};
diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c
index 328e5bfe7c..5d5b069cf9 100644
--- a/hw/usb/hcd-xhci-nec.c
+++ b/hw/usb/hcd-xhci-nec.c
@@ -43,8 +43,6 @@ static Property nec_xhci_properties[] = {
DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO),
DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags,
XHCI_FLAG_SS_FIRST, true),
- DEFINE_PROP_BIT("force-pcie-endcap", XHCINecState, flags,
- XHCI_FLAG_FORCE_PCIE_ENDCAP, false),
DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS),
DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
index 4423983308..cbad96f393 100644
--- a/hw/usb/hcd-xhci-pci.c
+++ b/hw/usb/hcd-xhci-pci.c
@@ -148,8 +148,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp)
PCI_BASE_ADDRESS_MEM_TYPE_64,
&s->xhci.mem);
- if (pci_bus_is_express(pci_get_bus(dev)) ||
- xhci_get_flag(&s->xhci, XHCI_FLAG_FORCE_PCIE_ENDCAP)) {
+ if (pci_bus_is_express(pci_get_bus(dev))) {
ret = pcie_endpoint_cap_init(dev, 0xa0);
assert(ret > 0);
}
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 04/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2024-06-17 7:10 ` [PATCH v6 03/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag Philippe Mathieu-Daudé
@ 2024-06-17 7:10 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 05/23] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size Philippe Mathieu-Daudé
` (19 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:10 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
XHCI_FLAG_SS_FIRST was only used by the pc-i440fx-2.0 machine,
which got removed. Remove it and simplify various functions in
hcd-xhci.c.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
hw/usb/hcd-xhci.h | 3 +--
hw/usb/hcd-xhci-nec.c | 2 --
hw/usb/hcd-xhci-pci.c | 1 -
hw/usb/hcd-xhci.c | 42 ++++++++----------------------------------
4 files changed, 9 insertions(+), 39 deletions(-)
diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h
index 1efa4858fb..fe16d7ad05 100644
--- a/hw/usb/hcd-xhci.h
+++ b/hw/usb/hcd-xhci.h
@@ -36,8 +36,7 @@ typedef struct XHCIStreamContext XHCIStreamContext;
typedef struct XHCIEPContext XHCIEPContext;
enum xhci_flags {
- XHCI_FLAG_SS_FIRST = 1,
- XHCI_FLAG_ENABLE_STREAMS,
+ XHCI_FLAG_ENABLE_STREAMS = 1,
};
typedef enum TRBType {
diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c
index 5d5b069cf9..0c063b3697 100644
--- a/hw/usb/hcd-xhci-nec.c
+++ b/hw/usb/hcd-xhci-nec.c
@@ -41,8 +41,6 @@ struct XHCINecState {
static Property nec_xhci_properties[] = {
DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO),
DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO),
- DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags,
- XHCI_FLAG_SS_FIRST, true),
DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS),
DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
index cbad96f393..264d7ebb77 100644
--- a/hw/usb/hcd-xhci-pci.c
+++ b/hw/usb/hcd-xhci-pci.c
@@ -242,7 +242,6 @@ static void qemu_xhci_instance_init(Object *obj)
s->msix = ON_OFF_AUTO_AUTO;
xhci->numintrs = XHCI_MAXINTRS;
xhci->numslots = XHCI_MAXSLOTS;
- xhci_set_flag(xhci, XHCI_FLAG_SS_FIRST);
}
static const TypeInfo qemu_xhci_info = {
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index ad40232eb6..b6411f0bda 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -541,18 +541,10 @@ static XHCIPort *xhci_lookup_port(XHCIState *xhci, struct USBPort *uport)
case USB_SPEED_LOW:
case USB_SPEED_FULL:
case USB_SPEED_HIGH:
- if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) {
- index = uport->index + xhci->numports_3;
- } else {
- index = uport->index;
- }
+ index = uport->index + xhci->numports_3;
break;
case USB_SPEED_SUPER:
- if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) {
- index = uport->index;
- } else {
- index = uport->index + xhci->numports_2;
- }
+ index = uport->index;
break;
default:
return NULL;
@@ -2779,11 +2771,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size)
ret = 0x20425355; /* "USB " */
break;
case 0x28: /* Supported Protocol:08 */
- if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) {
- ret = (xhci->numports_2<<8) | (xhci->numports_3+1);
- } else {
- ret = (xhci->numports_2<<8) | 1;
- }
+ ret = (xhci->numports_2 << 8) | (xhci->numports_3 + 1);
break;
case 0x2c: /* Supported Protocol:0c */
ret = 0x00000000; /* reserved */
@@ -2795,11 +2783,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size)
ret = 0x20425355; /* "USB " */
break;
case 0x38: /* Supported Protocol:08 */
- if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) {
- ret = (xhci->numports_3<<8) | 1;
- } else {
- ret = (xhci->numports_3<<8) | (xhci->numports_2+1);
- }
+ ret = (xhci->numports_3 << 8) | 1;
break;
case 0x3c: /* Supported Protocol:0c */
ret = 0x00000000; /* reserved */
@@ -3349,13 +3333,8 @@ static void usb_xhci_init(XHCIState *xhci)
for (i = 0; i < usbports; i++) {
speedmask = 0;
if (i < xhci->numports_2) {
- if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) {
- port = &xhci->ports[i + xhci->numports_3];
- port->portnr = i + 1 + xhci->numports_3;
- } else {
- port = &xhci->ports[i];
- port->portnr = i + 1;
- }
+ port = &xhci->ports[i + xhci->numports_3];
+ port->portnr = i + 1 + xhci->numports_3;
port->uport = &xhci->uports[i];
port->speedmask =
USB_SPEED_MASK_LOW |
@@ -3366,13 +3345,8 @@ static void usb_xhci_init(XHCIState *xhci)
speedmask |= port->speedmask;
}
if (i < xhci->numports_3) {
- if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) {
- port = &xhci->ports[i];
- port->portnr = i + 1;
- } else {
- port = &xhci->ports[i + xhci->numports_2];
- port->portnr = i + 1 + xhci->numports_2;
- }
+ port = &xhci->ports[i];
+ port->portnr = i + 1;
port->uport = &xhci->uports[i];
port->speedmask = USB_SPEED_MASK_SUPER;
assert(i < XHCI_MAXPORTS);
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 05/23] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2024-06-17 7:10 ` [PATCH v6 04/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 06/23] hw/acpi/ich9: Remove 'memory-hotplug-support' property Philippe Mathieu-Daudé
` (18 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Zhao Liu
PCMachineClass::legacy_acpi_table_size was only used by the
pc-i440fx-2.0 machine, which got removed. Remove it and simplify
acpi_build().
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/i386/pc.h | 1 -
hw/i386/acpi-build.c | 63 +++++++++-----------------------------------
2 files changed, 12 insertions(+), 52 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 3e606949fb..434e531160 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -103,7 +103,6 @@ struct PCMachineClass {
/* ACPI compat: */
bool has_acpi_build;
bool rsdp_in_ram;
- int legacy_acpi_table_size;
unsigned acpi_data_size;
int pci_root_uid;
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 53f804ac16..f5d74e2b4b 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -85,7 +85,6 @@
* a little bit, there should be plenty of free space since the DSDT
* shrunk by ~1.5k between QEMU 2.0 and QEMU 2.1.
*/
-#define ACPI_BUILD_LEGACY_CPU_AML_SIZE 97
#define ACPI_BUILD_ALIGN_SIZE 0x1000
#define ACPI_BUILD_TABLE_SIZE 0x20000
@@ -2499,13 +2498,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
X86MachineState *x86ms = X86_MACHINE(machine);
DeviceState *iommu = pcms->iommu;
GArray *table_offsets;
- unsigned facs, dsdt, rsdt, fadt;
+ unsigned facs, dsdt, rsdt;
AcpiPmInfo pm;
AcpiMiscInfo misc;
AcpiMcfgInfo mcfg;
Range pci_hole = {}, pci_hole64 = {};
uint8_t *u;
- size_t aml_len = 0;
GArray *tables_blob = tables->table_data;
AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL };
Object *vmgenid_dev;
@@ -2551,19 +2549,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
build_dsdt(tables_blob, tables->linker, &pm, &misc,
&pci_hole, &pci_hole64, machine);
- /* Count the size of the DSDT and SSDT, we will need it for legacy
- * sizing of ACPI tables.
- */
- aml_len += tables_blob->len - dsdt;
-
/* ACPI tables pointed to by RSDT */
- fadt = tables_blob->len;
acpi_add_table(table_offsets, tables_blob);
pm.fadt.facs_tbl_offset = &facs;
pm.fadt.dsdt_tbl_offset = &dsdt;
pm.fadt.xdsdt_tbl_offset = &dsdt;
build_fadt(tables_blob, tables->linker, &pm.fadt, oem_id, oem_table_id);
- aml_len += tables_blob->len - fadt;
acpi_add_table(table_offsets, tables_blob);
acpi_build_madt(tables_blob, tables->linker, x86ms,
@@ -2694,49 +2685,19 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
* too simple to be enough. 4k turned out to be too small an
* alignment very soon, and in fact it is almost impossible to
* keep the table size stable for all (max_cpus, max_memory_slots)
- * combinations. So the table size is always 64k for pc-i440fx-2.1
- * and we give an error if the table grows beyond that limit.
- *
- * We still have the problem of migrating from "-M pc-i440fx-2.0". For
- * that, we exploit the fact that QEMU 2.1 generates _smaller_ tables
- * than 2.0 and we can always pad the smaller tables with zeros. We can
- * then use the exact size of the 2.0 tables.
- *
- * All this is for PIIX4, since QEMU 2.0 didn't support Q35 migration.
+ * combinations.
*/
- if (pcmc->legacy_acpi_table_size) {
- /* Subtracting aml_len gives the size of fixed tables. Then add the
- * size of the PIIX4 DSDT/SSDT in QEMU 2.0.
- */
- int legacy_aml_len =
- pcmc->legacy_acpi_table_size +
- ACPI_BUILD_LEGACY_CPU_AML_SIZE * x86ms->apic_id_limit;
- int legacy_table_size =
- ROUND_UP(tables_blob->len - aml_len + legacy_aml_len,
- ACPI_BUILD_ALIGN_SIZE);
- if ((tables_blob->len > legacy_table_size) &&
- !pcmc->resizable_acpi_blob) {
- /* Should happen only with PCI bridges and -M pc-i440fx-2.0. */
- warn_report("ACPI table size %u exceeds %d bytes,"
- " migration may not work",
- tables_blob->len, legacy_table_size);
- error_printf("Try removing CPUs, NUMA nodes, memory slots"
- " or PCI bridges.\n");
- }
- g_array_set_size(tables_blob, legacy_table_size);
- } else {
- /* Make sure we have a buffer in case we need to resize the tables. */
- if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) &&
- !pcmc->resizable_acpi_blob) {
- /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */
- warn_report("ACPI table size %u exceeds %d bytes,"
- " migration may not work",
- tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
- error_printf("Try removing CPUs, NUMA nodes, memory slots"
- " or PCI bridges.\n");
- }
- acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE);
+ /* Make sure we have a buffer in case we need to resize the tables. */
+ if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) &&
+ !pcmc->resizable_acpi_blob) {
+ /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */
+ warn_report("ACPI table size %u exceeds %d bytes,"
+ " migration may not work",
+ tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
+ error_printf("Try removing CPUs, NUMA nodes, memory slots"
+ " or PCI bridges.\n");
}
+ acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE);
acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE);
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 06/23] hw/acpi/ich9: Remove 'memory-hotplug-support' property
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 05/23] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 07/23] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' Philippe Mathieu-Daudé
` (17 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
No external code sets the 'memory-hotplug-support'
property, remove it.
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
hw/acpi/ich9.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 573d032e8e..9b605af21a 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -351,21 +351,6 @@ static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name,
visit_type_uint32(v, name, &value, errp);
}
-static bool ich9_pm_get_memory_hotplug_support(Object *obj, Error **errp)
-{
- ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
-
- return s->pm.acpi_memory_hotplug.is_enabled;
-}
-
-static void ich9_pm_set_memory_hotplug_support(Object *obj, bool value,
- Error **errp)
-{
- ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
-
- s->pm.acpi_memory_hotplug.is_enabled = value;
-}
-
static bool ich9_pm_get_cpu_hotplug_legacy(Object *obj, Error **errp)
{
ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
@@ -445,9 +430,6 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
NULL, NULL, pm);
object_property_add_uint32_ptr(obj, ACPI_PM_PROP_GPE0_BLK_LEN,
&gpe0_len, OBJ_PROP_FLAG_READ);
- object_property_add_bool(obj, "memory-hotplug-support",
- ich9_pm_get_memory_hotplug_support,
- ich9_pm_set_memory_hotplug_support);
object_property_add_bool(obj, "cpu-hotplug-legacy",
ich9_pm_get_cpu_hotplug_legacy,
ich9_pm_set_cpu_hotplug_legacy);
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 07/23] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug'
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 06/23] hw/acpi/ich9: Remove 'memory-hotplug-support' property Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 08/23] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine Philippe Mathieu-Daudé
` (16 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Zhao Liu
acpi_memory_hotplug::is_enabled is set to %true once via
ich9_lpc_initfn() -> ich9_pm_add_properties(). No need to
check it, so remove now dead code.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
hw/acpi/ich9.c | 28 ++++++----------------------
1 file changed, 6 insertions(+), 22 deletions(-)
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 9b605af21a..02d8546bd3 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -153,17 +153,10 @@ static int ich9_pm_post_load(void *opaque, int version_id)
.offset = vmstate_offset_pointer(_state, _field, uint8_t), \
}
-static bool vmstate_test_use_memhp(void *opaque)
-{
- ICH9LPCPMRegs *s = opaque;
- return s->acpi_memory_hotplug.is_enabled;
-}
-
static const VMStateDescription vmstate_memhp_state = {
.name = "ich9_pm/memhp",
.version_id = 1,
.minimum_version_id = 1,
- .needed = vmstate_test_use_memhp,
.fields = (const VMStateField[]) {
VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, ICH9LPCPMRegs),
VMSTATE_END_OF_LIST()
@@ -335,11 +328,9 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq)
legacy_acpi_cpu_hotplug_init(pci_address_space_io(lpc_pci),
OBJECT(lpc_pci), &pm->gpe_cpu, ICH9_CPU_HOTPLUG_IO_BASE);
- if (pm->acpi_memory_hotplug.is_enabled) {
- acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci),
- &pm->acpi_memory_hotplug,
- ACPI_MEMORY_HOTPLUG_BASE);
- }
+ acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci),
+ &pm->acpi_memory_hotplug,
+ ACPI_MEMORY_HOTPLUG_BASE);
}
static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name,
@@ -460,12 +451,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
return;
}
- if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) &&
- !lpc->pm.acpi_memory_hotplug.is_enabled) {
- error_setg(errp,
- "memory hotplug is not enabled: %s.memory-hotplug-support "
- "is not set", object_get_typename(OBJECT(lpc)));
- } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
+ 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) &&
@@ -509,8 +495,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
{
ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev);
- if (lpc->pm.acpi_memory_hotplug.is_enabled &&
- object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
+ if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
acpi_memory_unplug_request_cb(hotplug_dev,
&lpc->pm.acpi_memory_hotplug, dev,
errp);
@@ -545,8 +530,7 @@ void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
{
ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev);
- if (lpc->pm.acpi_memory_hotplug.is_enabled &&
- object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
+ if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
acpi_memory_unplug_cb(&lpc->pm.acpi_memory_hotplug, dev, errp);
} else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) &&
!lpc->pm.cpu_hotplug_legacy) {
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 08/23] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (6 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 07/23] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 09/23] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' Philippe Mathieu-Daudé
` (15 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
The pc-i440fx-2.1 machine was deprecated for the 8.2
release (see commit c7437f0ddb "docs/about: Mark the
old pc-i440fx-2.0 - 2.3 machine types as deprecated"),
time to remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
docs/about/deprecated.rst | 2 +-
docs/about/removed-features.rst | 2 +-
include/hw/i386/pc.h | 3 ---
hw/i386/pc.c | 7 -------
hw/i386/pc_piix.c | 23 -----------------------
5 files changed, 2 insertions(+), 35 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index e12eab1f72..e332eb46e9 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -212,7 +212,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name
better reflects the way this property affects all random data within
the device tree blob, not just the ``kaslr-seed`` node.
-``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
+``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These old machine types are quite neglected nowadays and thus might have
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index f84bfaf2b6..347e04e50e 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0)
This machine has been renamed ``fuloong2e``.
-``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0)
+``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These machine types were very old and likely could not be used for live
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 434e531160..0d730318fe 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -314,9 +314,6 @@ extern const size_t pc_compat_2_3_len;
extern GlobalProperty pc_compat_2_2[];
extern const size_t pc_compat_2_2_len;
-extern GlobalProperty pc_compat_2_1[];
-extern const size_t pc_compat_2_1_len;
-
#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
{ \
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index d0f2628d46..b0b8ecd64d 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -313,13 +313,6 @@ GlobalProperty pc_compat_2_2[] = {
};
const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2);
-GlobalProperty pc_compat_2_1[] = {
- PC_CPU_MODEL_IDS("2.1.0")
- { "coreduo" "-" TYPE_X86_CPU, "vmx", "on" },
- { "core2duo" "-" TYPE_X86_CPU, "vmx", "on" },
-};
-const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1);
-
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
{
GSIState *s;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index a750a0e6ab..e0b421dd51 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -66,7 +66,6 @@
#include "hw/hyperv/vmbus-bridge.h"
#include "hw/mem/nvdimm.h"
#include "hw/i386/acpi-build.h"
-#include "kvm/kvm-cpu.h"
#include "target/i386/cpu.h"
#define XEN_IOAPIC_NUM_PIRQS 128ULL
@@ -435,12 +434,6 @@ static void pc_compat_2_2_fn(MachineState *machine)
pc_compat_2_3_fn(machine);
}
-static void pc_compat_2_1_fn(MachineState *machine)
-{
- pc_compat_2_2_fn(machine);
- x86_cpu_change_kvm_default("svm", NULL);
-}
-
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
@@ -866,22 +859,6 @@ static void pc_i440fx_2_2_machine_options(MachineClass *m)
DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn,
pc_i440fx_2_2_machine_options);
-static void pc_i440fx_2_1_machine_options(MachineClass *m)
-{
- PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
-
- pc_i440fx_2_2_machine_options(m);
- m->hw_version = "2.1.0";
- m->default_display = NULL;
- compat_props_add(m->compat_props, hw_compat_2_1, hw_compat_2_1_len);
- compat_props_add(m->compat_props, pc_compat_2_1, pc_compat_2_1_len);
- pcmc->smbios_uuid_encoded = false;
- pcmc->enforce_aligned_dimm = false;
-}
-
-DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn,
- pc_i440fx_2_1_machine_options);
-
#ifdef CONFIG_ISAPC
static void isapc_machine_options(MachineClass *m)
{
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 09/23] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h'
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (7 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 08/23] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 10/23] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded Philippe Mathieu-Daudé
` (14 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
x86_cpu_change_kvm_default() was only used out of kvm-cpu.c by
the pc-i440fx-2.1 machine, which got removed. Make it static,
and remove its declaration. "kvm-cpu.h" is now empty, remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
target/i386/kvm/kvm-cpu.h | 41 ---------------------------------------
target/i386/kvm/kvm-cpu.c | 3 +--
2 files changed, 1 insertion(+), 43 deletions(-)
delete mode 100644 target/i386/kvm/kvm-cpu.h
diff --git a/target/i386/kvm/kvm-cpu.h b/target/i386/kvm/kvm-cpu.h
deleted file mode 100644
index e858ca21e5..0000000000
--- a/target/i386/kvm/kvm-cpu.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * i386 KVM CPU type and functions
- *
- * Copyright (c) 2003 Fabrice Bellard
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef KVM_CPU_H
-#define KVM_CPU_H
-
-#ifdef CONFIG_KVM
-/*
- * Change the value of a KVM-specific default
- *
- * If value is NULL, no default will be set and the original
- * value from the CPU model table will be kept.
- *
- * It is valid to call this function only for properties that
- * are already present in the kvm_default_props table.
- */
-void x86_cpu_change_kvm_default(const char *prop, const char *value);
-
-#else /* !CONFIG_KVM */
-
-#define x86_cpu_change_kvm_default(a, b)
-
-#endif /* CONFIG_KVM */
-
-#endif /* KVM_CPU_H */
diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c
index f76972e47e..f9b99b5f50 100644
--- a/target/i386/kvm/kvm-cpu.c
+++ b/target/i386/kvm/kvm-cpu.c
@@ -10,7 +10,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "host-cpu.h"
-#include "kvm-cpu.h"
#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
@@ -178,7 +177,7 @@ static PropValue kvm_default_props[] = {
/*
* Only for builtin_x86_defs models initialized with x86_register_cpudef_types.
*/
-void x86_cpu_change_kvm_default(const char *prop, const char *value)
+static void x86_cpu_change_kvm_default(const char *prop, const char *value)
{
PropValue *pv;
for (pv = kvm_default_props; pv->prop; pv++) {
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 10/23] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (8 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 09/23] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 11/23] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Philippe Mathieu-Daudé
` (13 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
PCMachineClass::smbios_uuid_encoded was only used by the
pc-i440fx-2.1 machine, which got removed. It is now always
true, remove it.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
include/hw/i386/pc.h | 1 -
hw/i386/fw_cfg.c | 3 +--
hw/i386/pc.c | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 0d730318fe..5667b87ed0 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -109,7 +109,6 @@ struct PCMachineClass {
/* SMBIOS compat: */
bool smbios_defaults;
bool smbios_legacy_mode;
- bool smbios_uuid_encoded;
SmbiosEntryPointType default_smbios_ep_type;
/* RAM / address space compat: */
diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c
index 6e0d9945d0..f9e8af3bf5 100644
--- a/hw/i386/fw_cfg.c
+++ b/hw/i386/fw_cfg.c
@@ -63,8 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg,
if (pcmc->smbios_defaults) {
/* These values are guest ABI, do not change */
- smbios_set_defaults("QEMU", mc->desc, mc->name,
- pcmc->smbios_uuid_encoded);
+ smbios_set_defaults("QEMU", mc->desc, mc->name, true);
}
/* tell smbios about cpuid version and features */
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index b0b8ecd64d..215462e861 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1796,7 +1796,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
pcmc->has_acpi_build = true;
pcmc->rsdp_in_ram = true;
pcmc->smbios_defaults = true;
- pcmc->smbios_uuid_encoded = true;
pcmc->gigabyte_align = true;
pcmc->has_reserved_memory = true;
pcmc->enforce_aligned_dimm = true;
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 11/23] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults()
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (9 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 10/23] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 12/23] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Philippe Mathieu-Daudé
` (12 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Zhao Liu
'uuid_encoded' is always true, remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
include/hw/firmware/smbios.h | 3 +--
hw/arm/virt.c | 3 +--
hw/i386/fw_cfg.c | 2 +-
hw/loongarch/virt.c | 2 +-
hw/riscv/virt.c | 2 +-
hw/smbios/smbios.c | 6 ++----
6 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h
index 8d3fb2fb3b..f066ab7262 100644
--- a/include/hw/firmware/smbios.h
+++ b/include/hw/firmware/smbios.h
@@ -331,8 +331,7 @@ void smbios_add_usr_blob_size(size_t size);
void smbios_entry_add(QemuOpts *opts, Error **errp);
void smbios_set_cpuid(uint32_t version, uint32_t features);
void smbios_set_defaults(const char *manufacturer, const char *product,
- const char *version,
- bool uuid_encoded);
+ const char *version);
void smbios_set_default_processor_family(uint16_t processor_family);
uint8_t *smbios_get_table_legacy(size_t *length, Error **errp);
void smbios_get_tables(MachineState *ms,
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 3c93c0c0a6..268b25e332 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1677,8 +1677,7 @@ static void virt_build_smbios(VirtMachineState *vms)
}
smbios_set_defaults("QEMU", product,
- vmc->smbios_old_sys_ver ? "1.0" : mc->name,
- true);
+ vmc->smbios_old_sys_ver ? "1.0" : mc->name);
/* build the array of physical mem area from base_memmap */
mem_array.address = vms->memmap[VIRT_MEM].base;
diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c
index f9e8af3bf5..7c43c325ef 100644
--- a/hw/i386/fw_cfg.c
+++ b/hw/i386/fw_cfg.c
@@ -63,7 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg,
if (pcmc->smbios_defaults) {
/* These values are guest ABI, do not change */
- smbios_set_defaults("QEMU", mc->desc, mc->name, true);
+ smbios_set_defaults("QEMU", mc->desc, mc->name);
}
/* tell smbios about cpuid version and features */
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 66cef201ab..b7ea17d5f3 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -556,7 +556,7 @@ static void virt_build_smbios(LoongArchVirtMachineState *lvms)
return;
}
- smbios_set_defaults("QEMU", product, mc->name, true);
+ smbios_set_defaults("QEMU", product, mc->name);
smbios_get_tables(ms, SMBIOS_ENTRY_POINT_TYPE_64,
NULL, 0,
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 4fdb660525..5676d66d12 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1277,7 +1277,7 @@ static void virt_build_smbios(RISCVVirtState *s)
product = "KVM Virtual Machine";
}
- smbios_set_defaults("QEMU", product, mc->name, true);
+ smbios_set_defaults("QEMU", product, mc->name);
if (riscv_is_32bit(&s->soc[0])) {
smbios_set_default_processor_family(0x200);
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index eed5787b15..8261eb716f 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -30,7 +30,7 @@
#include "hw/pci/pci_device.h"
#include "smbios_build.h"
-static bool smbios_uuid_encoded = true;
+static const bool smbios_uuid_encoded = true;
/*
* SMBIOS tables provided by user with '-smbios file=<foo>' option
*/
@@ -1017,11 +1017,9 @@ void smbios_set_default_processor_family(uint16_t processor_family)
}
void smbios_set_defaults(const char *manufacturer, const char *product,
- const char *version,
- bool uuid_encoded)
+ const char *version)
{
smbios_have_defaults = true;
- smbios_uuid_encoded = uuid_encoded;
SMBIOS_SET_DEFAULT(smbios_type1.manufacturer, manufacturer);
SMBIOS_SET_DEFAULT(smbios_type1.product, product);
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 12/23] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid()
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (10 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 11/23] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 13/23] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm Philippe Mathieu-Daudé
` (11 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Zhao Liu
'smbios_encode_uuid' is always true, remove it,
simplifying smbios_encode_uuid().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
hw/smbios/smbios.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 8261eb716f..3b7703489d 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -30,7 +30,6 @@
#include "hw/pci/pci_device.h"
#include "smbios_build.h"
-static const bool smbios_uuid_encoded = true;
/*
* SMBIOS tables provided by user with '-smbios file=<foo>' option
*/
@@ -600,11 +599,9 @@ static void smbios_build_type_0_table(void)
static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in)
{
memcpy(uuid, in, 16);
- if (smbios_uuid_encoded) {
- uuid->time_low = bswap32(uuid->time_low);
- uuid->time_mid = bswap16(uuid->time_mid);
- uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version);
- }
+ uuid->time_low = bswap32(uuid->time_low);
+ uuid->time_mid = bswap16(uuid->time_mid);
+ uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version);
}
static void smbios_build_type_1_table(void)
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 13/23] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (11 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 12/23] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 14/23] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() Philippe Mathieu-Daudé
` (10 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Zhao Liu
PCMachineClass::enforce_aligned_dimm was only used by the
pc-i440fx-2.1 machine, which got removed. It is now always
true. Remove it, simplifying pc_get_device_memory_range().
Update the comment in Avocado test_phybits_low_pse36().
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
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 | 14 +++-----------
tests/avocado/mem-addr-space-check.py | 9 ++++-----
3 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 5667b87ed0..ca72f8cab8 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -74,8 +74,6 @@ typedef struct PCMachineState {
*
* Compat fields:
*
- * @enforce_aligned_dimm: check that DIMM's address/size is aligned by
- * backend's alignment value if provided
* @acpi_data_size: Size of the chunk of memory at the top of RAM
* for the BIOS ACPI tables and other BIOS
* datastructures.
@@ -114,7 +112,6 @@ struct PCMachineClass {
/* RAM / address space compat: */
bool gigabyte_align;
bool has_reserved_memory;
- bool enforce_aligned_dimm;
bool broken_reserved_end;
bool enforce_amd_1tb_hole;
bool isa_bios_alias;
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 215462e861..ff5683a8ee 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -728,7 +728,6 @@ static void pc_get_device_memory_range(PCMachineState *pcms,
hwaddr *base,
ram_addr_t *device_mem_size)
{
- PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
MachineState *machine = MACHINE(pcms);
ram_addr_t size;
hwaddr addr;
@@ -736,10 +735,8 @@ static void pc_get_device_memory_range(PCMachineState *pcms,
size = machine->maxram_size - machine->ram_size;
addr = ROUND_UP(pc_above_4g_end(pcms), 1 * GiB);
- if (pcmc->enforce_aligned_dimm) {
- /* size device region assuming 1G page max alignment per slot */
- size += (1 * GiB) * machine->ram_slots;
- }
+ /* size device region assuming 1G page max alignment per slot */
+ size += (1 * GiB) * machine->ram_slots;
*base = addr;
*device_mem_size = size;
@@ -1303,12 +1300,9 @@ void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs)
static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp)
{
- const PCMachineState *pcms = PC_MACHINE(hotplug_dev);
const X86MachineState *x86ms = X86_MACHINE(hotplug_dev);
- const PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
const MachineState *ms = MACHINE(hotplug_dev);
const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
- const uint64_t legacy_align = TARGET_PAGE_SIZE;
Error *local_err = NULL;
/*
@@ -1333,8 +1327,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
return;
}
- pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev),
- pcmc->enforce_aligned_dimm ? NULL : &legacy_align, errp);
+ pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp);
}
static void pc_memory_plug(HotplugHandler *hotplug_dev,
@@ -1798,7 +1791,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
pcmc->smbios_defaults = true;
pcmc->gigabyte_align = true;
pcmc->has_reserved_memory = true;
- pcmc->enforce_aligned_dimm = true;
pcmc->enforce_amd_1tb_hole = true;
pcmc->isa_bios_alias = true;
/* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported
diff --git a/tests/avocado/mem-addr-space-check.py b/tests/avocado/mem-addr-space-check.py
index af019969c0..85541ea051 100644
--- a/tests/avocado/mem-addr-space-check.py
+++ b/tests/avocado/mem-addr-space-check.py
@@ -31,11 +31,10 @@ def test_phybits_low_pse36(self):
at 4 GiB boundary when "above_4g_mem_size" is 0 (this would be true when
we have 0.5 GiB of VM memory, see pc_q35_init()). This means total
hotpluggable memory size is 60 GiB. Per slot, we reserve 1 GiB of memory
- for dimm alignment for all newer machines (see enforce_aligned_dimm
- property for pc machines and pc_get_device_memory_range()). That leaves
- total hotpluggable actual memory size of 59 GiB. If the VM is started
- with 0.5 GiB of memory, maxmem should be set to a maximum value of
- 59.5 GiB to ensure that the processor can address all memory directly.
+ for dimm alignment for all machines. That leaves total hotpluggable
+ actual memory size of 59 GiB. If the VM is started with 0.5 GiB of
+ memory, maxmem should be set to a maximum value of 59.5 GiB to ensure
+ that the processor can address all memory directly.
Note that 64-bit pci hole size is 0 in this case. If maxmem is set to
59.6G, QEMU should fail to start with a message "phy-bits are too low".
If maxmem is set to 59.5G with all other QEMU parameters identical, QEMU
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 14/23] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug()
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (12 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 13/23] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 15/23] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug() Philippe Mathieu-Daudé
` (9 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, David Hildenbrand,
Zhao Liu
'legacy_align' is always NULL, remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
include/hw/mem/pc-dimm.h | 3 +--
hw/arm/virt.c | 2 +-
hw/i386/pc.c | 2 +-
hw/loongarch/virt.c | 2 +-
hw/mem/pc-dimm.c | 6 ++----
hw/ppc/spapr.c | 2 +-
6 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index 322bebe555..fe0f3ea963 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -66,8 +66,7 @@ struct PCDIMMDeviceClass {
void (*unrealize)(PCDIMMDevice *dimm);
};
-void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine,
- const uint64_t *legacy_align, Error **errp);
+void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp);
void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine);
void pc_dimm_unplug(PCDIMMDevice *dimm, MachineState *machine);
#endif
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 268b25e332..c7a1f754e7 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2763,7 +2763,7 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
return;
}
- pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp);
+ pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp);
}
static void virt_memory_plug(HotplugHandler *hotplug_dev,
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index ff5683a8ee..2d0a517c4c 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1327,7 +1327,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
return;
}
- pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp);
+ pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp);
}
static void pc_memory_plug(HotplugHandler *hotplug_dev,
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index b7ea17d5f3..8be2d2ff6a 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -1245,7 +1245,7 @@ static bool memhp_type_supported(DeviceState *dev)
static void virt_mem_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp)
{
- pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp);
+ pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp);
}
static void virt_device_pre_plug(HotplugHandler *hotplug_dev,
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 37f1f4ccfd..836384a90f 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -44,8 +44,7 @@ static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm, Error **errp)
return host_memory_backend_get_memory(dimm->hostmem);
}
-void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine,
- const uint64_t *legacy_align, Error **errp)
+void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp)
{
Error *local_err = NULL;
int slot;
@@ -70,8 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine,
&error_abort);
trace_mhp_pc_dimm_assigned_slot(slot);
- memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, legacy_align,
- errp);
+ memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp);
}
void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 81a187f126..d7d4b188ee 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3700,7 +3700,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
return;
}
- pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), NULL, errp);
+ pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), errp);
}
struct SpaprDimmState {
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 15/23] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug()
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (13 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 14/23] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 16/23] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine Philippe Mathieu-Daudé
` (8 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, David Hildenbrand,
Zhao Liu
'legacy_align' is always NULL, remove it, simplifying
memory_device_pre_plug().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
include/hw/mem/memory-device.h | 2 +-
hw/i386/pc.c | 3 +--
hw/mem/memory-device.c | 12 ++++--------
hw/mem/pc-dimm.c | 2 +-
hw/virtio/virtio-md-pci.c | 2 +-
5 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h
index e0571c8a31..c0a58087cc 100644
--- a/include/hw/mem/memory-device.h
+++ b/include/hw/mem/memory-device.h
@@ -169,7 +169,7 @@ uint64_t get_plugged_memory_size(void);
unsigned int memory_devices_get_reserved_memslots(void);
bool memory_devices_memslot_auto_decision_active(void);
void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms,
- const uint64_t *legacy_align, Error **errp);
+ Error **errp);
void memory_device_plug(MemoryDeviceState *md, MachineState *ms);
void memory_device_unplug(MemoryDeviceState *md, MachineState *ms);
uint64_t memory_device_get_region_size(const MemoryDeviceState *md,
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2d0a517c4c..8a9c025754 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1395,8 +1395,7 @@ static void pc_hv_balloon_pre_plug(HotplugHandler *hotplug_dev,
{
/* The vmbus handler has no hotplug handler; we should never end up here. */
g_assert(!dev->hotplugged);
- memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), NULL,
- errp);
+ memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), errp);
}
static void pc_hv_balloon_plug(HotplugHandler *hotplug_dev,
diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c
index e098585cda..a5f279adcc 100644
--- a/hw/mem/memory-device.c
+++ b/hw/mem/memory-device.c
@@ -345,7 +345,7 @@ uint64_t get_plugged_memory_size(void)
}
void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms,
- const uint64_t *legacy_align, Error **errp)
+ Error **errp)
{
const MemoryDeviceClass *mdc = MEMORY_DEVICE_GET_CLASS(md);
Error *local_err = NULL;
@@ -388,14 +388,10 @@ void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms,
return;
}
- if (legacy_align) {
- align = *legacy_align;
- } else {
- if (mdc->get_min_alignment) {
- align = mdc->get_min_alignment(md);
- }
- align = MAX(align, memory_region_get_alignment(mr));
+ if (mdc->get_min_alignment) {
+ align = mdc->get_min_alignment(md);
}
+ align = MAX(align, memory_region_get_alignment(mr));
addr = mdc->get_addr(md);
addr = memory_device_get_free_addr(ms, !addr ? NULL : &addr, align,
memory_region_size(mr), &local_err);
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 836384a90f..27919ca45d 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -69,7 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp)
&error_abort);
trace_mhp_pc_dimm_assigned_slot(slot);
- memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp);
+ memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, errp);
}
void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine)
diff --git a/hw/virtio/virtio-md-pci.c b/hw/virtio/virtio-md-pci.c
index 62bfb7920b..9ec5067662 100644
--- a/hw/virtio/virtio-md-pci.c
+++ b/hw/virtio/virtio-md-pci.c
@@ -37,7 +37,7 @@ void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp)
* First, see if we can plug this memory device at all. If that
* succeeds, branch of to the actual hotplug handler.
*/
- memory_device_pre_plug(md, ms, NULL, &local_err);
+ memory_device_pre_plug(md, ms, &local_err);
if (!local_err && bus_handler) {
hotplug_handler_pre_plug(bus_handler, dev, &local_err);
}
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 16/23] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (14 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 15/23] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug() Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 17/23] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob Philippe Mathieu-Daudé
` (7 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
The pc-i440fx-2.2 machine was deprecated for the 8.2
release (see commit c7437f0ddb "docs/about: Mark the
old pc-i440fx-2.0 - 2.3 machine types as deprecated"),
time to remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
docs/about/deprecated.rst | 2 +-
docs/about/removed-features.rst | 2 +-
include/hw/i386/pc.h | 3 ---
hw/i386/pc.c | 23 -----------------------
hw/i386/pc_piix.c | 21 ---------------------
5 files changed, 2 insertions(+), 49 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index e332eb46e9..d7775fbb84 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -212,7 +212,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name
better reflects the way this property affects all random data within
the device tree blob, not just the ``kaslr-seed`` node.
-``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
+``pc-i440fx-2.3`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These old machine types are quite neglected nowadays and thus might have
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index 347e04e50e..58821a8695 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0)
This machine has been renamed ``fuloong2e``.
-``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0)
+``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These machine types were very old and likely could not be used for live
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index ca72f8cab8..155a02b1b5 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -307,9 +307,6 @@ extern const size_t pc_compat_2_4_len;
extern GlobalProperty pc_compat_2_3[];
extern const size_t pc_compat_2_3_len;
-extern GlobalProperty pc_compat_2_2[];
-extern const size_t pc_compat_2_2_len;
-
#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
{ \
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 8a9c025754..21a9b7a5ae 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -290,29 +290,6 @@ GlobalProperty pc_compat_2_3[] = {
};
const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3);
-GlobalProperty pc_compat_2_2[] = {
- PC_CPU_MODEL_IDS("2.2.0")
- { "kvm64" "-" TYPE_X86_CPU, "vme", "off" },
- { "kvm32" "-" TYPE_X86_CPU, "vme", "off" },
- { "Conroe" "-" TYPE_X86_CPU, "vme", "off" },
- { "Penryn" "-" TYPE_X86_CPU, "vme", "off" },
- { "Nehalem" "-" TYPE_X86_CPU, "vme", "off" },
- { "Westmere" "-" TYPE_X86_CPU, "vme", "off" },
- { "SandyBridge" "-" TYPE_X86_CPU, "vme", "off" },
- { "Haswell" "-" TYPE_X86_CPU, "vme", "off" },
- { "Broadwell" "-" TYPE_X86_CPU, "vme", "off" },
- { "Opteron_G1" "-" TYPE_X86_CPU, "vme", "off" },
- { "Opteron_G2" "-" TYPE_X86_CPU, "vme", "off" },
- { "Opteron_G3" "-" TYPE_X86_CPU, "vme", "off" },
- { "Opteron_G4" "-" TYPE_X86_CPU, "vme", "off" },
- { "Opteron_G5" "-" TYPE_X86_CPU, "vme", "off" },
- { "Haswell" "-" TYPE_X86_CPU, "f16c", "off" },
- { "Haswell" "-" TYPE_X86_CPU, "rdrand", "off" },
- { "Broadwell" "-" TYPE_X86_CPU, "f16c", "off" },
- { "Broadwell" "-" TYPE_X86_CPU, "rdrand", "off" },
-};
-const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2);
-
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
{
GSIState *s;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index e0b421dd51..1343fd93e7 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -429,11 +429,6 @@ static void pc_compat_2_3_fn(MachineState *machine)
}
}
-static void pc_compat_2_2_fn(MachineState *machine)
-{
- pc_compat_2_3_fn(machine);
-}
-
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
@@ -843,22 +838,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m)
DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn,
pc_i440fx_2_3_machine_options);
-static void pc_i440fx_2_2_machine_options(MachineClass *m)
-{
- PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
-
- pc_i440fx_2_3_machine_options(m);
- m->hw_version = "2.2.0";
- m->default_machine_opts = "firmware=bios-256k.bin,suppress-vmdesc=on";
- compat_props_add(m->compat_props, hw_compat_2_2, hw_compat_2_2_len);
- compat_props_add(m->compat_props, pc_compat_2_2, pc_compat_2_2_len);
- pcmc->rsdp_in_ram = false;
- pcmc->resizable_acpi_blob = false;
-}
-
-DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn,
- pc_i440fx_2_2_machine_options);
-
#ifdef CONFIG_ISAPC
static void isapc_machine_options(MachineClass *m)
{
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 17/23] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (15 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 16/23] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 18/23] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram Philippe Mathieu-Daudé
` (6 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Zhao Liu
PCMachineClass::resizable_acpi_blob was only used by the
pc-i440fx-2.2 machine, which got removed. It is now always
true. Remove it, simplifying acpi_build().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
include/hw/i386/pc.h | 3 ---
hw/i386/acpi-build.c | 10 ----------
hw/i386/pc.c | 1 -
3 files changed, 14 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 155a02b1b5..d01ddc4618 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -125,9 +125,6 @@ struct PCMachineClass {
/* create kvmclock device even when KVM PV features are not exposed */
bool kvmclock_create_always;
- /* resizable acpi blob compat */
- bool resizable_acpi_blob;
-
/*
* whether the machine type implements broken 32-bit address space bound
* check for memory.
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index f5d74e2b4b..eafc3761c8 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2687,16 +2687,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
* keep the table size stable for all (max_cpus, max_memory_slots)
* combinations.
*/
- /* Make sure we have a buffer in case we need to resize the tables. */
- if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) &&
- !pcmc->resizable_acpi_blob) {
- /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */
- warn_report("ACPI table size %u exceeds %d bytes,"
- " migration may not work",
- tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
- error_printf("Try removing CPUs, NUMA nodes, memory slots"
- " or PCI bridges.\n");
- }
acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE);
acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE);
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 21a9b7a5ae..a6d50df500 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1774,7 +1774,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
pcmc->acpi_data_size = 0x20000 + 0x8000;
pcmc->pvh_enabled = true;
pcmc->kvmclock_create_always = true;
- pcmc->resizable_acpi_blob = true;
x86mc->apic_xrupt_override = true;
assert(!mc->get_hotplug_handler);
mc->get_hotplug_handler = pc_get_hotplug_handler;
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 18/23] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (16 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 17/23] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 19/23] hw/i386/acpi: Remove AcpiBuildState::rsdp field Philippe Mathieu-Daudé
` (5 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
PCMachineClass::rsdp_in_ram was only used by the
pc-i440fx-2.2 machine, which got removed. It is
now always true. Remove it, simplifying acpi_setup().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
include/hw/i386/pc.h | 1 -
hw/i386/acpi-build.c | 35 ++++-------------------------------
hw/i386/pc.c | 1 -
3 files changed, 4 insertions(+), 33 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index d01ddc4618..0b7a18a882 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -100,7 +100,6 @@ struct PCMachineClass {
/* ACPI compat: */
bool has_acpi_build;
- bool rsdp_in_ram;
unsigned acpi_data_size;
int pci_root_uid;
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index eafc3761c8..158e74f64a 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2494,7 +2494,6 @@ static
void acpi_build(AcpiBuildTables *tables, MachineState *machine)
{
PCMachineState *pcms = PC_MACHINE(machine);
- PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
X86MachineState *x86ms = X86_MACHINE(machine);
DeviceState *iommu = pcms->iommu;
GArray *table_offsets;
@@ -2666,16 +2665,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
.rsdt_tbl_offset = &rsdt,
};
build_rsdp(tables->rsdp, tables->linker, &rsdp_data);
- if (!pcmc->rsdp_in_ram) {
- /* We used to allocate some extra space for RSDP revision 2 but
- * only used the RSDP revision 0 space. The extra bytes were
- * zeroed out and not used.
- * Here we continue wasting those extra 16 bytes to make sure we
- * don't break migration for machine types 2.2 and older due to
- * RSDP blob size mismatch.
- */
- build_append_int_noprefix(tables->rsdp, 0, 16);
- }
}
/* We'll expose it all to Guest so we want to reduce
@@ -2754,7 +2743,6 @@ static const VMStateDescription vmstate_acpi_build = {
void acpi_setup(void)
{
PCMachineState *pcms = PC_MACHINE(qdev_get_machine());
- PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
X86MachineState *x86ms = X86_MACHINE(pcms);
AcpiBuildTables tables;
AcpiBuildState *build_state;
@@ -2816,25 +2804,10 @@ void acpi_setup(void)
tables.vmgenid);
}
- if (!pcmc->rsdp_in_ram) {
- /*
- * Keep for compatibility with old machine types.
- * Though RSDP is small, its contents isn't immutable, so
- * we'll update it along with the rest of tables on guest access.
- */
- uint32_t rsdp_size = acpi_data_len(tables.rsdp);
-
- build_state->rsdp = g_memdup(tables.rsdp->data, rsdp_size);
- fw_cfg_add_file_callback(x86ms->fw_cfg, ACPI_BUILD_RSDP_FILE,
- acpi_build_update, NULL, build_state,
- build_state->rsdp, rsdp_size, true);
- build_state->rsdp_mr = NULL;
- } else {
- build_state->rsdp = NULL;
- build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update,
- build_state, tables.rsdp,
- ACPI_BUILD_RSDP_FILE);
- }
+ build_state->rsdp = NULL;
+ build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update,
+ build_state, tables.rsdp,
+ ACPI_BUILD_RSDP_FILE);
qemu_register_reset(acpi_build_reset, build_state);
acpi_build_reset(build_state);
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a6d50df500..b0fc8686d8 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1763,7 +1763,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
pcmc->pci_enabled = true;
pcmc->has_acpi_build = true;
- pcmc->rsdp_in_ram = true;
pcmc->smbios_defaults = true;
pcmc->gigabyte_align = true;
pcmc->has_reserved_memory = true;
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 19/23] hw/i386/acpi: Remove AcpiBuildState::rsdp field
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (17 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 18/23] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 20/23] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine Philippe Mathieu-Daudé
` (4 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
AcpiBuildState::rsdp is always NULL, remove it,
simplifying acpi_build_update().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
hw/i386/acpi-build.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 158e74f64a..f4e366f64f 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2458,7 +2458,6 @@ struct AcpiBuildState {
MemoryRegion *table_mr;
/* Is table patched? */
uint8_t patched;
- void *rsdp;
MemoryRegion *rsdp_mr;
MemoryRegion *linker_mr;
} AcpiBuildState;
@@ -2714,11 +2713,7 @@ static void acpi_build_update(void *build_opaque)
acpi_ram_update(build_state->table_mr, tables.table_data);
- if (build_state->rsdp) {
- memcpy(build_state->rsdp, tables.rsdp->data, acpi_data_len(tables.rsdp));
- } else {
- acpi_ram_update(build_state->rsdp_mr, tables.rsdp);
- }
+ acpi_ram_update(build_state->rsdp_mr, tables.rsdp);
acpi_ram_update(build_state->linker_mr, tables.linker->cmd_blob);
acpi_build_tables_cleanup(&tables, true);
@@ -2804,7 +2799,6 @@ void acpi_setup(void)
tables.vmgenid);
}
- build_state->rsdp = NULL;
build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update,
build_state, tables.rsdp,
ACPI_BUILD_RSDP_FILE);
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 20/23] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (18 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 19/23] hw/i386/acpi: Remove AcpiBuildState::rsdp field Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 21/23] hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro Philippe Mathieu-Daudé
` (3 subsequent siblings)
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
The pc-i440fx-2.3 machine was deprecated for the 8.2
release (see commit c7437f0ddb "docs/about: Mark the
old pc-i440fx-2.0 - 2.3 machine types as deprecated"),
time to remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
docs/about/deprecated.rst | 4 ++--
docs/about/removed-features.rst | 2 +-
hw/i386/pc.c | 25 -------------------------
hw/i386/pc_piix.c | 19 -------------------
4 files changed, 3 insertions(+), 47 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index d7775fbb84..ff3da68208 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -212,8 +212,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name
better reflects the way this property affects all random data within
the device tree blob, not just the ``kaslr-seed`` node.
-``pc-i440fx-2.3`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''
These old machine types are quite neglected nowadays and thus might have
various pitfalls with regards to live migration. Use a newer machine type
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index 58821a8695..fc7b28e637 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0)
This machine has been renamed ``fuloong2e``.
-``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0)
+``pc-0.10`` up to ``pc-i440fx-2.3`` (removed in 4.0 up to 9.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These machine types were very old and likely could not be used for live
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index b0fc8686d8..819a164373 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -265,31 +265,6 @@ GlobalProperty pc_compat_2_4[] = {
};
const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4);
-GlobalProperty pc_compat_2_3[] = {
- PC_CPU_MODEL_IDS("2.3.0")
- { TYPE_X86_CPU, "arat", "off" },
- { "qemu64" "-" TYPE_X86_CPU, "min-level", "4" },
- { "kvm64" "-" TYPE_X86_CPU, "min-level", "5" },
- { "pentium3" "-" TYPE_X86_CPU, "min-level", "2" },
- { "n270" "-" TYPE_X86_CPU, "min-level", "5" },
- { "Conroe" "-" TYPE_X86_CPU, "min-level", "4" },
- { "Penryn" "-" TYPE_X86_CPU, "min-level", "4" },
- { "Nehalem" "-" TYPE_X86_CPU, "min-level", "4" },
- { "n270" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "Penryn" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "Conroe" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "Nehalem" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "Westmere" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "SandyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "IvyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "Haswell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "Haswell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "Broadwell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { "Broadwell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" },
- { TYPE_X86_CPU, "kvm-no-smi-migration", "on" },
-};
-const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3);
-
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
{
GSIState *s;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 1343fd93e7..217c749705 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -421,14 +421,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp)
* hw_compat_*, pc_compat_*, or * pc_*_machine_options().
*/
-static void pc_compat_2_3_fn(MachineState *machine)
-{
- X86MachineState *x86ms = X86_MACHINE(machine);
- if (kvm_enabled()) {
- x86ms->smm = ON_OFF_AUTO_OFF;
- }
-}
-
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
@@ -827,17 +819,6 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m)
DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
pc_i440fx_2_4_machine_options)
-static void pc_i440fx_2_3_machine_options(MachineClass *m)
-{
- pc_i440fx_2_4_machine_options(m);
- m->hw_version = "2.3.0";
- compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len);
- compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len);
-}
-
-DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn,
- pc_i440fx_2_3_machine_options);
-
#ifdef CONFIG_ISAPC
static void isapc_machine_options(MachineClass *m)
{
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 21/23] hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (19 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 20/23] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 10:57 ` Igor Mammedov
2024-06-17 7:11 ` [PATCH v6 22/23] target/i386: Remove X86CPU::kvm_no_smi_migration field Philippe Mathieu-Daudé
` (2 subsequent siblings)
23 siblings, 1 reply; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Daniel P . Berrangé,
Thomas Huth, Zhao Liu
Last commit removed the last non-NULL use of DEFINE_I440FX_MACHINE
3rd parameter. 'compatfn' is now obsolete, remove it.
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/i386/pc_piix.c | 69 ++++++++++++++++++++---------------------------
1 file changed, 29 insertions(+), 40 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 217c749705..e4930b7f48 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -414,13 +414,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp)
pcms->south_bridge = PCSouthBridgeOption_lookup.array[value];
}
-/* Looking for a pc_compat_2_4() function? It doesn't exist.
- * pc_compat_*() functions that run on machine-init time and
- * change global QEMU state are deprecated. Please don't create
- * one, and implement any pc-*-2.4 (and newer) compat code in
- * hw_compat_*, pc_compat_*, or * pc_*_machine_options().
- */
-
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
@@ -452,13 +445,9 @@ static void pc_xen_hvm_init(MachineState *machine)
}
#endif
-#define DEFINE_I440FX_MACHINE(suffix, name, compatfn, optionfn) \
+#define DEFINE_I440FX_MACHINE(suffix, name, optionfn) \
static void pc_init_##suffix(MachineState *machine) \
{ \
- void (*compat)(MachineState *m) = (compatfn); \
- if (compat) { \
- compat(machine); \
- } \
pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \
} \
DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn)
@@ -496,7 +485,7 @@ static void pc_i440fx_9_1_machine_options(MachineClass *m)
m->is_default = true;
}
-DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1", NULL,
+DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1",
pc_i440fx_9_1_machine_options);
static void pc_i440fx_9_0_machine_options(MachineClass *m)
@@ -512,7 +501,7 @@ static void pc_i440fx_9_0_machine_options(MachineClass *m)
pcmc->isa_bios_alias = false;
}
-DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0", NULL,
+DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0",
pc_i440fx_9_0_machine_options);
static void pc_i440fx_8_2_machine_options(MachineClass *m)
@@ -527,7 +516,7 @@ static void pc_i440fx_8_2_machine_options(MachineClass *m)
pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_64;
}
-DEFINE_I440FX_MACHINE(v8_2, "pc-i440fx-8.2", NULL,
+DEFINE_I440FX_MACHINE(v8_2, "pc-i440fx-8.2",
pc_i440fx_8_2_machine_options);
static void pc_i440fx_8_1_machine_options(MachineClass *m)
@@ -541,7 +530,7 @@ static void pc_i440fx_8_1_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_8_1, pc_compat_8_1_len);
}
-DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1", NULL,
+DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1",
pc_i440fx_8_1_machine_options);
static void pc_i440fx_8_0_machine_options(MachineClass *m)
@@ -556,7 +545,7 @@ static void pc_i440fx_8_0_machine_options(MachineClass *m)
pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32;
}
-DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0", NULL,
+DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0",
pc_i440fx_8_0_machine_options);
static void pc_i440fx_7_2_machine_options(MachineClass *m)
@@ -566,7 +555,7 @@ static void pc_i440fx_7_2_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_7_2, pc_compat_7_2_len);
}
-DEFINE_I440FX_MACHINE(v7_2, "pc-i440fx-7.2", NULL,
+DEFINE_I440FX_MACHINE(v7_2, "pc-i440fx-7.2",
pc_i440fx_7_2_machine_options);
static void pc_i440fx_7_1_machine_options(MachineClass *m)
@@ -576,7 +565,7 @@ static void pc_i440fx_7_1_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_7_1, pc_compat_7_1_len);
}
-DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1", NULL,
+DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1",
pc_i440fx_7_1_machine_options);
static void pc_i440fx_7_0_machine_options(MachineClass *m)
@@ -588,7 +577,7 @@ static void pc_i440fx_7_0_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len);
}
-DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", NULL,
+DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0",
pc_i440fx_7_0_machine_options);
static void pc_i440fx_6_2_machine_options(MachineClass *m)
@@ -598,7 +587,7 @@ static void pc_i440fx_6_2_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len);
}
-DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", NULL,
+DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2",
pc_i440fx_6_2_machine_options);
static void pc_i440fx_6_1_machine_options(MachineClass *m)
@@ -609,7 +598,7 @@ static void pc_i440fx_6_1_machine_options(MachineClass *m)
m->smp_props.prefer_sockets = true;
}
-DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1", NULL,
+DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1",
pc_i440fx_6_1_machine_options);
static void pc_i440fx_6_0_machine_options(MachineClass *m)
@@ -619,7 +608,7 @@ static void pc_i440fx_6_0_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len);
}
-DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0", NULL,
+DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0",
pc_i440fx_6_0_machine_options);
static void pc_i440fx_5_2_machine_options(MachineClass *m)
@@ -629,7 +618,7 @@ static void pc_i440fx_5_2_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_5_2, pc_compat_5_2_len);
}
-DEFINE_I440FX_MACHINE(v5_2, "pc-i440fx-5.2", NULL,
+DEFINE_I440FX_MACHINE(v5_2, "pc-i440fx-5.2",
pc_i440fx_5_2_machine_options);
static void pc_i440fx_5_1_machine_options(MachineClass *m)
@@ -643,7 +632,7 @@ static void pc_i440fx_5_1_machine_options(MachineClass *m)
pcmc->pci_root_uid = 1;
}
-DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1", NULL,
+DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1",
pc_i440fx_5_1_machine_options);
static void pc_i440fx_5_0_machine_options(MachineClass *m)
@@ -655,7 +644,7 @@ static void pc_i440fx_5_0_machine_options(MachineClass *m)
m->auto_enable_numa_with_memdev = false;
}
-DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0", NULL,
+DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0",
pc_i440fx_5_0_machine_options);
static void pc_i440fx_4_2_machine_options(MachineClass *m)
@@ -665,7 +654,7 @@ static void pc_i440fx_4_2_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len);
}
-DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2", NULL,
+DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2",
pc_i440fx_4_2_machine_options);
static void pc_i440fx_4_1_machine_options(MachineClass *m)
@@ -675,7 +664,7 @@ static void pc_i440fx_4_1_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_4_1, pc_compat_4_1_len);
}
-DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1", NULL,
+DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1",
pc_i440fx_4_1_machine_options);
static void pc_i440fx_4_0_machine_options(MachineClass *m)
@@ -687,7 +676,7 @@ static void pc_i440fx_4_0_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len);
}
-DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0", NULL,
+DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0",
pc_i440fx_4_0_machine_options);
static void pc_i440fx_3_1_machine_options(MachineClass *m)
@@ -701,7 +690,7 @@ static void pc_i440fx_3_1_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len);
}
-DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL,
+DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1",
pc_i440fx_3_1_machine_options);
static void pc_i440fx_3_0_machine_options(MachineClass *m)
@@ -711,7 +700,7 @@ static void pc_i440fx_3_0_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len);
}
-DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,
+DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0",
pc_i440fx_3_0_machine_options);
static void pc_i440fx_2_12_machine_options(MachineClass *m)
@@ -722,7 +711,7 @@ static void pc_i440fx_2_12_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len);
}
-DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12", NULL,
+DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12",
pc_i440fx_2_12_machine_options);
static void pc_i440fx_2_11_machine_options(MachineClass *m)
@@ -732,7 +721,7 @@ static void pc_i440fx_2_11_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_2_11, pc_compat_2_11_len);
}
-DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11", NULL,
+DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11",
pc_i440fx_2_11_machine_options);
static void pc_i440fx_2_10_machine_options(MachineClass *m)
@@ -743,7 +732,7 @@ static void pc_i440fx_2_10_machine_options(MachineClass *m)
m->auto_enable_numa_with_memhp = false;
}
-DEFINE_I440FX_MACHINE(v2_10, "pc-i440fx-2.10", NULL,
+DEFINE_I440FX_MACHINE(v2_10, "pc-i440fx-2.10",
pc_i440fx_2_10_machine_options);
static void pc_i440fx_2_9_machine_options(MachineClass *m)
@@ -753,7 +742,7 @@ static void pc_i440fx_2_9_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_2_9, pc_compat_2_9_len);
}
-DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9", NULL,
+DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9",
pc_i440fx_2_9_machine_options);
static void pc_i440fx_2_8_machine_options(MachineClass *m)
@@ -763,7 +752,7 @@ static void pc_i440fx_2_8_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_2_8, pc_compat_2_8_len);
}
-DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8", NULL,
+DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8",
pc_i440fx_2_8_machine_options);
static void pc_i440fx_2_7_machine_options(MachineClass *m)
@@ -773,7 +762,7 @@ static void pc_i440fx_2_7_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_2_7, pc_compat_2_7_len);
}
-DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7", NULL,
+DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7",
pc_i440fx_2_7_machine_options);
static void pc_i440fx_2_6_machine_options(MachineClass *m)
@@ -788,7 +777,7 @@ static void pc_i440fx_2_6_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_2_6, pc_compat_2_6_len);
}
-DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6", NULL,
+DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6",
pc_i440fx_2_6_machine_options);
static void pc_i440fx_2_5_machine_options(MachineClass *m)
@@ -802,7 +791,7 @@ static void pc_i440fx_2_5_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len);
}
-DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5", NULL,
+DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5",
pc_i440fx_2_5_machine_options);
static void pc_i440fx_2_4_machine_options(MachineClass *m)
@@ -816,7 +805,7 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m)
compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len);
}
-DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
+DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4",
pc_i440fx_2_4_machine_options)
#ifdef CONFIG_ISAPC
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 22/23] target/i386: Remove X86CPU::kvm_no_smi_migration field
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (20 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 21/23] hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 11:00 ` Igor Mammedov
2024-06-17 7:11 ` [PATCH v6 23/23] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Philippe Mathieu-Daudé
2024-06-18 10:42 ` [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
23 siblings, 1 reply; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Zhao Liu, Thomas Huth
X86CPU::kvm_no_smi_migration was only used by the
pc-i440fx-2.3 machine, which got removed. Remove it
and simplify kvm_put_vcpu_events().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
target/i386/cpu.h | 3 ---
target/i386/cpu.c | 2 --
target/i386/kvm/kvm.c | 7 +------
3 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 8fe28b67e0..bba1d73aed 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -2107,9 +2107,6 @@ struct ArchCPU {
/* if set, limit maximum value for phys_bits when host_phys_bits is true */
uint8_t host_phys_bits_limit;
- /* Stop SMI delivery for migration compatibility with old machines */
- bool kvm_no_smi_migration;
-
/* Forcefully disable KVM PV features not exposed in guest CPUIDs */
bool kvm_pv_enforce_cpuid;
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 7466217d5e..a5af56405b 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -8283,8 +8283,6 @@ static Property x86_cpu_properties[] = {
DEFINE_PROP_BOOL("x-vendor-cpuid-only", X86CPU, vendor_cpuid_only, true),
DEFINE_PROP_BOOL("lmce", X86CPU, enable_lmce, false),
DEFINE_PROP_BOOL("l3-cache", X86CPU, enable_l3_cache, true),
- DEFINE_PROP_BOOL("kvm-no-smi-migration", X86CPU, kvm_no_smi_migration,
- false),
DEFINE_PROP_BOOL("kvm-pv-enforce-cpuid", X86CPU, kvm_pv_enforce_cpuid,
false),
DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true),
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 912f5d5a6b..7ad8072748 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -4474,6 +4474,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level)
events.sipi_vector = env->sipi_vector;
if (has_msr_smbase) {
+ events.flags |= KVM_VCPUEVENT_VALID_SMM;
events.smi.smm = !!(env->hflags & HF_SMM_MASK);
events.smi.smm_inside_nmi = !!(env->hflags2 & HF2_SMM_INSIDE_NMI_MASK);
if (kvm_irqchip_in_kernel()) {
@@ -4488,12 +4489,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level)
events.smi.pending = 0;
events.smi.latched_init = 0;
}
- /* Stop SMI delivery on old machine types to avoid a reboot
- * on an inward migration of an old VM.
- */
- if (!cpu->kvm_no_smi_migration) {
- events.flags |= KVM_VCPUEVENT_VALID_SMM;
- }
}
if (level >= KVM_PUT_RESET_STATE) {
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 23/23] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (21 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 22/23] target/i386: Remove X86CPU::kvm_no_smi_migration field Philippe Mathieu-Daudé
@ 2024-06-17 7:11 ` Philippe Mathieu-Daudé
2024-06-17 11:10 ` Igor Mammedov
2024-06-18 10:42 ` [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
23 siblings, 1 reply; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-17 7:11 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin,
Philippe Mathieu-Daudé, Thomas Huth, Zhao Liu
PCMachineClass::acpi_data_size was only used by the pc-i440fx-2.0
machine, which got removed. Since it is constant, replace the class
field by a definition (local to hw/i386/pc.c, since not used
elsewhere).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
---
include/hw/i386/pc.h | 4 ----
hw/i386/pc.c | 19 ++++++++++++-------
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 0b7a18a882..46bc411063 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -74,9 +74,6 @@ typedef struct PCMachineState {
*
* Compat fields:
*
- * @acpi_data_size: Size of the chunk of memory at the top of RAM
- * for the BIOS ACPI tables and other BIOS
- * datastructures.
* @gigabyte_align: Make sure that guest addresses aligned at
* 1Gbyte boundaries get mapped to host
* addresses aligned at 1Gbyte boundaries. This
@@ -100,7 +97,6 @@ struct PCMachineClass {
/* ACPI compat: */
bool has_acpi_build;
- unsigned acpi_data_size;
int pci_root_uid;
/* SMBIOS compat: */
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 819a164373..77415064c6 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -265,6 +265,16 @@ GlobalProperty pc_compat_2_4[] = {
};
const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4);
+/*
+ * @PC_FW_DATA:
+ * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables
+ * and other BIOS datastructures.
+ *
+ * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K
+ * reported to be used at the moment, 32K should be enough for a while.
+ */
+#define PC_FW_DATA (0x20000 + 0x8000)
+
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
{
GSIState *s;
@@ -646,8 +656,7 @@ void xen_load_linux(PCMachineState *pcms)
fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus);
rom_set_fw(fw_cfg);
- x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size,
- pcmc->pvh_enabled);
+ x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled);
for (i = 0; i < nb_option_roms; i++) {
assert(!strcmp(option_rom[i].name, "linuxboot.bin") ||
!strcmp(option_rom[i].name, "linuxboot_dma.bin") ||
@@ -986,8 +995,7 @@ void pc_memory_init(PCMachineState *pcms,
}
if (linux_boot) {
- x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size,
- pcmc->pvh_enabled);
+ x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled);
}
for (i = 0; i < nb_option_roms; i++) {
@@ -1743,9 +1751,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
pcmc->has_reserved_memory = true;
pcmc->enforce_amd_1tb_hole = true;
pcmc->isa_bios_alias = true;
- /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported
- * to be used at the moment, 32K should be enough for a while. */
- pcmc->acpi_data_size = 0x20000 + 0x8000;
pcmc->pvh_enabled = true;
pcmc->kvmclock_create_always = true;
x86mc->apic_xrupt_override = true;
--
2.41.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v6 21/23] hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro
2024-06-17 7:11 ` [PATCH v6 21/23] hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro Philippe Mathieu-Daudé
@ 2024-06-17 10:57 ` Igor Mammedov
0 siblings, 0 replies; 28+ messages in thread
From: Igor Mammedov @ 2024-06-17 10:57 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Paolo Bonzini, Michael S. Tsirkin,
Daniel P . Berrangé, Thomas Huth, Zhao Liu
On Mon, 17 Jun 2024 09:11:16 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> Last commit removed the last non-NULL use of DEFINE_I440FX_MACHINE
> 3rd parameter. 'compatfn' is now obsolete, remove it.
>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/i386/pc_piix.c | 69 ++++++++++++++++++++---------------------------
> 1 file changed, 29 insertions(+), 40 deletions(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 217c749705..e4930b7f48 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -414,13 +414,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp)
> pcms->south_bridge = PCSouthBridgeOption_lookup.array[value];
> }
>
> -/* Looking for a pc_compat_2_4() function? It doesn't exist.
> - * pc_compat_*() functions that run on machine-init time and
> - * change global QEMU state are deprecated. Please don't create
> - * one, and implement any pc-*-2.4 (and newer) compat code in
> - * hw_compat_*, pc_compat_*, or * pc_*_machine_options().
> - */
> -
> #ifdef CONFIG_ISAPC
> static void pc_init_isa(MachineState *machine)
> {
> @@ -452,13 +445,9 @@ static void pc_xen_hvm_init(MachineState *machine)
> }
> #endif
>
> -#define DEFINE_I440FX_MACHINE(suffix, name, compatfn, optionfn) \
> +#define DEFINE_I440FX_MACHINE(suffix, name, optionfn) \
> static void pc_init_##suffix(MachineState *machine) \
> { \
> - void (*compat)(MachineState *m) = (compatfn); \
> - if (compat) { \
> - compat(machine); \
> - } \
> pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \
> } \
> DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn)
> @@ -496,7 +485,7 @@ static void pc_i440fx_9_1_machine_options(MachineClass *m)
> m->is_default = true;
> }
>
> -DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1", NULL,
> +DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1",
> pc_i440fx_9_1_machine_options);
>
> static void pc_i440fx_9_0_machine_options(MachineClass *m)
> @@ -512,7 +501,7 @@ static void pc_i440fx_9_0_machine_options(MachineClass *m)
> pcmc->isa_bios_alias = false;
> }
>
> -DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0", NULL,
> +DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0",
> pc_i440fx_9_0_machine_options);
>
> static void pc_i440fx_8_2_machine_options(MachineClass *m)
> @@ -527,7 +516,7 @@ static void pc_i440fx_8_2_machine_options(MachineClass *m)
> pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_64;
> }
>
> -DEFINE_I440FX_MACHINE(v8_2, "pc-i440fx-8.2", NULL,
> +DEFINE_I440FX_MACHINE(v8_2, "pc-i440fx-8.2",
> pc_i440fx_8_2_machine_options);
>
> static void pc_i440fx_8_1_machine_options(MachineClass *m)
> @@ -541,7 +530,7 @@ static void pc_i440fx_8_1_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_8_1, pc_compat_8_1_len);
> }
>
> -DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1", NULL,
> +DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1",
> pc_i440fx_8_1_machine_options);
>
> static void pc_i440fx_8_0_machine_options(MachineClass *m)
> @@ -556,7 +545,7 @@ static void pc_i440fx_8_0_machine_options(MachineClass *m)
> pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32;
> }
>
> -DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0", NULL,
> +DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0",
> pc_i440fx_8_0_machine_options);
>
> static void pc_i440fx_7_2_machine_options(MachineClass *m)
> @@ -566,7 +555,7 @@ static void pc_i440fx_7_2_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_7_2, pc_compat_7_2_len);
> }
>
> -DEFINE_I440FX_MACHINE(v7_2, "pc-i440fx-7.2", NULL,
> +DEFINE_I440FX_MACHINE(v7_2, "pc-i440fx-7.2",
> pc_i440fx_7_2_machine_options);
>
> static void pc_i440fx_7_1_machine_options(MachineClass *m)
> @@ -576,7 +565,7 @@ static void pc_i440fx_7_1_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_7_1, pc_compat_7_1_len);
> }
>
> -DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1", NULL,
> +DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1",
> pc_i440fx_7_1_machine_options);
>
> static void pc_i440fx_7_0_machine_options(MachineClass *m)
> @@ -588,7 +577,7 @@ static void pc_i440fx_7_0_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len);
> }
>
> -DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", NULL,
> +DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0",
> pc_i440fx_7_0_machine_options);
>
> static void pc_i440fx_6_2_machine_options(MachineClass *m)
> @@ -598,7 +587,7 @@ static void pc_i440fx_6_2_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len);
> }
>
> -DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", NULL,
> +DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2",
> pc_i440fx_6_2_machine_options);
>
> static void pc_i440fx_6_1_machine_options(MachineClass *m)
> @@ -609,7 +598,7 @@ static void pc_i440fx_6_1_machine_options(MachineClass *m)
> m->smp_props.prefer_sockets = true;
> }
>
> -DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1", NULL,
> +DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1",
> pc_i440fx_6_1_machine_options);
>
> static void pc_i440fx_6_0_machine_options(MachineClass *m)
> @@ -619,7 +608,7 @@ static void pc_i440fx_6_0_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len);
> }
>
> -DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0", NULL,
> +DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0",
> pc_i440fx_6_0_machine_options);
>
> static void pc_i440fx_5_2_machine_options(MachineClass *m)
> @@ -629,7 +618,7 @@ static void pc_i440fx_5_2_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_5_2, pc_compat_5_2_len);
> }
>
> -DEFINE_I440FX_MACHINE(v5_2, "pc-i440fx-5.2", NULL,
> +DEFINE_I440FX_MACHINE(v5_2, "pc-i440fx-5.2",
> pc_i440fx_5_2_machine_options);
>
> static void pc_i440fx_5_1_machine_options(MachineClass *m)
> @@ -643,7 +632,7 @@ static void pc_i440fx_5_1_machine_options(MachineClass *m)
> pcmc->pci_root_uid = 1;
> }
>
> -DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1", NULL,
> +DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1",
> pc_i440fx_5_1_machine_options);
>
> static void pc_i440fx_5_0_machine_options(MachineClass *m)
> @@ -655,7 +644,7 @@ static void pc_i440fx_5_0_machine_options(MachineClass *m)
> m->auto_enable_numa_with_memdev = false;
> }
>
> -DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0", NULL,
> +DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0",
> pc_i440fx_5_0_machine_options);
>
> static void pc_i440fx_4_2_machine_options(MachineClass *m)
> @@ -665,7 +654,7 @@ static void pc_i440fx_4_2_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len);
> }
>
> -DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2", NULL,
> +DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2",
> pc_i440fx_4_2_machine_options);
>
> static void pc_i440fx_4_1_machine_options(MachineClass *m)
> @@ -675,7 +664,7 @@ static void pc_i440fx_4_1_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_4_1, pc_compat_4_1_len);
> }
>
> -DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1", NULL,
> +DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1",
> pc_i440fx_4_1_machine_options);
>
> static void pc_i440fx_4_0_machine_options(MachineClass *m)
> @@ -687,7 +676,7 @@ static void pc_i440fx_4_0_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len);
> }
>
> -DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0", NULL,
> +DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0",
> pc_i440fx_4_0_machine_options);
>
> static void pc_i440fx_3_1_machine_options(MachineClass *m)
> @@ -701,7 +690,7 @@ static void pc_i440fx_3_1_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len);
> }
>
> -DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL,
> +DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1",
> pc_i440fx_3_1_machine_options);
>
> static void pc_i440fx_3_0_machine_options(MachineClass *m)
> @@ -711,7 +700,7 @@ static void pc_i440fx_3_0_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len);
> }
>
> -DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,
> +DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0",
> pc_i440fx_3_0_machine_options);
>
> static void pc_i440fx_2_12_machine_options(MachineClass *m)
> @@ -722,7 +711,7 @@ static void pc_i440fx_2_12_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len);
> }
>
> -DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12", NULL,
> +DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12",
> pc_i440fx_2_12_machine_options);
>
> static void pc_i440fx_2_11_machine_options(MachineClass *m)
> @@ -732,7 +721,7 @@ static void pc_i440fx_2_11_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_2_11, pc_compat_2_11_len);
> }
>
> -DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11", NULL,
> +DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11",
> pc_i440fx_2_11_machine_options);
>
> static void pc_i440fx_2_10_machine_options(MachineClass *m)
> @@ -743,7 +732,7 @@ static void pc_i440fx_2_10_machine_options(MachineClass *m)
> m->auto_enable_numa_with_memhp = false;
> }
>
> -DEFINE_I440FX_MACHINE(v2_10, "pc-i440fx-2.10", NULL,
> +DEFINE_I440FX_MACHINE(v2_10, "pc-i440fx-2.10",
> pc_i440fx_2_10_machine_options);
>
> static void pc_i440fx_2_9_machine_options(MachineClass *m)
> @@ -753,7 +742,7 @@ static void pc_i440fx_2_9_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_2_9, pc_compat_2_9_len);
> }
>
> -DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9", NULL,
> +DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9",
> pc_i440fx_2_9_machine_options);
>
> static void pc_i440fx_2_8_machine_options(MachineClass *m)
> @@ -763,7 +752,7 @@ static void pc_i440fx_2_8_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_2_8, pc_compat_2_8_len);
> }
>
> -DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8", NULL,
> +DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8",
> pc_i440fx_2_8_machine_options);
>
> static void pc_i440fx_2_7_machine_options(MachineClass *m)
> @@ -773,7 +762,7 @@ static void pc_i440fx_2_7_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_2_7, pc_compat_2_7_len);
> }
>
> -DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7", NULL,
> +DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7",
> pc_i440fx_2_7_machine_options);
>
> static void pc_i440fx_2_6_machine_options(MachineClass *m)
> @@ -788,7 +777,7 @@ static void pc_i440fx_2_6_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_2_6, pc_compat_2_6_len);
> }
>
> -DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6", NULL,
> +DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6",
> pc_i440fx_2_6_machine_options);
>
> static void pc_i440fx_2_5_machine_options(MachineClass *m)
> @@ -802,7 +791,7 @@ static void pc_i440fx_2_5_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len);
> }
>
> -DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5", NULL,
> +DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5",
> pc_i440fx_2_5_machine_options);
>
> static void pc_i440fx_2_4_machine_options(MachineClass *m)
> @@ -816,7 +805,7 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m)
> compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len);
> }
>
> -DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
> +DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4",
> pc_i440fx_2_4_machine_options)
>
> #ifdef CONFIG_ISAPC
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v6 22/23] target/i386: Remove X86CPU::kvm_no_smi_migration field
2024-06-17 7:11 ` [PATCH v6 22/23] target/i386: Remove X86CPU::kvm_no_smi_migration field Philippe Mathieu-Daudé
@ 2024-06-17 11:00 ` Igor Mammedov
0 siblings, 0 replies; 28+ messages in thread
From: Igor Mammedov @ 2024-06-17 11:00 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Paolo Bonzini, Michael S. Tsirkin, Zhao Liu,
Thomas Huth
On Mon, 17 Jun 2024 09:11:17 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> X86CPU::kvm_no_smi_migration was only used by the
> pc-i440fx-2.3 machine, which got removed. Remove it
> and simplify kvm_put_vcpu_events().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> target/i386/cpu.h | 3 ---
> target/i386/cpu.c | 2 --
> target/i386/kvm/kvm.c | 7 +------
> 3 files changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> index 8fe28b67e0..bba1d73aed 100644
> --- a/target/i386/cpu.h
> +++ b/target/i386/cpu.h
> @@ -2107,9 +2107,6 @@ struct ArchCPU {
> /* if set, limit maximum value for phys_bits when host_phys_bits is true */
> uint8_t host_phys_bits_limit;
>
> - /* Stop SMI delivery for migration compatibility with old machines */
> - bool kvm_no_smi_migration;
> -
> /* Forcefully disable KVM PV features not exposed in guest CPUIDs */
> bool kvm_pv_enforce_cpuid;
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 7466217d5e..a5af56405b 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -8283,8 +8283,6 @@ static Property x86_cpu_properties[] = {
> DEFINE_PROP_BOOL("x-vendor-cpuid-only", X86CPU, vendor_cpuid_only, true),
> DEFINE_PROP_BOOL("lmce", X86CPU, enable_lmce, false),
> DEFINE_PROP_BOOL("l3-cache", X86CPU, enable_l3_cache, true),
> - DEFINE_PROP_BOOL("kvm-no-smi-migration", X86CPU, kvm_no_smi_migration,
> - false),
> DEFINE_PROP_BOOL("kvm-pv-enforce-cpuid", X86CPU, kvm_pv_enforce_cpuid,
> false),
> DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true),
> diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
> index 912f5d5a6b..7ad8072748 100644
> --- a/target/i386/kvm/kvm.c
> +++ b/target/i386/kvm/kvm.c
> @@ -4474,6 +4474,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level)
> events.sipi_vector = env->sipi_vector;
>
> if (has_msr_smbase) {
> + events.flags |= KVM_VCPUEVENT_VALID_SMM;
> events.smi.smm = !!(env->hflags & HF_SMM_MASK);
> events.smi.smm_inside_nmi = !!(env->hflags2 & HF2_SMM_INSIDE_NMI_MASK);
> if (kvm_irqchip_in_kernel()) {
> @@ -4488,12 +4489,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level)
> events.smi.pending = 0;
> events.smi.latched_init = 0;
> }
> - /* Stop SMI delivery on old machine types to avoid a reboot
> - * on an inward migration of an old VM.
> - */
> - if (!cpu->kvm_no_smi_migration) {
> - events.flags |= KVM_VCPUEVENT_VALID_SMM;
> - }
> }
>
> if (level >= KVM_PUT_RESET_STATE) {
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v6 23/23] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE
2024-06-17 7:11 ` [PATCH v6 23/23] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Philippe Mathieu-Daudé
@ 2024-06-17 11:10 ` Igor Mammedov
0 siblings, 0 replies; 28+ messages in thread
From: Igor Mammedov @ 2024-06-17 11:10 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Paolo Bonzini, Michael S. Tsirkin, Thomas Huth,
Zhao Liu
On Mon, 17 Jun 2024 09:11:18 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> PCMachineClass::acpi_data_size was only used by the pc-i440fx-2.0
> machine, which got removed. Since it is constant, replace the class
> field by a definition (local to hw/i386/pc.c, since not used
> elsewhere).
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/i386/pc.h | 4 ----
> hw/i386/pc.c | 19 ++++++++++++-------
> 2 files changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 0b7a18a882..46bc411063 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -74,9 +74,6 @@ typedef struct PCMachineState {
> *
> * Compat fields:
> *
> - * @acpi_data_size: Size of the chunk of memory at the top of RAM
> - * for the BIOS ACPI tables and other BIOS
> - * datastructures.
> * @gigabyte_align: Make sure that guest addresses aligned at
> * 1Gbyte boundaries get mapped to host
> * addresses aligned at 1Gbyte boundaries. This
> @@ -100,7 +97,6 @@ struct PCMachineClass {
>
> /* ACPI compat: */
> bool has_acpi_build;
> - unsigned acpi_data_size;
> int pci_root_uid;
>
> /* SMBIOS compat: */
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 819a164373..77415064c6 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -265,6 +265,16 @@ GlobalProperty pc_compat_2_4[] = {
> };
> const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4);
>
> +/*
> + * @PC_FW_DATA:
> + * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables
> + * and other BIOS datastructures.
> + *
> + * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K
> + * reported to be used at the moment, 32K should be enough for a while.
> + */
> +#define PC_FW_DATA (0x20000 + 0x8000)
> +
> GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
> {
> GSIState *s;
> @@ -646,8 +656,7 @@ void xen_load_linux(PCMachineState *pcms)
> fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus);
> rom_set_fw(fw_cfg);
>
> - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size,
> - pcmc->pvh_enabled);
> + x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled);
> for (i = 0; i < nb_option_roms; i++) {
> assert(!strcmp(option_rom[i].name, "linuxboot.bin") ||
> !strcmp(option_rom[i].name, "linuxboot_dma.bin") ||
> @@ -986,8 +995,7 @@ void pc_memory_init(PCMachineState *pcms,
> }
>
> if (linux_boot) {
> - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size,
> - pcmc->pvh_enabled);
> + x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled);
> }
>
> for (i = 0; i < nb_option_roms; i++) {
> @@ -1743,9 +1751,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
> pcmc->has_reserved_memory = true;
> pcmc->enforce_amd_1tb_hole = true;
> pcmc->isa_bios_alias = true;
> - /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported
> - * to be used at the moment, 32K should be enough for a while. */
> - pcmc->acpi_data_size = 0x20000 + 0x8000;
> pcmc->pvh_enabled = true;
> pcmc->kvmclock_create_always = true;
> x86mc->apic_xrupt_override = true;
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
` (22 preceding siblings ...)
2024-06-17 7:11 ` [PATCH v6 23/23] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Philippe Mathieu-Daudé
@ 2024-06-18 10:42 ` Philippe Mathieu-Daudé
23 siblings, 0 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-18 10:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Igor Mammedov, Michael S. Tsirkin
On 17/6/24 09:10, Philippe Mathieu-Daudé wrote:
> Philippe Mathieu-Daudé (23):
> hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines
> hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine
> hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag
> hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag
> hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size
> hw/acpi/ich9: Remove 'memory-hotplug-support' property
> hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug'
> hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine
> target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h'
> hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded
> hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults()
> hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid()
> hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm
> hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug()
> hw/mem/memory-device: Remove legacy_align from
> memory_device_pre_plug()
> hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine
> hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob
> hw/i386/pc: Remove PCMachineClass::rsdp_in_ram
> hw/i386/acpi: Remove AcpiBuildState::rsdp field
> hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine
> hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro
> target/i386: Remove X86CPU::kvm_no_smi_migration field
> hw/i386/pc: Replace PCMachineClass::acpi_data_size by
> PC_ACPI_DATA_SIZE
Series queued.
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2024-06-18 10:42 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 7:10 [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 01/23] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 02/23] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 03/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag Philippe Mathieu-Daudé
2024-06-17 7:10 ` [PATCH v6 04/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 05/23] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 06/23] hw/acpi/ich9: Remove 'memory-hotplug-support' property Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 07/23] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 08/23] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 09/23] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 10/23] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 11/23] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 12/23] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 13/23] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 14/23] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 15/23] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug() Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 16/23] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 17/23] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 18/23] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 19/23] hw/i386/acpi: Remove AcpiBuildState::rsdp field Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 20/23] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine Philippe Mathieu-Daudé
2024-06-17 7:11 ` [PATCH v6 21/23] hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro Philippe Mathieu-Daudé
2024-06-17 10:57 ` Igor Mammedov
2024-06-17 7:11 ` [PATCH v6 22/23] target/i386: Remove X86CPU::kvm_no_smi_migration field Philippe Mathieu-Daudé
2024-06-17 11:00 ` Igor Mammedov
2024-06-17 7:11 ` [PATCH v6 23/23] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Philippe Mathieu-Daudé
2024-06-17 11:10 ` Igor Mammedov
2024-06-18 10:42 ` [PATCH v6 00/23] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).