[PATCH v3 0/6] qemu: Introduce the ability to disable the built-in PS/2 controller

A while back QEMU introduced a new machine property for disabling the i8042 PS/2 controller (commit 4ccd5fe22feb95137d325f422016a6473541fe9f) which up until then was a built-in device included by all PC machine type descendants unconditionally. This new option allowed users to disable emulation of this controller, thus removing the default PS/2 peripherals. The rationale for why somebody might want to disable PS/2 peripherals is explained in the aforementioned commit. This series of patches exposes this machine property via the 'ps2' feature, while also taking care of side-effects, such as inhibiting the implicit creation of PS/2 inputs in the domain XML. Changelog: v2 -> v3: - Add missing example usage of the new feature v1 -> v2: - Use abstract 'generic-pc' machine type instead of concrete 'pc' for property detection - Introduce test cases along with monitor replies and capability flags - Add NEWS mention of the new feature Kamil Szczęk (6): qemu: Improve PS/2 controller detection qemu_capabilities: Introduce QEMU_CAPS_MACHINE_I8042_OPT qemucapabilitiesdata: Add data for QEMU_CAPS_MACHINE_I8042_OPT qemu: Introduce the 'ps2' feature qemuxmlconftest: Add test cases for the new 'ps2' feature NEWS: Mention the new 'ps2' feature NEWS.rst | 6 + docs/formatdomain.rst | 6 + src/conf/domain_conf.c | 6 +- src/conf/domain_conf.h | 1 + src/conf/domain_validate.c | 23 ++ src/conf/schemas/domaincommon.rng | 5 + src/qemu/qemu_capabilities.c | 35 +++ src/qemu/qemu_capabilities.h | 9 +- src/qemu/qemu_command.c | 5 + src/qemu/qemu_domain.c | 29 ++- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_validate.c | 27 +- .../caps_5.2.0_x86_64.replies | 169 ++++++++++-- .../caps_6.0.0_x86_64.replies | 189 ++++++++++++-- .../caps_6.1.0_x86_64.replies | 203 +++++++++++++-- .../caps_6.2.0_x86_64.replies | 212 ++++++++++++++-- .../caps_7.0.0_x86_64.replies | 225 ++++++++++++++-- .../caps_7.0.0_x86_64.xml | 1 + .../caps_7.1.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_7.1.0_x86_64.xml | 1 + .../caps_7.2.0_x86_64+hvf.replies | 240 ++++++++++++++++-- .../caps_7.2.0_x86_64+hvf.xml | 1 + .../caps_7.2.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_7.2.0_x86_64.xml | 1 + .../caps_8.0.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_8.0.0_x86_64.xml | 1 + .../caps_8.1.0_x86_64.replies | 236 +++++++++++++++-- .../caps_8.1.0_x86_64.xml | 1 + .../caps_8.2.0_x86_64.replies | 236 +++++++++++++++-- .../caps_8.2.0_x86_64.xml | 1 + .../caps_9.0.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_9.0.0_x86_64.xml | 1 + .../caps_9.1.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_9.1.0_x86_64.xml | 1 + ...-off-explicit-ps2-inputs.x86_64-latest.err | 1 + .../machine-i8042-off-explicit-ps2-inputs.xml | 19 ++ ...hine-i8042-off-vmport-on.x86_64-latest.err | 1 + .../machine-i8042-off-vmport-on.xml | 18 ++ .../machine-i8042-off.x86_64-6.2.0.err | 1 + .../machine-i8042-off.x86_64-latest.args | 33 +++ .../machine-i8042-off.x86_64-latest.xml | 32 +++ tests/qemuxmlconfdata/machine-i8042-off.xml | 17 ++ .../machine-i8042-on.x86_64-6.2.0.err | 1 + .../machine-i8042-on.x86_64-latest.args | 33 +++ .../machine-i8042-on.x86_64-latest.xml | 34 +++ tests/qemuxmlconfdata/machine-i8042-on.xml | 17 ++ tests/qemuxmlconftest.c | 6 + 47 files changed, 3024 insertions(+), 261 deletions(-) create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-vmport-on.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-6.2.0.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.xml -- 2.45.0

