[RFC PATCH v1 00/15] node_dev_udev: use workerpool and improve nodedev events
by Marc Hartmayer
When an udev event occurs for a mediated device (mdev) the mdev config data
requires an update via mdevctl as the udev event does not contain all config
data. This update needs to occur immediate and to be finished before the libvirt
nodedev event is issued to keep the API usage reliable.
This patch series already contains the patches from a previous patch series
"[RFC PATCH v1 0/5] node_device_udev: small improvements" and has still some
TODO's included and is sent therefore as a RFC.
Boris Fiuczynski (3):
nodedev: fix mdev add udev event data handling
nodedev: immediate update of active config on udev add
nodedev: reset active config data on udev remove event
Marc Hartmayer (12):
node_device_udev: Set @def to NULL
node_device_udev: Remove the timeout if the data is disposed
node_device_udev: Test for mdevctlTimeout != -1
node_device_udev: Add comments about locking
node_device_udev: Take lock if `driver->privateData` is modified
node_device_udev: Add prefix `udev` for udev related data
node_device_udev: Inline `udevRemoveOneDevice`
node_device_udev: Use `stateShutdownPrepare` and `stateShutdownWait`
node_device_udev: Use a worker pool for processing the udev events
node_device_udev: Call `nodeDeviceUpdateMediatedDevices` directly
node_device_udev: Don't take `mdevctl` lock for querying `mdevctl
list`
node_device_udev: Make the code easier to read
src/node_device/node_device_driver.h | 5 +-
src/util/virmdev.h | 4 +
src/conf/node_device_conf.c | 10 +-
src/node_device/node_device_driver.c | 19 +-
src/node_device/node_device_udev.c | 435 ++++++++++++++++++---------
src/test/test_driver.c | 3 +-
src/util/virmdev.c | 20 ++
src/libvirt_private.syms | 2 +
8 files changed, 339 insertions(+), 159 deletions(-)
base-commit: 4b5cc57ed35dc24d11673dd3f04bfb8073c0340d
--
2.34.1
1 month
[PATCH v3 0/5] test: fix nodedev mdev XML regression
by Cole Robinson
The virt-manager test suite is busted with libvirt 10.1.0+ after
this commit:
commit e67bca23e4fe38a3491749f724b9edf743d0e916
Author: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Date: Thu Feb 22 14:02:01 2024 +0100
nodedev: add an active config to mdev
See patch #5 for the full explanation. First 4 patches are nodedev
test driver improvements I hit when debugging this
v3:
really truly send to the correct list
v2:
Send to the correct mailing list
Fix version strings in test driver table
Cole Robinson (5):
test: Fix `virsh nodedev-list`
test: Implement virNodeDeviceIsActive
test: Implement virNodeDeviceIsPersistent
test: make nodedevs active by default
conf: nodedev: Fill active_config at XML parse time
src/conf/node_device_conf.c | 5 ++++-
src/test/test_driver.c | 35 ++++++++++++++++++++++++++++++++++-
tests/nodedevxml2xmltest.c | 15 ---------------
3 files changed, 38 insertions(+), 17 deletions(-)
--
2.44.0
1 month
[PATCH] libvirt_nss: Fix ERROR() macro
by Michal Privoznik
The purpose of ERROR() macro in our NSS module is to print error
message provided as arguments followed by error string
corresponding to errno. Historically, we've used strerror_r() for
that (please note, we want our NSS module to be free of libvirt
internal functions, or glib even - hence, g_strerror() is off the
table).
Now strerror_r() is documented as:
Returns ... a pointer to a string that the function stores in
buf, or a pointer to some (immutable) static string (in which
case buf is unused).
Therefore, we can't rely the string being stored in the buf and
really need to store the retval and print that instead.
While touching this area, decrease the ebuf size, since its
current size (1KiB) is triggering our stack limit (2KiB) in some
cases.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/nss/libvirt_nss.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/nss/libvirt_nss.h b/tools/nss/libvirt_nss.h
index 2bb313f329..5f356618f3 100644
--- a/tools/nss/libvirt_nss.h
+++ b/tools/nss/libvirt_nss.h
@@ -37,11 +37,11 @@
# define NULLSTR(s) ((s) ? (s) : "<null>")
# define ERROR(...) \
do { \
- char ebuf[1024]; \
- strerror_r(errno, ebuf, sizeof(ebuf)); \
+ char ebuf[512]; \
+ const char *errmsg = strerror_r(errno, ebuf, sizeof(ebuf)); \
fprintf(stderr, "ERROR %s:%d : ", __FUNCTION__, __LINE__); \
fprintf(stderr, __VA_ARGS__); \
- fprintf(stderr, " : %s\n", ebuf); \
+ fprintf(stderr, " : %s\n", errmsg); \
fprintf(stderr, "\n"); \
} while (0)
--
2.43.2
1 month
[PATCH v2 0/4] qemu: Fix migration with custom XML
by Jiri Denemark
Version 2:
- see patch 1/4 for more details
- added two cleanups
Jiri Denemark (4):
qemu: Fix migration with custom XML
NEWS: Mention migration bug with custom XML
qemu: Change return type of qemuDomainUpdateCPU to void
qemu: Change return type of qemuDomainFixupCPUs to void
NEWS.rst | 8 +++++++
src/qemu/qemu_domain.c | 51 ++++++++++++++++++++---------------------
src/qemu/qemu_domain.h | 4 ++--
src/qemu/qemu_process.c | 29 ++++++++---------------
4 files changed, 45 insertions(+), 47 deletions(-)
--
2.44.0
1 month
[PATCH 0/2] qemu: Fix migration with custom XML
by Jiri Denemark
Jiri Denemark (2):
qemu: Fix migration with custom XML
NEWS: Mention migration bug with custom XML
NEWS.rst | 8 ++++++++
src/qemu/qemu_domain.c | 38 +++++++++++++++++++++-----------------
src/qemu/qemu_process.c | 14 ++------------
3 files changed, 31 insertions(+), 29 deletions(-)
--
2.44.0
1 month
[PATCH] network: ensure nparams is non-negative
by Daniel P. Berrangé
The typed parameter array must be either 0, or a positive
number.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/libvirt-network.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libvirt-network.c b/src/libvirt-network.c
index ef17a8a04d..e467716b6a 100644
--- a/src/libvirt-network.c
+++ b/src/libvirt-network.c
@@ -1577,6 +1577,8 @@ virNetworkPortGetParameters(virNetworkPortPtr port,
virCheckNetworkPortReturn(port, -1);
conn = port->net->conn;
+ virCheckNonNegativeArgGoto(*nparams, error);
+
if (conn->networkDriver && conn->networkDriver->networkPortGetParameters) {
int ret;
ret = conn->networkDriver->networkPortGetParameters(port, params, nparams, flags);
--
2.43.0
1 month
[PATCH] qemu: Deliver shutoff reason with qemu hooks
by Sun Feng
For abnormal shutoff reasons, we can start guest again with qemu hooks.
Signed-off-by: Sun Feng <loyou85(a)gmail.com>
---
docs/hooks.rst | 3 ++-
src/qemu/qemu_process.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/hooks.rst b/docs/hooks.rst
index 1dbc492bd4..45856e4ca4 100644
--- a/docs/hooks.rst
+++ b/docs/hooks.rst
@@ -204,7 +204,8 @@ operation. There is no specific operation to indicate a "restart" is occurring.
- When a QEMU guest is stopped, the qemu hook script is called in two
locations, to match the startup. First, :since:`since 0.8.0`, the hook is
- called before libvirt restores any labels:
+ called before libvirt restores any labels, :since:`since 9.10.0`, shutoff
+ reason is delivered with **extra argument**:
::
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e4bcb628cf..c42f5c9139 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8564,7 +8564,8 @@ void qemuProcessStop(virQEMUDriver *driver,
/* we can't stop the operation even if the script raised an error */
ignore_value(virHookCall(VIR_HOOK_DRIVER_QEMU, vm->def->name,
VIR_HOOK_QEMU_OP_STOPPED, VIR_HOOK_SUBOP_END,
- NULL, xml, NULL));
+ virDomainShutoffReasonTypeToString(reason),
+ xml, NULL));
}
/* Reset Security Labels unless caller don't want us to */
--
2.34.1
1 month
[PATCH v4 16/22] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine
by Philippe Mathieu-Daudé
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(a)linaro.org>
Reviewed-by: Thomas Huth <thuth(a)redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu(a)intel.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 a2a1b9d337..75bf0f4886 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -219,7 +219,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 01c55103d3..4664974a8b 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -816,7 +816,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 231aae92ed..df97df6ca7 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -274,9 +274,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 633724f177..18bef7c85e 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -281,29 +281,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 dcf50684a4..30bcd86ee6 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)
{
@@ -828,22 +823,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
1 month
[PATCH v4 08/22] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine
by Philippe Mathieu-Daudé
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(a)linaro.org>
Reviewed-by: Thomas Huth <thuth(a)redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu(a)intel.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 b09ae3d55d..a2a1b9d337 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -219,7 +219,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 51119e623f..01c55103d3 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -816,7 +816,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 4ad724601a..b528f17904 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -281,9 +281,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 172814f604..cd6335d6b4 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -304,13 +304,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 9e1bca7b17..dcf50684a4 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)
{
@@ -851,22 +844,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
1 month
[PATCH v4 02/22] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine
by Philippe Mathieu-Daudé
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(a)linaro.org>
Reviewed-by: Thomas Huth <thuth(a)redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu(a)intel.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 47234da329..b09ae3d55d 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -219,7 +219,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 f9cf874f7b..51119e623f 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -816,7 +816,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 27a68071d7..67856f54c3 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -285,9 +285,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 5c21b0c4db..172814f604 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -311,21 +311,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 817d99c0ce..9e1bca7b17 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)
{
@@ -872,38 +867,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
1 month