Up until now, we've assumed that all x86 machines have a PS/2 controller built-in. This assumption was correct until QEMU v4.2 introduced a new x86-based machine type - microvm. Due to this assumption, a pair of unnecessary PS/2 inputs are implicitly added to all microvm domains. This patch fixes that by whitelisting machine types which are known to include the i8042 PS/2 controller. Signed-off-by: Kamil Szczęk <kamil@szczek.dev> --- src/qemu/qemu_capabilities.c | 13 +++++++++++++ src/qemu/qemu_capabilities.h | 5 ++++- src/qemu/qemu_domain.c | 28 +++++++++++++++++++++++++--- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_validate.c | 4 ++-- 5 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2f66a49711..dd833fb3ff 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6008,6 +6008,19 @@ virQEMUCapsSupportsVmport(virQEMUCaps *qemuCaps, STREQ(def->os.machine, "isapc"); } +bool +virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps, + const virDomainDef *def) +{ + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_I8042)) + return false; + + return qemuDomainIsI440FX(def) || + qemuDomainIsQ35(def) || + qemuDomainIsXenFV(def) || + STREQ(def->os.machine, "isapc"); +} + /* * The preferred machine to use if none is listed explicitly diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index edeb870e01..659efd9182 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -535,7 +535,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_SMP_DIES, /* -smp dies= */ /* 350 */ - QEMU_CAPS_DEVICE_I8042, /* PS/2 controller */ + QEMU_CAPS_DEVICE_I8042, /* PS/2 controller, use virQEMUCapsSupportsI8042() to query this capability */ QEMU_CAPS_OBJECT_RNG_BUILTIN, /* -object rng-builtin */ X_QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */ QEMU_CAPS_DEVICE_TPM_SPAPR, /* -device tpm-spapr */ @@ -718,6 +718,9 @@ void virQEMUCapsInitProcessCapsInterlock(virQEMUCaps *qemuCaps); bool virQEMUCapsSupportsVmport(virQEMUCaps *qemuCaps, const virDomainDef *def); +bool virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps, + const virDomainDef *def); + const char *virQEMUCapsGetBinary(virQEMUCaps *qemuCaps); virArch virQEMUCapsGetArch(virQEMUCaps *qemuCaps); unsigned int virQEMUCapsGetVersion(virQEMUCaps *qemuCaps); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f87ba6ba51..2b4bb54efc 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3925,9 +3925,10 @@ virXMLNamespace virQEMUDriverDomainXMLNamespace = { static int -qemuDomainDefAddImplicitInputDevice(virDomainDef *def) +qemuDomainDefAddImplicitInputDevice(virDomainDef *def, + virQEMUCaps *qemuCaps) { - if (ARCH_IS_X86(def->os.arch)) { + if (virQEMUCapsSupportsI8042(qemuCaps, def)) { if (virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_MOUSE, VIR_DOMAIN_INPUT_BUS_PS2) < 0) @@ -4166,7 +4167,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, bool addITCOWatchdog = false; /* add implicit input devices */ - if (qemuDomainDefAddImplicitInputDevice(def) < 0) + if (qemuDomainDefAddImplicitInputDevice(def, qemuCaps) < 0) return -1; /* Add implicit PCI root controller if the machine has one */ @@ -9177,6 +9178,21 @@ qemuDomainMachineIsMipsMalta(const char *machine, return false; } +static bool +qemuDomainMachineIsXenFV(const char *machine, + const virArch arch) +{ + if (!ARCH_IS_X86(arch)) + return false; + + if (STREQ(machine, "xenfv") || + STRPREFIX(machine, "xenfv-")) { + return true; + } + + return false; +} + /* You should normally avoid this function and use * qemuDomainHasBuiltinIDE() instead. */ @@ -9263,6 +9279,12 @@ qemuDomainIsLoongArchVirt(const virDomainDef *def) return qemuDomainMachineIsLoongArchVirt(def->os.machine, def->os.arch); } +bool +qemuDomainIsXenFV(const virDomainDef *def) +{ + return qemuDomainMachineIsXenFV(def->os.machine, def->os.arch); +} + bool qemuDomainHasPCIRoot(const virDomainDef *def) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index af0bb04c45..1179b0d6dc 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -838,6 +838,7 @@ bool qemuDomainIsLoongArchVirt(const virDomainDef *def); bool qemuDomainIsRISCVVirt(const virDomainDef *def); bool qemuDomainIsPSeries(const virDomainDef *def); bool qemuDomainIsMipsMalta(const virDomainDef *def); +bool qemuDomainIsXenFV(const virDomainDef *def); bool qemuDomainHasPCIRoot(const virDomainDef *def); bool qemuDomainHasPCIeRoot(const virDomainDef *def); bool qemuDomainHasBuiltinIDE(const virDomainDef *def); diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index b885fe7c77..6f7aeababe 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4868,8 +4868,8 @@ qemuValidateDomainDeviceDefInput(const virDomainInputDef *input, int cap; int ccwCap; - if (input->bus == VIR_DOMAIN_INPUT_BUS_PS2 && !ARCH_IS_X86(def->os.arch) && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_I8042)) { + if (input->bus == VIR_DOMAIN_INPUT_BUS_PS2 && + !virQEMUCapsSupportsI8042(qemuCaps, def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("%1$s is not supported by this QEMU binary"), virDomainInputBusTypeToString(input->bus)); -- 2.45.0

This capability tells us whether given QEMU binary supports the '-machine xxx,i8042=on/off' toggle used to enable/disable PS/2 controller emulation. A few facts: - This option was introduced in QEMU 7.0 and defaults to 'on' - QEMU versions before 7.0 enabled i8042 controller emulation implicitly - This option (and i8042 controller emulation itself) is only supported by descendants of the generic PC machine type (e.g. i440fx, q35, etc.) Signed-off-by: Kamil Szczęk <kamil@szczek.dev> --- src/qemu/qemu_capabilities.c | 22 ++++++++++++++++++++++ src/qemu/qemu_capabilities.h | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index dd833fb3ff..2d53e87ff3 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -714,6 +714,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "netdev.user", /* QEMU_CAPS_NETDEV_USER */ "acpi-erst", /* QEMU_CAPS_DEVICE_ACPI_ERST */ "intel-iommu.dma-translation", /* QEMU_CAPS_INTEL_IOMMU_DMA_TRANSLATION */ + "machine-i8042-opt", /* QEMU_CAPS_MACHINE_I8042_OPT */ ); @@ -1747,6 +1748,10 @@ static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsGeneric[] = { { "confidential-guest-support", QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT }, }; +static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsGenericPC[] = { + { "i8042", QEMU_CAPS_MACHINE_I8042_OPT }, +}; + static virQEMUCapsObjectTypeProps virQEMUCapsMachineProps[] = { { "pseries", virQEMUCapsMachinePropsPSeries, G_N_ELEMENTS(virQEMUCapsMachinePropsPSeries), @@ -1757,6 +1762,9 @@ static virQEMUCapsObjectTypeProps virQEMUCapsMachineProps[] = { { "none", virQEMUCapsMachinePropsGeneric, G_N_ELEMENTS(virQEMUCapsMachinePropsGeneric), -1 }, + { "generic-pc", virQEMUCapsMachinePropsGenericPC, + G_N_ELEMENTS(virQEMUCapsMachinePropsGenericPC), + -1 }, }; static void @@ -2893,6 +2901,7 @@ virQEMUCapsProbeQMPMachineProps(virQEMUCaps *qemuCaps, g_auto(GStrv) values = NULL; if (STRNEQ(canon, "none") && + (!ARCH_IS_X86(qemuCaps->arch) || STRNEQ(canon, "generic-pc")) && !virQEMUCapsIsMachineSupported(qemuCaps, virtType, canon)) { continue; } @@ -6021,6 +6030,19 @@ virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps, STREQ(def->os.machine, "isapc"); } +bool +virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps, + const virDomainDef *def) +{ + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_I8042_OPT)) + return false; + + return qemuDomainIsI440FX(def) || + qemuDomainIsQ35(def) || + qemuDomainIsXenFV(def) || + STREQ(def->os.machine, "isapc"); +} + /* * The preferred machine to use if none is listed explicitly diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 659efd9182..9c577c1505 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -693,6 +693,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_NETDEV_USER, /* -netdev user */ QEMU_CAPS_DEVICE_ACPI_ERST, /* -device acpi-erst */ QEMU_CAPS_INTEL_IOMMU_DMA_TRANSLATION, /* intel-iommu.dma-translation */ + QEMU_CAPS_MACHINE_I8042_OPT, /* -machine xxx,i8042=on/off; use virQEMUCapsSupportsI8042Toggle() to query this capability */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; @@ -721,6 +722,9 @@ bool virQEMUCapsSupportsVmport(virQEMUCaps *qemuCaps, bool virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps, const virDomainDef *def); +bool virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps, + const virDomainDef *def); + const char *virQEMUCapsGetBinary(virQEMUCaps *qemuCaps); virArch virQEMUCapsGetArch(virQEMUCaps *qemuCaps); unsigned int virQEMUCapsGetVersion(virQEMUCaps *qemuCaps); -- 2.45.0

The new QEMU_CAPS_MACHINE_I8042_OPT capability introduced a necessity to perform a QEMU monitor query for properties of the generic PC machine type. Below is an overview of how these properties changed over time in QEMU versions currently supported by libvirt: 5.2 -> 6.0 + x-oem-table-id + x-oem-id + max-fw-size + confidential-guest-support 6.0 -> 6.1 + smp + bus-lock-ratelimit + default_bus_bypass_iommu 6.1 -> 6.2 + sgx-epc + default-bus-bypass-iommu - default_bus_bypass_iommu 6.2 -> 7.0 + smbios-entry-point-type + i8042 7.0 -> 7.1 + pic + boot + memory 7.1 -> 8.0 no changes 8.0 -> 8.1 - device-memory-region-size 8.1 -> 8.2 no changes 8.2 -> 9.0 + fd-bootchk 9.0 -> 9.1 no changes Signed-off-by: Kamil Szczęk <kamil@szczek.dev> --- .../caps_5.2.0_x86_64.replies | 169 ++++++++++-- .../caps_6.0.0_x86_64.replies | 189 ++++++++++++-- .../caps_6.1.0_x86_64.replies | 203 +++++++++++++-- .../caps_6.2.0_x86_64.replies | 212 ++++++++++++++-- .../caps_7.0.0_x86_64.replies | 225 ++++++++++++++-- .../caps_7.0.0_x86_64.xml | 1 + .../caps_7.1.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_7.1.0_x86_64.xml | 1 + .../caps_7.2.0_x86_64+hvf.replies | 240 ++++++++++++++++-- .../caps_7.2.0_x86_64+hvf.xml | 1 + .../caps_7.2.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_7.2.0_x86_64.xml | 1 + .../caps_8.0.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_8.0.0_x86_64.xml | 1 + .../caps_8.1.0_x86_64.replies | 236 +++++++++++++++-- .../caps_8.1.0_x86_64.xml | 1 + .../caps_8.2.0_x86_64.replies | 236 +++++++++++++++-- .../caps_8.2.0_x86_64.xml | 1 + .../caps_9.0.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_9.0.0_x86_64.xml | 1 + .../caps_9.1.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_9.1.0_x86_64.xml | 1 + 22 files changed, 2665 insertions(+), 254 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.replies index 58ac2c0eaa..3f5405d83e 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.replies @@ -22907,10 +22907,143 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "smbus", + "type": "bool" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "pit", + "type": "bool" + }, + { + "name": "sata", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "hpet", + "type": "bool" + } + ], "id": "libvirt-41" } +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -24689,12 +24822,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -24702,12 +24835,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -24715,12 +24848,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -26004,12 +26137,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -26087,16 +26220,16 @@ "capability": "validate-uuid" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV is not enabled in KVM" @@ -26111,7 +26244,7 @@ "name": "host" } }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -26420,7 +26553,7 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -26434,7 +26567,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -26743,7 +26876,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -26758,7 +26891,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -27067,7 +27200,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { diff --git a/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.replies index 88948d306a..5380b322d2 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.replies @@ -24735,10 +24735,163 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "pit", + "type": "bool" + }, + { + "name": "hpet", + "type": "bool" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "type": "bool" + } + ], "id": "libvirt-41" } +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -26560,12 +26713,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -26573,12 +26726,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -26586,12 +26739,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -27899,12 +28052,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -27986,12 +28139,12 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -28001,7 +28154,7 @@ "cert-chain": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA", "pdh": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA" }, - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -28012,7 +28165,7 @@ "name": "host" } }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -28333,7 +28486,7 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -28347,7 +28500,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -28668,7 +28821,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -28683,7 +28836,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -29004,7 +29157,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { diff --git a/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.replies index 5872007954..6fb37d63d5 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.replies @@ -25009,10 +25009,177 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "pit", + "type": "bool" + }, + { + "name": "hpet", + "type": "bool" + }, + { + "name": "default_bus_bypass_iommu", + "type": "bool" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "type": "bool" + } + ], "id": "libvirt-41" } +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -27022,12 +27189,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -27035,12 +27202,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -27048,12 +27215,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -28373,12 +28540,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -28460,16 +28627,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "Failed to open /dev/sev: No such file or directory" @@ -28484,7 +28651,7 @@ "name": "host" } }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -28807,7 +28974,7 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -28821,7 +28988,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -29144,7 +29311,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -29159,7 +29326,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -29482,7 +29649,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { diff --git a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies index bd7e1f00a4..b2b6bcdf0d 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies @@ -28257,10 +28257,182 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "pit", + "type": "bool" + }, + { + "name": "hpet", + "type": "bool" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -30282,12 +30454,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -30295,12 +30467,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -30308,12 +30480,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -31633,12 +31805,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -31720,16 +31892,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -31738,11 +31910,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -31757,7 +31929,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -32090,7 +32262,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -32104,7 +32276,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32437,7 +32609,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32452,7 +32624,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -32785,7 +32957,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies index 9c639b3c31..1ad960c99b 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies @@ -28827,10 +28827,195 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "pit", + "description": "Enable/disable Intel 8254 programmable interval timer emulation", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], "id": "libvirt-41" } +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -30888,12 +31073,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -30901,12 +31086,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -30914,12 +31099,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -32243,12 +32428,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -32330,16 +32515,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -32348,7 +32533,7 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -32369,7 +32554,7 @@ } ] }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -32380,7 +32565,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -32717,7 +32902,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -32731,7 +32916,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -33068,7 +33253,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -33083,7 +33268,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33420,7 +33605,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml index fea02f7728..23b626aa16 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml @@ -188,6 +188,7 @@ <flag name='usb-mtp'/> <flag name='netdev.user'/> <flag name='acpi-erst'/> + <flag name='machine-i8042-opt'/> <version>7000000</version> <microcodeVersion>43100243</microcodeVersion> <package>v7.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies index 302a34fd49..cd2116d05a 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies @@ -29615,10 +29615,210 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "link<memory-backend>" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -31555,12 +31755,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -31568,12 +31768,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -31581,12 +31781,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -32910,12 +33110,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -33005,16 +33205,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -33023,11 +33223,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -33042,7 +33242,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -33380,7 +33580,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -33394,7 +33594,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -33732,7 +33932,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -33747,7 +33947,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -34085,7 +34285,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml index 9737e3d083..81c4cc474b 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml @@ -193,6 +193,7 @@ <flag name='netdev.user'/> <flag name='acpi-erst'/> <flag name='intel-iommu.dma-translation'/> + <flag name='machine-i8042-opt'/> <version>7001000</version> <microcodeVersion>43100244</microcodeVersion> <package>v7.1.0</package> diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies index 0cfbbb7aa0..c85be45cd1 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies @@ -30612,10 +30612,210 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "link<memory-backend>" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -32552,12 +32752,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -32565,12 +32765,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -32578,12 +32778,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -33907,12 +34107,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -34002,16 +34202,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -34020,11 +34220,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -34039,7 +34239,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -34377,7 +34577,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -34391,7 +34591,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -34729,7 +34929,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -34744,7 +34944,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -35082,7 +35282,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml index 55dcbf203e..18d74d6e8c 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml @@ -197,6 +197,7 @@ <flag name='netdev.user'/> <flag name='acpi-erst'/> <flag name='intel-iommu.dma-translation'/> + <flag name='machine-i8042-opt'/> <version>7002000</version> <microcodeVersion>43100245</microcodeVersion> <package>v7.2.0</package> diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies index 0f4ba1722f..4b56adeafa 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies @@ -30612,10 +30612,210 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "link<memory-backend>" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -32552,12 +32752,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -32565,12 +32765,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -32578,12 +32778,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -33907,12 +34107,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -34002,16 +34202,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -34020,11 +34220,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -34039,7 +34239,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -34377,7 +34577,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -34391,7 +34591,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -34729,7 +34929,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -34744,7 +34944,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -35082,7 +35282,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml index 1253c860ee..fb52a30f04 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml @@ -197,6 +197,7 @@ <flag name='netdev.user'/> <flag name='acpi-erst'/> <flag name='intel-iommu.dma-translation'/> + <flag name='machine-i8042-opt'/> <version>7002000</version> <microcodeVersion>43100245</microcodeVersion> <package>v7.2.0</package> diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies index fc5aab3828..4cad376388 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies @@ -32086,10 +32086,210 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "link<memory-backend>" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -34133,12 +34333,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -34146,12 +34346,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -34159,12 +34359,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -35605,12 +35805,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -35700,16 +35900,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -35718,11 +35918,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -35737,7 +35937,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -36080,7 +36280,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -36094,7 +36294,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -36437,7 +36637,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -36452,7 +36652,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -36901,7 +37101,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml index d3901fef05..91a4ca7f4a 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml @@ -201,6 +201,7 @@ <flag name='netdev.user'/> <flag name='acpi-erst'/> <flag name='intel-iommu.dma-translation'/> + <flag name='machine-i8042-opt'/> <version>8000000</version> <microcodeVersion>43100244</microcodeVersion> <package>v8.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies index 3972c34b48..888a5d3b6a 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies @@ -32946,10 +32946,206 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "link<memory-backend>" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], "id": "libvirt-41" } +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -35329,12 +35525,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -35342,12 +35538,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -35355,12 +35551,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -36818,12 +37014,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -36921,16 +37117,16 @@ "capability": "dirty-limit" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -36939,11 +37135,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -36958,7 +37154,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -37321,7 +37517,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -37335,7 +37531,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -37698,7 +37894,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -37713,7 +37909,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -38182,7 +38378,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml index f8a9993ede..a792c0e365 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml @@ -203,6 +203,7 @@ <flag name='netdev.user'/> <flag name='acpi-erst'/> <flag name='intel-iommu.dma-translation'/> + <flag name='machine-i8042-opt'/> <version>8001000</version> <microcodeVersion>43100245</microcodeVersion> <package>v8.1.0</package> diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies index cc2190dfd3..33e4978c38 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies @@ -33638,10 +33638,206 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "link<memory-backend>" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], "id": "libvirt-41" } +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -36021,12 +36217,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -36034,12 +36230,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -36047,12 +36243,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -37523,12 +37719,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -37626,16 +37822,16 @@ "capability": "dirty-limit" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -37644,11 +37840,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -37663,7 +37859,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -38030,7 +38226,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -38044,7 +38240,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38411,7 +38607,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38426,7 +38622,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -38899,7 +39095,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml index 43d7105c2d..c049500cbc 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml @@ -206,6 +206,7 @@ <flag name='netdev.user'/> <flag name='acpi-erst'/> <flag name='intel-iommu.dma-translation'/> + <flag name='machine-i8042-opt'/> <version>8002000</version> <microcodeVersion>43100246</microcodeVersion> <package>v8.2.0</package> diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies index 5d36853ce3..89fefb863b 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies @@ -33880,10 +33880,210 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "link<memory-backend>" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "fd-bootchk", + "type": "bool" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -36263,12 +36463,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -36276,12 +36476,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -36289,12 +36489,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -37769,12 +37969,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -37876,16 +38076,16 @@ "capability": "mapped-ram" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -37894,11 +38094,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -37913,7 +38113,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -38281,7 +38481,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -38295,7 +38495,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38663,7 +38863,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38678,7 +38878,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39152,7 +39352,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml index e96af86a92..ea0ff8d444 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml @@ -208,6 +208,7 @@ <flag name='netdev.user'/> <flag name='acpi-erst'/> <flag name='intel-iommu.dma-translation'/> + <flag name='machine-i8042-opt'/> <version>9000000</version> <microcodeVersion>43100245</microcodeVersion> <package>v9.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies index 73fb8f195b..771ec5b0cd 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies @@ -34379,10 +34379,210 @@ } { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link<confidential-guest-support>" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based backend", + "type": "link<memory-backend>" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI table header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "fd-bootchk", + "type": "bool" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -36931,12 +37131,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -36944,12 +37144,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -36957,12 +37157,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -38445,12 +38645,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -38544,16 +38744,16 @@ "capability": "mapped-ram" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -38562,11 +38762,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "Could not open '/dev/sgx_vepc': No such file or directory" @@ -38581,7 +38781,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -38959,7 +39159,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -38973,7 +39173,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -39351,7 +39551,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -39366,7 +39566,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39854,7 +40054,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml index c3cb6efc61..612a68e468 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml @@ -206,6 +206,7 @@ <flag name='netdev.user'/> <flag name='acpi-erst'/> <flag name='intel-iommu.dma-translation'/> + <flag name='machine-i8042-opt'/> <version>9000090</version> <microcodeVersion>43100246</microcodeVersion> <package>v9.1.0-rc0-121-g75c7f57403</package> -- 2.45.0

This introduces a new 'ps2' feature which, when disabled, results in no implicit PS/2 bus input devices being automatically added to the domain and addition of the 'i8042=off' machine option to the QEMU command-line. A notable side effect of disabling the i8042 controller in QEMU is that the vmport device won't be created. For this reason we will not allow setting the vmport feature if the ps2 feature is explicitly disabled. Signed-off-by: Kamil Szczęk <kamil@szczek.dev> --- docs/formatdomain.rst | 6 ++++++ src/conf/domain_conf.c | 6 +++++- src/conf/domain_conf.h | 1 + src/conf/domain_validate.c | 23 +++++++++++++++++++++++ src/conf/schemas/domaincommon.rng | 5 +++++ src/qemu/qemu_command.c | 5 +++++ src/qemu/qemu_domain.c | 3 ++- src/qemu/qemu_validate.c | 23 +++++++++++++++++++++++ 8 files changed, 70 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index e1e219bcb5..741405ec12 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -2022,6 +2022,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off. </tcg> <async-teardown enabled='yes'/> <ras state='on'/> + <ps2 state='on'/> </features> ... @@ -2262,6 +2263,11 @@ are: exceptions when enabled (``on``). If the attribute is not defined, the hypervisor default will be used. :since:`Since 10.4.0` (QEMU/KVM and ARM virt guests only) +``ps2`` + Depending on the ``state`` attribute (values ``on``, ``off``) enable or + disable the emulation of a PS/2 controller used by ``ps2`` bus input devices. + If the attribute is not defined, the hypervisor default will be used. + :since:`Since 10.7.0` (QEMU only) Time keeping ------------ diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d950921667..a897b0b727 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -185,6 +185,7 @@ VIR_ENUM_IMPL(virDomainFeature, "tcg", "async-teardown", "ras", + "ps2", ); VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, @@ -17019,7 +17020,8 @@ virDomainFeaturesDefParse(virDomainDef *def, case VIR_DOMAIN_FEATURE_HTM: case VIR_DOMAIN_FEATURE_NESTED_HV: case VIR_DOMAIN_FEATURE_CCF_ASSIST: - case VIR_DOMAIN_FEATURE_RAS: { + case VIR_DOMAIN_FEATURE_RAS: + case VIR_DOMAIN_FEATURE_PS2: { virTristateSwitch state; if (virXMLPropTristateSwitch(nodes[i], "state", @@ -20883,6 +20885,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef *src, case VIR_DOMAIN_FEATURE_NESTED_HV: case VIR_DOMAIN_FEATURE_CCF_ASSIST: case VIR_DOMAIN_FEATURE_RAS: + case VIR_DOMAIN_FEATURE_PS2: if (src->features[i] != dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("State of feature '%1$s' differs: source: '%2$s', destination: '%3$s'"), @@ -27685,6 +27688,7 @@ virDomainDefFormatFeatures(virBuffer *buf, case VIR_DOMAIN_FEATURE_NESTED_HV: case VIR_DOMAIN_FEATURE_CCF_ASSIST: case VIR_DOMAIN_FEATURE_RAS: + case VIR_DOMAIN_FEATURE_PS2: switch ((virTristateSwitch) def->features[i]) { case VIR_TRISTATE_SWITCH_LAST: case VIR_TRISTATE_SWITCH_ABSENT: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index eae621f900..f65cdd87b6 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2181,6 +2181,7 @@ typedef enum { VIR_DOMAIN_FEATURE_TCG, VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN, VIR_DOMAIN_FEATURE_RAS, + VIR_DOMAIN_FEATURE_PS2, VIR_DOMAIN_FEATURE_LAST } virDomainFeature; diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 39b8d67928..56f1092841 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -2744,6 +2744,29 @@ virDomainInputDefValidate(const virDomainInputDef *input, return -1; } + switch ((virDomainInputBus) input->bus) { + case VIR_DOMAIN_INPUT_BUS_PS2: + if (def->features[VIR_DOMAIN_FEATURE_PS2] == VIR_TRISTATE_SWITCH_OFF) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ps2 bus inputs require the ps2 feature not to be disabled")); + return -1; + } + break; + + case VIR_DOMAIN_INPUT_BUS_DEFAULT: + case VIR_DOMAIN_INPUT_BUS_USB: + case VIR_DOMAIN_INPUT_BUS_XEN: + case VIR_DOMAIN_INPUT_BUS_PARALLELS: + case VIR_DOMAIN_INPUT_BUS_VIRTIO: + case VIR_DOMAIN_INPUT_BUS_NONE: + break; + + case VIR_DOMAIN_INPUT_BUS_LAST: + default: + virReportEnumRangeError(virDomainInputBus, input->bus); + return -1; + } + return 0; } diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 05ba697924..a71f1d97b9 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -6917,6 +6917,11 @@ <ref name="featurestate"/> </element> </optional> + <optional> + <element name="ps2"> + <ref name="featurestate"/> + </element> + </optional> </interleave> </element> </optional> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 28914c9c34..bb6fee4bfd 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6888,6 +6888,11 @@ qemuAppendDomainFeaturesMachineParam(virBuffer *buf, virBufferAsprintf(buf, ",ras=%s", str); } + if (def->features[VIR_DOMAIN_FEATURE_PS2] != VIR_TRISTATE_SWITCH_ABSENT) { + const char *str = virTristateSwitchTypeToString(def->features[VIR_DOMAIN_FEATURE_PS2]); + virBufferAsprintf(buf, ",i8042=%s", str); + } + return 0; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2b4bb54efc..d1767c326d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3928,7 +3928,8 @@ static int qemuDomainDefAddImplicitInputDevice(virDomainDef *def, virQEMUCaps *qemuCaps) { - if (virQEMUCapsSupportsI8042(qemuCaps, def)) { + if (virQEMUCapsSupportsI8042(qemuCaps, def) && + def->features[VIR_DOMAIN_FEATURE_PS2] != VIR_TRISTATE_SWITCH_OFF) { if (virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_MOUSE, VIR_DOMAIN_INPUT_BUS_PS2) < 0) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 6f7aeababe..88774f5383 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -143,6 +143,13 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, _("vmport is not available with this QEMU binary")); return -1; } + + if (def->features[i] == VIR_TRISTATE_SWITCH_ON && + def->features[VIR_DOMAIN_FEATURE_PS2] == VIR_TRISTATE_SWITCH_OFF) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("vmport feature requires the ps2 feature not to be disabled")); + return -1; + } break; case VIR_DOMAIN_FEATURE_VMCOREINFO: @@ -242,6 +249,22 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, } break; + case VIR_DOMAIN_FEATURE_PS2: + if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT && + !virQEMUCapsSupportsI8042(qemuCaps, def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ps2 feature is not available with this QEMU binary")); + return -1; + } + + if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT && + !virQEMUCapsSupportsI8042Toggle(qemuCaps, def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ps2 feature state cannot be controlled with this QEMU binary")); + return -1; + } + break; + case VIR_DOMAIN_FEATURE_SMM: case VIR_DOMAIN_FEATURE_KVM: case VIR_DOMAIN_FEATURE_XEN: -- 2.45.0

Introduce tests to verify that the 'ps2' feature is correctly parsed when given either 'dirty' XML from a user or 'clean' canonical XML, as produced by libvirt. This also tests the transformation from libvirt's internal state to the aforementioned canonical form and to a QEMU command line. As a bonus, we also test some known bad configurations: - When user explicitly adds ps2 bus inputs, but also explicitly disables the 'ps2' feature. - When user explicitly enables the 'vmport' feature, but also explicitly disables the 'ps2' feature. This is not supported by QEMU and will result in vmport device not being created without emitting any warning or error. Signed-off-by: Kamil Szczęk <kamil@szczek.dev> --- ...-off-explicit-ps2-inputs.x86_64-latest.err | 1 + .../machine-i8042-off-explicit-ps2-inputs.xml | 19 +++++++++++ ...hine-i8042-off-vmport-on.x86_64-latest.err | 1 + .../machine-i8042-off-vmport-on.xml | 18 ++++++++++ .../machine-i8042-off.x86_64-6.2.0.err | 1 + .../machine-i8042-off.x86_64-latest.args | 33 ++++++++++++++++++ .../machine-i8042-off.x86_64-latest.xml | 32 +++++++++++++++++ tests/qemuxmlconfdata/machine-i8042-off.xml | 17 ++++++++++ .../machine-i8042-on.x86_64-6.2.0.err | 1 + .../machine-i8042-on.x86_64-latest.args | 33 ++++++++++++++++++ .../machine-i8042-on.x86_64-latest.xml | 34 +++++++++++++++++++ tests/qemuxmlconfdata/machine-i8042-on.xml | 17 ++++++++++ tests/qemuxmlconftest.c | 6 ++++ 13 files changed, 213 insertions(+) create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-vmport-on.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-6.2.0.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.xml diff --git a/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.x86_64-latest.err b/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.x86_64-latest.err new file mode 100644 index 0000000000..4fed60aa37 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.x86_64-latest.err @@ -0,0 +1 @@ +unsupported configuration: ps2 bus inputs require the ps2 feature not to be disabled diff --git a/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.xml b/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.xml new file mode 100644 index 0000000000..f90677670b --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.xml @@ -0,0 +1,19 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + </os> + <features> + <ps2 state='off'/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' model='none'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_64-latest.err b/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_64-latest.err new file mode 100644 index 0000000000..0c3b7280c0 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_64-latest.err @@ -0,0 +1 @@ +unsupported configuration: vmport feature requires the ps2 feature not to be disabled diff --git a/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.xml b/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.xml new file mode 100644 index 0000000000..957da054b8 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.xml @@ -0,0 +1,18 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + </os> + <features> + <vmport state='on'/> + <ps2 state='off'/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err b/tests/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err new file mode 100644 index 0000000000..3a12712915 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err @@ -0,0 +1 @@ +unsupported configuration: ps2 feature state cannot be controlled with this QEMU binary diff --git a/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.args b/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.args new file mode 100644 index 0000000000..e340d164fc --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.args @@ -0,0 +1,33 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine q35,usb=off,i8042=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.xml b/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.xml new file mode 100644 index 0000000000..b5c503e6df --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <ps2 state='off'/> + </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='sata' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconfdata/machine-i8042-off.xml b/tests/qemuxmlconfdata/machine-i8042-off.xml new file mode 100644 index 0000000000..ed03aeb2b8 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off.xml @@ -0,0 +1,17 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + </os> + <features> + <ps2 state='off'/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconfdata/machine-i8042-on.x86_64-6.2.0.err b/tests/qemuxmlconfdata/machine-i8042-on.x86_64-6.2.0.err new file mode 100644 index 0000000000..3a12712915 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-on.x86_64-6.2.0.err @@ -0,0 +1 @@ +unsupported configuration: ps2 feature state cannot be controlled with this QEMU binary diff --git a/tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.args b/tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.args new file mode 100644 index 0000000000..cda5002fec --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.args @@ -0,0 +1,33 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine q35,usb=off,i8042=on,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.xml b/tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.xml new file mode 100644 index 0000000000..5d08dd9fb8 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <ps2 state='on'/> + </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='sata' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconfdata/machine-i8042-on.xml b/tests/qemuxmlconfdata/machine-i8042-on.xml new file mode 100644 index 0000000000..669451e2e1 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-on.xml @@ -0,0 +1,17 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + </os> + <features> + <ps2 state='on'/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index 89292af300..961d3d688a 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -1304,6 +1304,12 @@ mymain(void) DO_TEST_CAPS_LATEST("machine-smm-on"); DO_TEST_CAPS_LATEST("machine-smm-off"); DO_TEST_CAPS_LATEST("machine-vmport-opt"); + DO_TEST_CAPS_LATEST("machine-i8042-on"); + DO_TEST_CAPS_VER_PARSE_ERROR("machine-i8042-on", "6.2.0"); + DO_TEST_CAPS_LATEST("machine-i8042-off"); + DO_TEST_CAPS_VER_PARSE_ERROR("machine-i8042-off", "6.2.0"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("machine-i8042-off-vmport-on"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("machine-i8042-off-explicit-ps2-inputs"); DO_TEST_CAPS_LATEST("default-kvm-host-arch"); DO_TEST_CAPS_LATEST("default-qemu-host-arch"); DO_TEST_CAPS_LATEST("x86-kvm-32-on-64"); -- 2.45.0

Signed-off-by: Kamil Szczęk <kamil@szczek.dev> --- NEWS.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index bbd30ab3b5..817c7ed040 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,12 @@ v10.7.0 (unreleased) * **New features** + * qemu: Introduce the ability to disable the built-in PS/2 controller + + It is now possible to control the state of the ``ps2`` feature in the + domain XML for descendants of the generic PC machine type (``i440fx``, + ``q35``, ``xenfv`` and ``isapc``). + * **Improvements** * ch: support restore with network devices -- 2.45.0

On 8/19/24 03:16, Kamil Szczęk wrote:
A while back QEMU introduced a new machine property for disabling the i8042 PS/2 controller (commit 4ccd5fe22feb95137d325f422016a6473541fe9f) which up until then was a built-in device included by all PC machine type descendants unconditionally. This new option allowed users to disable emulation of this controller, thus removing the default PS/2 peripherals. The rationale for why somebody might want to disable PS/2 peripherals is explained in the aforementioned commit. This series of patches exposes this machine property via the 'ps2' feature, while also taking care of side-effects, such as inhibiting the implicit creation of PS/2 inputs in the domain XML.
Changelog:
v2 -> v3: - Add missing example usage of the new feature
v1 -> v2: - Use abstract 'generic-pc' machine type instead of concrete 'pc' for property detection - Introduce test cases along with monitor replies and capability flags - Add NEWS mention of the new feature
Kamil Szczęk (6): qemu: Improve PS/2 controller detection qemu_capabilities: Introduce QEMU_CAPS_MACHINE_I8042_OPT qemucapabilitiesdata: Add data for QEMU_CAPS_MACHINE_I8042_OPT qemu: Introduce the 'ps2' feature qemuxmlconftest: Add test cases for the new 'ps2' feature NEWS: Mention the new 'ps2' feature
NEWS.rst | 6 + docs/formatdomain.rst | 6 + src/conf/domain_conf.c | 6 +- src/conf/domain_conf.h | 1 + src/conf/domain_validate.c | 23 ++ src/conf/schemas/domaincommon.rng | 5 + src/qemu/qemu_capabilities.c | 35 +++ src/qemu/qemu_capabilities.h | 9 +- src/qemu/qemu_command.c | 5 + src/qemu/qemu_domain.c | 29 ++- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_validate.c | 27 +- .../caps_5.2.0_x86_64.replies | 169 ++++++++++-- .../caps_6.0.0_x86_64.replies | 189 ++++++++++++-- .../caps_6.1.0_x86_64.replies | 203 +++++++++++++-- .../caps_6.2.0_x86_64.replies | 212 ++++++++++++++-- .../caps_7.0.0_x86_64.replies | 225 ++++++++++++++-- .../caps_7.0.0_x86_64.xml | 1 + .../caps_7.1.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_7.1.0_x86_64.xml | 1 + .../caps_7.2.0_x86_64+hvf.replies | 240 ++++++++++++++++-- .../caps_7.2.0_x86_64+hvf.xml | 1 + .../caps_7.2.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_7.2.0_x86_64.xml | 1 + .../caps_8.0.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_8.0.0_x86_64.xml | 1 + .../caps_8.1.0_x86_64.replies | 236 +++++++++++++++-- .../caps_8.1.0_x86_64.xml | 1 + .../caps_8.2.0_x86_64.replies | 236 +++++++++++++++-- .../caps_8.2.0_x86_64.xml | 1 + .../caps_9.0.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_9.0.0_x86_64.xml | 1 + .../caps_9.1.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_9.1.0_x86_64.xml | 1 + ...-off-explicit-ps2-inputs.x86_64-latest.err | 1 + .../machine-i8042-off-explicit-ps2-inputs.xml | 19 ++ ...hine-i8042-off-vmport-on.x86_64-latest.err | 1 + .../machine-i8042-off-vmport-on.xml | 18 ++ .../machine-i8042-off.x86_64-6.2.0.err | 1 + .../machine-i8042-off.x86_64-latest.args | 33 +++ .../machine-i8042-off.x86_64-latest.xml | 32 +++ tests/qemuxmlconfdata/machine-i8042-off.xml | 17 ++ .../machine-i8042-on.x86_64-6.2.0.err | 1 + .../machine-i8042-on.x86_64-latest.args | 33 +++ .../machine-i8042-on.x86_64-latest.xml | 34 +++ tests/qemuxmlconfdata/machine-i8042-on.xml | 17 ++ tests/qemuxmlconftest.c | 6 + 47 files changed, 3024 insertions(+), 261 deletions(-) create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-vmport-on.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-6.2.0.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.xml
We require that we're able to compile and tests pass after each commit (it's easier when we need to bisect something in the future). Therefore, I'm squashing 3/6 into 2/6. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> and merged. Congratulations in your first libvirt contribution! Michal

On Wednesday, August 21st, 2024 at 17:15, Michal Prívozník <mprivozn@redhat.com> wrote:
We require that we're able to compile and tests pass after each commit (it's easier when we need to bisect something in the future). Therefore, I'm squashing 3/6 into 2/6.
Makes sense, will keep that in mind.
and merged. Congratulations in your first libvirt contribution!
Awesome, thanks. Looking forward to contributing further!

On Wed, Aug 21, 2024 at 03:36:03PM GMT, Kamil Szczęk wrote:
On Wednesday, August 21st, 2024 at 17:15, Michal Prívozník <mprivozn@redhat.com> wrote:
We require that we're able to compile and tests pass after each commit (it's easier when we need to bisect something in the future). Therefore, I'm squashing 3/6 into 2/6.
Makes sense, will keep that in mind.
and merged. Congratulations in your first libvirt contribution!
Awesome, thanks. Looking forward to contributing further!
I think the availability of this new feature should be advertised in the domain capabilities XML. That way, management applications such as virt-manager will be able to detect its presence and decide to ditch PS/2 completely for headless VMs, where it's not necessary to have any input devices. For VMs with graphics, they could add a USB keyboard to go along with the USB tablet that is already added, instead of the current combo of PS/2 keyboard and mouse *plus* USB tablet, for a slightly cleaner overall configuration matching that of other architectures that are not beholden to the same legacy as x86. -- Andrea Bolognani / Red Hat / Virtualization

On Tue, Aug 27, 2024 at 05:14:21AM GMT, Andrea Bolognani wrote:
On Wed, Aug 21, 2024 at 03:36:03PM GMT, Kamil Szczęk wrote:
On Wednesday, August 21st, 2024 at 17:15, Michal Prívozník <mprivozn@redhat.com> wrote:
We require that we're able to compile and tests pass after each commit (it's easier when we need to bisect something in the future). Therefore, I'm squashing 3/6 into 2/6.
Makes sense, will keep that in mind.
and merged. Congratulations in your first libvirt contribution!
Awesome, thanks. Looking forward to contributing further!
I think the availability of this new feature should be advertised in the domain capabilities XML.
That way, management applications such as virt-manager will be able to detect its presence and decide to ditch PS/2 completely for headless VMs, where it's not necessary to have any input devices.
For VMs with graphics, they could add a USB keyboard to go along with the USB tablet that is already added, instead of the current combo of PS/2 keyboard and mouse *plus* USB tablet, for a slightly cleaner overall configuration matching that of other architectures that are not beholden to the same legacy as x86.
Patches here: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/MY7AP... Ignore the fact that hyperkitty-- is currently completely broken and only shows the cover letter :( -- Andrea Bolognani / Red Hat / Virtualization
participants (3)
-
Andrea Bolognani
-
Kamil Szczęk
-
Michal Prívozník