[libvirt] [PATCH v2 0/5] qemu: ACPI and UEFI fixes

Changes from [v1]: * use a dedicated function for setting basic arch-dependent capabilities instead of having two copies of the same code that will have to be kept in sync; * enforce requirements at guest validation time rather than at command line creation time; * shuffle patches around so that the order has more sense; * make test files slightly smaller and nicer. [v1] https://www.redhat.com/archives/libvir-list/2017-March/msg00429.html Andrea Bolognani (5): qemu: Split virQEMUCapsInitArchQMPBasic() tests: Initialize basic capabilities properly qemu: Advertise ACPI support for aarch64 guests qemu: Enforce ACPI, UEFI requirements tests: Test ACPI, UEFI requirements src/qemu/qemu_capabilities.c | 68 ++++++++++++++++------ src/qemu/qemu_capabilities.h | 2 + src/qemu/qemu_command.c | 20 ++----- src/qemu/qemu_domain.c | 20 +++++++ .../caps_2.6.0-gicv2.aarch64.xml | 1 + .../caps_2.6.0-gicv3.aarch64.xml | 1 + .../qemuxml2argv-aarch64-aavmf-virtio-mmio.args | 1 + .../qemuxml2argv-aarch64-aavmf-virtio-mmio.xml | 1 - ....args => qemuxml2argv-aarch64-acpi-nouefi.args} | 9 +-- .../qemuxml2argv-aarch64-acpi-nouefi.xml | 22 +++++++ .../qemuxml2argv-aarch64-acpi-uefi.args | 22 +++++++ .../qemuxml2argv-aarch64-acpi-uefi.xml | 21 +++++++ .../qemuxml2argv-aarch64-cpu-passthrough.args | 1 + .../qemuxml2argv-aarch64-cpu-passthrough.xml | 1 - ...rgs => qemuxml2argv-aarch64-noacpi-nouefi.args} | 13 +++-- .../qemuxml2argv-aarch64-noacpi-nouefi.xml | 19 ++++++ .../qemuxml2argv-aarch64-noacpi-uefi.args | 23 ++++++++ .../qemuxml2argv-aarch64-noacpi-uefi.xml | 18 ++++++ .../qemuxml2argv-aarch64-video-virtio-gpu-pci.args | 1 + .../qemuxml2argv-aarch64-video-virtio-gpu-pci.xml | 3 - ...l2argv-aarch64-virt-2.6-virtio-pci-default.args | 1 + ...ml2argv-aarch64-virt-2.6-virtio-pci-default.xml | 1 - .../qemuxml2argv-aarch64-virt-default-nic.args | 1 + .../qemuxml2argv-aarch64-virt-default-nic.xml | 3 - .../qemuxml2argv-aarch64-virt-virtio.args | 1 + .../qemuxml2argv-aarch64-virt-virtio.xml | 1 - .../qemuxml2argv-aarch64-virtio-pci-default.args | 1 + .../qemuxml2argv-aarch64-virtio-pci-default.xml | 1 - ...l2argv-aarch64-virtio-pci-manual-addresses.args | 1 + ...ml2argv-aarch64-virtio-pci-manual-addresses.xml | 1 - .../qemuxml2argv-balloon-ccw-deflate.args | 1 - .../qemuxml2argv-balloon-mmio-deflate.args | 1 + .../qemuxml2argv-balloon-mmio-deflate.xml | 1 - .../qemuxml2argv-console-sclp.args | 1 - .../qemuxml2argv-console-virtio-ccw.args | 1 - .../qemuxml2argv-console-virtio-s390.args | 1 - .../qemuxml2argv-cpu-s390-features.args | 1 - .../qemuxml2argv-cpu-s390-zEC12.args | 1 - .../qemuxml2argv-disk-virtio-ccw-many.args | 1 - .../qemuxml2argv-disk-virtio-ccw.args | 1 - .../qemuxml2argv-disk-virtio-s390.args | 1 - .../qemuxml2argv-disk-virtio-scsi-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args | 1 - .../qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args | 1 - .../qemuxml2argv-hugepages-numa.args | 1 + .../qemuxml2argv-iothreads-disk-virtio-ccw.args | 1 - .../qemuxml2argv-iothreads-virtio-scsi-ccw.args | 1 - .../qemuxml2argv-machine-aeskeywrap-off-cap.args | 1 - .../qemuxml2argv-machine-aeskeywrap-off-caps.args | 1 - .../qemuxml2argv-machine-aeskeywrap-on-cap.args | 1 - .../qemuxml2argv-machine-aeskeywrap-on-caps.args | 1 - .../qemuxml2argv-machine-deakeywrap-off-cap.args | 1 - .../qemuxml2argv-machine-deakeywrap-off-caps.args | 1 - .../qemuxml2argv-machine-deakeywrap-on-cap.args | 1 - .../qemuxml2argv-machine-deakeywrap-on-caps.args | 1 - .../qemuxml2argv-machine-keywrap-none-caps.args | 1 - .../qemuxml2argv-machine-keywrap-none.args | 1 - .../qemuxml2argv-memory-hotplug-ppc64-nonuma.args | 1 - .../qemuxml2argv-net-virtio-ccw.args | 1 - .../qemuxml2argv-net-virtio-s390.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args | 1 - .../qemuxml2argv-ppce500-serial.args | 1 - .../qemuxml2argv-pseries-basic.args | 1 - .../qemuxml2argv-pseries-cpu-compat.args | 1 - .../qemuxml2argv-pseries-cpu-exact.args | 1 - .../qemuxml2argv-pseries-cpu-le.args | 1 - .../qemuxml2argv-pseries-nvram.args | 1 - .../qemuxml2argv-pseries-panic-missing.args | 1 - .../qemuxml2argv-pseries-panic-no-address.args | 1 - .../qemuxml2argv-pseries-usb-default.args | 1 - .../qemuxml2argv-pseries-usb-kbd.args | 1 - .../qemuxml2argv-pseries-usb-multi.args | 1 - .../qemuxml2argv-pseries-vio-user-assigned.args | 1 - .../qemuxml2argvdata/qemuxml2argv-pseries-vio.args | 1 - .../qemuxml2argv-q35-acpi-nouefi.args | 21 +++++++ .../qemuxml2argv-q35-acpi-nouefi.xml | 22 +++++++ .../qemuxml2argv-q35-acpi-uefi.args | 22 +++++++ .../qemuxml2argv-q35-acpi-uefi.xml | 21 +++++++ .../qemuxml2argv-q35-noacpi-nouefi.args | 22 +++++++ .../qemuxml2argv-q35-noacpi-nouefi.xml | 19 ++++++ .../qemuxml2argv-q35-noacpi-uefi.xml | 18 ++++++ .../qemuxml2argv-q35-virt-manager-basic.args | 1 + ...muxml2argv-s390-allow-bogus-usb-controller.args | 1 - .../qemuxml2argv-s390-allow-bogus-usb-none.args | 1 - .../qemuxml2argv-s390-panic-missing.args | 1 - .../qemuxml2argv-s390-panic-no-address.args | 1 - .../qemuxml2argv-virtio-rng-ccw.args | 1 - .../qemuxml2argv-watchdog-diag288.args | 1 - tests/qemuxml2argvtest.c | 18 +++++- .../qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml | 1 - ...qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml | 1 - .../qemuxml2xmlout-aarch64-virtio-pci-default.xml | 1 - ...2xmlout-aarch64-virtio-pci-manual-addresses.xml | 1 - 93 files changed, 388 insertions(+), 109 deletions(-) copy tests/qemuxml2argvdata/{qemuxml2argv-aarch64-cpu-passthrough.args => qemuxml2argv-aarch64-acpi-nouefi.args} (55%) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.xml copy tests/qemuxml2argvdata/{qemuxml2argv-aarch64-cpu-passthrough.args => qemuxml2argv-aarch64-noacpi-nouefi.args} (50%) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-uefi.xml -- 2.7.4

Instead of having a single function that probes the architecture from the monitor and then sets a bunch of basic capabilities based on it, have a separate function for each part: virQEMUCapsInitQMPArch() only sets the architecture, and virQEMUCapsInitQMPBasicArch() only sets the capabilities. This split will be useful later on, when we will want to set basic capabilities from the test suite without having to go through the pain of mocking the monitor. --- This is 99% pure code motion; however, an early 'return -1' has been converted to the equivalent 'goto cleanup'. src/qemu/qemu_capabilities.c | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f51141b..eec2ee4 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4177,18 +4177,25 @@ virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps) virQEMUCapsSet(qemuCaps, QEMU_CAPS_DISPLAY); } -/* Capabilities that are architecture depending - * initialized for QEMU. + +/** + * virQEMUCapsInitQMPArch: + * @qemuCaps: QEMU capabilities + * @mon: QEMU monitor + * + * Initialize the architecture for @qemuCaps by asking @mon. + * + * Returns: 0 on success, <0 on failure */ static int -virQEMUCapsInitArchQMPBasic(virQEMUCapsPtr qemuCaps, +virQEMUCapsInitQMPArch(virQEMUCapsPtr qemuCaps, qemuMonitorPtr mon) { char *archstr = NULL; int ret = -1; if (!(archstr = qemuMonitorGetTargetArch(mon))) - return -1; + goto cleanup; if ((qemuCaps->arch = virQEMUCapsArchFromString(archstr)) == VIR_ARCH_NONE) { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -4196,18 +4203,29 @@ virQEMUCapsInitArchQMPBasic(virQEMUCapsPtr qemuCaps, goto cleanup; } + ret = 0; + + cleanup: + VIR_FREE(archstr); + return ret; +} + + +/** + * virQEMUCapsInitQMPBasicArch: + * @qemuCaps: QEMU capabilities + * + * Initialize @qemuCaps with basic architecture-dependent capabilities. + */ +static void +virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps) +{ /* ACPI/HPET/KVM PIT are x86 specific */ if (ARCH_IS_X86(qemuCaps->arch)) { virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_KVM_PIT); } - - ret = 0; - - cleanup: - VIR_FREE(archstr); - return ret; } @@ -4432,9 +4450,11 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, virQEMUCapsInitQMPBasic(qemuCaps); - if (virQEMUCapsInitArchQMPBasic(qemuCaps, mon) < 0) + if (virQEMUCapsInitQMPArch(qemuCaps, mon) < 0) goto cleanup; + virQEMUCapsInitQMPBasicArch(qemuCaps); + /* USB option is supported v1.3.0 onwards */ if (qemuCaps->version >= 1003000) virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_USB_OPT); -- 2.7.4

On 03/29/2017 10:08 AM, Andrea Bolognani wrote:
Instead of having a single function that probes the architecture from the monitor and then sets a bunch of basic capabilities based on it, have a separate function for each part: virQEMUCapsInitQMPArch() only sets the architecture, and virQEMUCapsInitQMPBasicArch() only sets the capabilities.
This split will be useful later on, when we will want to set basic capabilities from the test suite without having to go through the pain of mocking the monitor. --- This is 99% pure code motion; however, an early 'return -1' has been converted to the equivalent 'goto cleanup'.
src/qemu/qemu_capabilities.c | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-)
ACK, John

The capabilities used in test cases should match those used during normal operation for the tests to make any sense. --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 ++ tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-balloon-ccw-deflate.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-console-sclp.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-console-virtio-s390.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-features.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-zEC12.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw-many.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-s390.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args | 1 + tests/qemuxml2argvdata/qemuxml2argv-iothreads-disk-virtio-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-cap.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-cap.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-cap.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-cap.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-ppc64-nonuma.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-net-virtio-s390.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-missing.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-no-address.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-kbd.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args | 1 + .../qemuxml2argv-s390-allow-bogus-usb-controller.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-watchdog-diag288.args | 1 - tests/qemuxml2argvtest.c | 4 ++-- 55 files changed, 7 insertions(+), 53 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index eec2ee4..d9a1f8b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4217,7 +4217,7 @@ virQEMUCapsInitQMPArch(virQEMUCapsPtr qemuCaps, * * Initialize @qemuCaps with basic architecture-dependent capabilities. */ -static void +void virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps) { /* ACPI/HPET/KVM PIT are x86 specific */ diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index d44682f..24e2f38 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -510,6 +510,8 @@ int virQEMUCapsParseHelpStr(const char *qemu, const char *qmperr); /* Only for use by test suite */ int virQEMUCapsParseDeviceStr(virQEMUCapsPtr qemuCaps, const char *str); +/* Only for use by test suite */ +void virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps); VIR_ENUM_DECL(virQEMUCaps); diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args index 23276ad..5fdaa08 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args @@ -15,5 +15,4 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ --no-acpi \ -boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args index f79c1c6..2caf1b9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args @@ -15,5 +15,4 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ --no-acpi \ -boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args index fce9308..3ae8e5f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args @@ -15,5 +15,4 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ --no-acpi \ -boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-ccw-deflate.args b/tests/qemuxml2argvdata/qemuxml2argv-balloon-ccw-deflate.args index 8565071..c8bb726 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-balloon-ccw-deflate.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-ccw-deflate.args @@ -15,6 +15,5 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a,deflate-on-oom=on diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-sclp.args b/tests/qemuxml2argvdata/qemuxml2argv-console-sclp.args index dc9f7af..17f6055 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-console-sclp.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-console-sclp.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args index 4fe0d6d..73868d4 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0001 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-s390.args b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-s390.args index 6e0e11e..06ef1b7 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-s390.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-s390.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -device virtio-serial-s390,id=virtio-serial0 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-features.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-features.args index 07abc93..0b4ce4c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-features.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-features.args @@ -15,5 +15,4 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-guest1/monitor.sock,server,nowait \ --no-acpi \ -boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-zEC12.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-zEC12.args index 4c95d6a..48850b8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-zEC12.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-zEC12.args @@ -15,5 +15,4 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-guest1/monitor.sock,server,nowait \ --no-acpi \ -boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw-many.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw-many.args index 5f6b087..8290cd6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw-many.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw-many.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=0.0.0007,drive=drive-virtio-disk0,id=virtio-disk0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.args index 45f51a8..2f77a29 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-s390.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-s390.args index 30aa47a..45c4659 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-s390.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-s390.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args index 3b352bf..522fd99 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -device virtio-scsi-ccw,id=scsi0,devno=fe.0.0001 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args index d4bf19c..6d4f65e 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args @@ -15,7 +15,6 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args index 199adfa..03de632 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest2/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -device virtio-scsi-ccw,id=scsi0,devno=fe.0.0001 \ -drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-virtio-disk0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args b/tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args index 26e9496..1b2a52b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args @@ -22,6 +22,7 @@ host-nodes=1-3,policy=bind \ -monitor unix:/tmp/lib/domain--1-fedora/monitor.sock,server,nowait \ -rtc base=utc,driftfix=slew \ -no-kvm-pit-reinjection \ +-no-hpet \ -global PIIX4_PM.disable_s3=1 \ -global PIIX4_PM.disable_s4=1 \ -boot c \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-iothreads-disk-virtio-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-iothreads-disk-virtio-ccw.args index 5e001de..ba4e699 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-iothreads-disk-virtio-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-iothreads-disk-virtio-ccw.args @@ -16,7 +16,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,iothread=iothread1,devno=fe.0.0000,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.args index 1ebb6d4..e87912b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.args @@ -16,7 +16,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -device virtio-scsi-ccw,iothread=iothread2,id=scsi0,devno=fe.0.0001 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-cap.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-cap.args index 33a53a0..c718084 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-cap.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-cap.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-caps.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-caps.args index 33a53a0..c718084 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-caps.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-caps.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-cap.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-cap.args index 9536cce..c6eaa24 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-cap.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-cap.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-caps.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-caps.args index 9536cce..c6eaa24 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-caps.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-caps.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-cap.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-cap.args index 9afa7c2..434f506 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-cap.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-cap.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-caps.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-caps.args index 9afa7c2..434f506 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-caps.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-caps.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-cap.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-cap.args index e73ed67..24e2035 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-cap.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-cap.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-caps.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-caps.args index e73ed67..24e2035 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-caps.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-caps.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none-caps.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none-caps.args index 19d2c35..acde08a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none-caps.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none-caps.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none.args index 19d2c35..acde08a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-ppc64-nonuma.args b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-ppc64-nonuma.args index 781f30d..88ed6b6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-ppc64-nonuma.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-ppc64-nonuma.args @@ -18,7 +18,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -kernel /media/ram/uImage \ -initrd /media/ram/ramdisk \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.args index 86b6add..8a0598a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -device virtio-net-ccw,vlan=0,id=net0,mac=00:11:22:33:44:55,devno=fe.0.0001 \ -net user,vlan=0,name=hostnet0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-s390.args b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-s390.args index 46ccbc9..ef31b79 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-s390.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-s390.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -device virtio-net-s390,vlan=0,id=net0,mac=00:11:22:33:44:55 \ -net user,vlan=0,name=hostnet0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args b/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args index 58c1526..10ddca0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -kernel /media/ram/uImage \ -initrd /media/ram/ramdisk \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args b/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args index d623836..87f4ee5 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args @@ -16,7 +16,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -kernel /media/ram/uImage \ -initrd /media/ram/ramdisk \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args index 2839dea..97a7057 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -usb \ -chardev pty,id=charserial0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args index 06595a2..7740e2f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args @@ -18,7 +18,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -usb \ -chardev pty,id=charserial0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args index 803c1aa..d2c99a7 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args @@ -18,7 +18,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -usb \ -chardev pty,id=charserial0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args index 2839dea..97a7057 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -usb \ -chardev pty,id=charserial0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.args index 89e0e56..904b951 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.args @@ -14,7 +14,6 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ -boot c \ -usb \ -global spapr-nvram.reg=0x4000 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-missing.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-missing.args index 2839dea..97a7057 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-missing.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-missing.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -usb \ -chardev pty,id=charserial0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-no-address.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-no-address.args index 2839dea..97a7057 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-no-address.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-no-address.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -usb \ -chardev pty,id=charserial0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.args index 56e3552..a92b1e0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -device pci-ohci,id=usb,bus=pci.0,addr=0x1 \ -chardev pty,id=charserial0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-kbd.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-kbd.args index 1a672c6..caaccdb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-kbd.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-kbd.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -device pci-ohci,id=usb,bus=pci.0,addr=0x1 \ -chardev pty,id=charserial0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args index 7273891..b9bd905 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1 \ -device pci-ohci,id=usb1,bus=pci.0,addr=0x2 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args index 5754d3c..63cf3c1 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -device spapr-vscsi,id=scsi0,reg=0x2000 \ -device spapr-vscsi,id=scsi1,reg=0x30000000 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args index 43381dd..0294067 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -device spapr-vscsi,id=scsi0,reg=0x2000 \ -device spapr-vscsi,id=scsi1,reg=0x3000 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args index e139e52..91598e9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args @@ -15,6 +15,7 @@ QEMU_AUDIO_DRV=spice \ -monitor unix:/tmp/lib/domain--1-virt-manager-basic/monitor.sock,server,nowait \ -rtc base=utc,driftfix=slew \ -no-kvm-pit-reinjection \ +-no-hpet \ -global ICH9-LPC.disable_s3=1 \ -global ICH9-LPC.disable_s4=1 \ -boot c \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-controller.args b/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-controller.args index a1c1c85..8abe0df 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-controller.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-controller.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-test/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -device virtio-serial-s390,id=virtio-serial0 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.args b/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.args index a1c1c85..8abe0df 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-test/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -device virtio-serial-s390,id=virtio-serial0 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args index a18b5a5..3267814 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0000 \ -chardev pty,id=charconsole0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args index e49c8df..fa8fbbc 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -boot c \ -device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0000 \ -chardev pty,id=charconsole0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args index dec49e1..a73bce8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0001 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-diag288.args b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-diag288.args index 2997c12..95f915c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-diag288.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-diag288.args @@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \ -chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline \ --no-acpi \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -device diag288,id=watchdog0 \ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 41461ea..731b793 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -360,8 +360,6 @@ testInitQEMUCaps(struct testInfo *info, if (!(info->qemuCaps = virQEMUCapsNew())) goto cleanup; - virQEMUCapsSet(info->qemuCaps, QEMU_CAPS_NO_ACPI); - if (testQemuCapsSetGIC(info->qemuCaps, gic) < 0) goto cleanup; @@ -381,6 +379,8 @@ testUpdateQEMUCaps(const struct testInfo *info, virQEMUCapsSetArch(info->qemuCaps, vm->def->os.arch); + virQEMUCapsInitQMPBasicArch(info->qemuCaps); + /* We need to pretend QEMU 2.0.0 is in use so that pSeries guests * will get the correct alias assigned to their buses. * See virQEMUCapsHasPCIMultiBus() */ -- 2.7.4

On 03/29/2017 10:08 AM, Andrea Bolognani wrote:
The capabilities used in test cases should match those used during normal operation for the tests to make any sense.
Could you add just a bit of text about why all -no-acpi is removed (mostly) and why -no-hpet is added to a couple? It's essentially the comment from the subsequent patch: "-no-acpi is not supported on non-x86 even if qemu reports it in -help", so all non-x64 .args file need to remove Still not sure I understand why the no-hpet got added, but I suppose they're necessary. And only a couple of outputs have it... Guess it depends on what else is defined... Should have said something in v1... ACK John
--- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 ++ tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-balloon-ccw-deflate.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-console-sclp.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-console-virtio-s390.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-features.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-cpu-s390-zEC12.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw-many.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-s390.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args | 1 + tests/qemuxml2argvdata/qemuxml2argv-iothreads-disk-virtio-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-iothreads-virtio-scsi-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-cap.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-off-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-cap.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-aeskeywrap-on-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-cap.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-off-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-cap.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-deakeywrap-on-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none-caps.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-machine-keywrap-none.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-ppc64-nonuma.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-net-virtio-s390.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-ppce500-serial.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-missing.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-no-address.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-kbd.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args | 1 + .../qemuxml2argv-s390-allow-bogus-usb-controller.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args | 1 - tests/qemuxml2argvdata/qemuxml2argv-watchdog-diag288.args | 1 - tests/qemuxml2argvtest.c | 4 ++-- 55 files changed, 7 insertions(+), 53 deletions(-)

On Wed, 2017-03-29 at 19:50 -0400, John Ferlan wrote:
The capabilities used in test cases should match those used during normal operation for the tests to make any sense. Could you add just a bit of text about why all -no-acpi is removed (mostly) and why -no-hpet is added to a couple? It's essentially the comment from the subsequent patch: "-no-acpi is not supported on non-x86 even if qemu reports it in -help", so all non-x64 .args file need to remove Still not sure I understand why the no-hpet got added, but I suppose they're necessary. And only a couple of outputs have it... Guess it depends on what else is defined...
Both are consequences of the test suite not using hardcoded capabilities anymore: while before this patch NO_ACPI was hardcoded as present (even though it shouldn't have been, except for x86 guests) and NO_HPET was hardcoded as *not* present (even though it should have for x86 guests), after this patch arch-dependent capabilities are set properly and so all aarch64 guests lose the -no-acpi in their .args and the one x86 guest that has <timer name='hpet' present='no'/> but didn't have NO_HPET explicitly set (a bug in the test case) gains the corresponding -no-hpet. I'll add a short note about that to the commit message, but we should probably go one step further and drop all uses of NO_ACPI and NO_HPET from the test cases altogether, since we're now supposed to be setting them automatically for the right test cases and setting them manually might just be hiding existing bugs. I just posted patch 2.5/5 that does just that :) -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Mar 29, 2017 at 04:08:53PM +0200, Andrea Bolognani wrote:
The capabilities used in test cases should match those used during normal operation for the tests to make any sense. --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 ++ tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args | 1 -
[...]
tests/qemuxml2argvdata/qemuxml2argv-watchdog-diag288.args | 1 - tests/qemuxml2argvtest.c | 4 ++-- 55 files changed, 7 insertions(+), 53 deletions(-)
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index d44682f..24e2f38 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -510,6 +510,8 @@ int virQEMUCapsParseHelpStr(const char *qemu, const char *qmperr); /* Only for use by test suite */ int virQEMUCapsParseDeviceStr(virQEMUCapsPtr qemuCaps, const char *str); +/* Only for use by test suite */ +void virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps);
We have qemu_capspriv.h for functions used by the test suite guarded by the __QEMU_CAPSPRIV_H_ALLOW__ define. Jan

On Wed, 2017-04-05 at 12:04 +0200, Ján Tomko wrote: [...]
@@ -510,6 +510,8 @@ int virQEMUCapsParseHelpStr(const char *qemu, const char *qmperr); /* Only for use by test suite */ int virQEMUCapsParseDeviceStr(virQEMUCapsPtr qemuCaps, const char *str); +/* Only for use by test suite */ +void virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps); We have qemu_capspriv.h for functions used by the test suite guarded by the __QEMU_CAPSPRIV_H_ALLOW__ define.
... and you'd expect me to know about it after 26026810eaee, wouldn't you? :) Thanks for pointing this out, I'll cook up a patch shortly. -- Andrea Bolognani / Red Hat / Virtualization

So far, libvirt has assumed that only x86 supports ACPI, but that's inaccurate since aarch64 supports it too. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1429509 --- src/qemu/qemu_capabilities.c | 28 ++++++++++++++++------ .../caps_2.6.0-gicv2.aarch64.xml | 1 + .../caps_2.6.0-gicv3.aarch64.xml | 1 + .../qemuxml2argv-aarch64-gic-host.args | 1 + .../qemuxml2argv-aarch64-gic-v2.args | 1 + .../qemuxml2argv-aarch64-gic-v3.args | 1 + 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d9a1f8b..d8ed88b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1043,13 +1043,17 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps, machines = NULL; nmachines = 0; + } + if ((ARCH_IS_X86(guestarch) || guestarch == VIR_ARCH_AARCH64) && + virCapabilitiesAddGuestFeature(guest, "acpi", true, true) == NULL) { + goto cleanup; } if (ARCH_IS_X86(guestarch) && - (virCapabilitiesAddGuestFeature(guest, "acpi", true, true) == NULL || - virCapabilitiesAddGuestFeature(guest, "apic", true, false) == NULL)) + virCapabilitiesAddGuestFeature(guest, "apic", true, false) == NULL) { goto cleanup; + } if ((guestarch == VIR_ARCH_I686) && (virCapabilitiesAddGuestFeature(guest, "pae", true, false) == NULL || @@ -4096,10 +4100,15 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid, const c qmperr) < 0) goto cleanup; - /* -no-acpi is not supported on non-x86 - * even if qemu reports it in -help */ - if (!ARCH_IS_X86(qemuCaps->arch)) + /* Older QEMU versions reported -no-acpi in the output of -help even + * though it was not supported by the architecture. The issue has since + * been fixed, but to maintain compatibility with all release we still + * need to filter out the capability for architectures that we know + * don't support the feature, eg. anything but x86 and aarch64 */ + if (!ARCH_IS_X86(qemuCaps->arch) && + qemuCaps->arch != VIR_ARCH_AARCH64) { virQEMUCapsClear(qemuCaps, QEMU_CAPS_NO_ACPI); + } /* virQEMUCapsExtractDeviceStr will only set additional caps if qemu * understands the 0.13.0+ notion of "-device driver,". */ @@ -4220,9 +4229,14 @@ virQEMUCapsInitQMPArch(virQEMUCapsPtr qemuCaps, void virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps) { - /* ACPI/HPET/KVM PIT are x86 specific */ - if (ARCH_IS_X86(qemuCaps->arch)) { + /* ACPI only works on x86 and aarch64 */ + if (ARCH_IS_X86(qemuCaps->arch) || + qemuCaps->arch == VIR_ARCH_AARCH64) { virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI); + } + + /* HPET and KVM PIT are x86 specific */ + if (ARCH_IS_X86(qemuCaps->arch)) { virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_KVM_PIT); } diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml index c1e4679..af3a8e7 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml @@ -40,6 +40,7 @@ <flag name='no-shutdown'/> <flag name='cache-unsafe'/> <flag name='ich9-ahci'/> + <flag name='no-acpi'/> <flag name='fsdev-readonly'/> <flag name='virtio-blk-pci.scsi'/> <flag name='drive-copy-on-read'/> diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml index 20dfda2..4402ffa 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml @@ -40,6 +40,7 @@ <flag name='no-shutdown'/> <flag name='cache-unsafe'/> <flag name='ich9-ahci'/> + <flag name='no-acpi'/> <flag name='fsdev-readonly'/> <flag name='virtio-blk-pci.scsi'/> <flag name='drive-copy-on-read'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args index 5fdaa08..23276ad 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args @@ -15,4 +15,5 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args index 2caf1b9..f79c1c6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args @@ -15,4 +15,5 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args index 3ae8e5f..fce9308 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args @@ -15,4 +15,5 @@ QEMU_AUDIO_DRV=none \ -nographic \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c -- 2.7.4

On 03/29/2017 10:08 AM, Andrea Bolognani wrote:
So far, libvirt has assumed that only x86 supports ACPI, but that's inaccurate since aarch64 supports it too.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1429509 --- src/qemu/qemu_capabilities.c | 28 ++++++++++++++++------ .../caps_2.6.0-gicv2.aarch64.xml | 1 + .../caps_2.6.0-gicv3.aarch64.xml | 1 + .../qemuxml2argv-aarch64-gic-host.args | 1 + .../qemuxml2argv-aarch64-gic-v2.args | 1 + .../qemuxml2argv-aarch64-gic-v3.args | 1 + 6 files changed, 26 insertions(+), 7 deletions(-)
ACK John

On Wed, Mar 29, 2017 at 04:08:54PM +0200, Andrea Bolognani wrote:
So far, libvirt has assumed that only x86 supports ACPI, but that's inaccurate since aarch64 supports it too.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1429509 --- src/qemu/qemu_capabilities.c | 28 ++++++++++++++++------ .../caps_2.6.0-gicv2.aarch64.xml | 1 + .../caps_2.6.0-gicv3.aarch64.xml | 1 + .../qemuxml2argv-aarch64-gic-host.args | 1 + .../qemuxml2argv-aarch64-gic-v2.args | 1 + .../qemuxml2argv-aarch64-gic-v3.args | 1 + 6 files changed, 26 insertions(+), 7 deletions(-)
@@ -4096,10 +4100,15 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid, const c qmperr) < 0) goto cleanup;
- /* -no-acpi is not supported on non-x86 - * even if qemu reports it in -help */ - if (!ARCH_IS_X86(qemuCaps->arch)) + /* Older QEMU versions reported -no-acpi in the output of -help even + * though it was not supported by the architecture. The issue has since + * been fixed, but to maintain compatibility with all release we still + * need to filter out the capability for architectures that we know + * don't support the feature, eg. anything but x86 and aarch64 */ + if (!ARCH_IS_X86(qemuCaps->arch) && + qemuCaps->arch != VIR_ARCH_AARCH64) { virQEMUCapsClear(qemuCaps, QEMU_CAPS_NO_ACPI); + }
This adjustment is dead code. aarch64 was introduced in QEMU 1.6.0, but we stopped parsing help since QEMU 1.2.0. Jan

On Wed, 2017-04-05 at 12:00 +0200, Ján Tomko wrote: [...]
@@ -4096,10 +4100,15 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid, const c qmperr) < 0) goto cleanup; - /* -no-acpi is not supported on non-x86 - * even if qemu reports it in -help */ - if (!ARCH_IS_X86(qemuCaps->arch)) + /* Older QEMU versions reported -no-acpi in the output of -help even + * though it was not supported by the architecture. The issue has since + * been fixed, but to maintain compatibility with all release we still + * need to filter out the capability for architectures that we know + * don't support the feature, eg. anything but x86 and aarch64 */ + if (!ARCH_IS_X86(qemuCaps->arch) && + qemuCaps->arch != VIR_ARCH_AARCH64) { virQEMUCapsClear(qemuCaps, QEMU_CAPS_NO_ACPI); + } This adjustment is dead code. aarch64 was introduced in QEMU 1.6.0, but we stopped parsing help since QEMU 1.2.0.
As mentioned in response to John's review of v1, I changed this so that there are no inconsistencies between the QMP and non-QMP codepaths that could confuse people as to which behavior is the correct one down the line, but if you want me to get rid of it I can revert the code change and settle with fleshing out the comment further. -- Andrea Bolognani / Red Hat / Virtualization

Depending on the architecture, requirements for ACPI and UEFI can be different; more specifically, while on x86 UEFI requires ACPI, on aarch64 it's the other way around. Enforce these requirements when validating the domain, and make the error message more accurate by mentioning that they're not necessarily applicable to all architectures. Several aarch64 test cases had to be tweaked because they would have failed the validation step otherwise. --- src/qemu/qemu_command.c | 20 ++++---------------- src/qemu/qemu_domain.c | 20 ++++++++++++++++++++ .../qemuxml2argv-aarch64-aavmf-virtio-mmio.args | 1 + .../qemuxml2argv-aarch64-aavmf-virtio-mmio.xml | 1 - .../qemuxml2argv-aarch64-cpu-passthrough.args | 1 + .../qemuxml2argv-aarch64-cpu-passthrough.xml | 1 - .../qemuxml2argv-aarch64-video-virtio-gpu-pci.args | 1 + .../qemuxml2argv-aarch64-video-virtio-gpu-pci.xml | 3 --- ...xml2argv-aarch64-virt-2.6-virtio-pci-default.args | 1 + ...uxml2argv-aarch64-virt-2.6-virtio-pci-default.xml | 1 - .../qemuxml2argv-aarch64-virt-default-nic.args | 1 + .../qemuxml2argv-aarch64-virt-default-nic.xml | 3 --- .../qemuxml2argv-aarch64-virt-virtio.args | 1 + .../qemuxml2argv-aarch64-virt-virtio.xml | 1 - .../qemuxml2argv-aarch64-virtio-pci-default.args | 1 + .../qemuxml2argv-aarch64-virtio-pci-default.xml | 1 - ...xml2argv-aarch64-virtio-pci-manual-addresses.args | 1 + ...uxml2argv-aarch64-virtio-pci-manual-addresses.xml | 1 - .../qemuxml2argv-balloon-mmio-deflate.args | 1 + .../qemuxml2argv-balloon-mmio-deflate.xml | 1 - .../qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml | 1 - .../qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml | 1 - .../qemuxml2xmlout-aarch64-virtio-pci-default.xml | 1 - ...ml2xmlout-aarch64-virtio-pci-manual-addresses.xml | 1 - 24 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 64d2d71..5cf383a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9324,18 +9324,16 @@ qemuBuildRedirdevCommandLine(virLogManagerPtr logManager, } -static int +static void qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, - virDomainDefPtr def, - virQEMUCapsPtr qemuCaps) + virDomainDefPtr def) { - int ret = -1; virDomainLoaderDefPtr loader = def->os.loader; virBuffer buf = VIR_BUFFER_INITIALIZER; int unit = 0; if (!loader) - return 0; + return; switch ((virDomainLoader) loader->type) { case VIR_DOMAIN_LOADER_TYPE_ROM: @@ -9344,12 +9342,6 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, break; case VIR_DOMAIN_LOADER_TYPE_PFLASH: - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_ACPI) && - def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("ACPI must be enabled in order to use UEFI")); - goto cleanup; - } if (loader->secure == VIR_TRISTATE_BOOL_YES) { virCommandAddArgList(cmd, @@ -9387,10 +9379,7 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, break; } - ret = 0; - cleanup: virBufferFreeAndReset(&buf); - return ret; } @@ -9827,8 +9816,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildCpuCommandLine(cmd, driver, def, qemuCaps) < 0) goto error; - if (qemuBuildDomainLoaderCommandLine(cmd, def, qemuCaps) < 0) - goto error; + qemuBuildDomainLoaderCommandLine(cmd, def); if (!migrateURI && !snapshot && qemuDomainAlignMemorySizes(def) < 0) goto error; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 458bb5f..e41e8e4 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2884,6 +2884,26 @@ qemuDomainDefValidate(const virDomainDef *def, goto cleanup; } + /* On x86, UEFI requires ACPI */ + if (def->os.loader && + def->os.loader->type == VIR_DOMAIN_LOADER_TYPE_PFLASH && + ARCH_IS_X86(def->os.arch) && + def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("UEFI requires ACPI on this architecture")); + goto cleanup; + } + + /* On aarch64, ACPI requires UEFI */ + if (def->features[VIR_DOMAIN_FEATURE_ACPI] == VIR_TRISTATE_SWITCH_ON && + def->os.arch == VIR_ARCH_AARCH64 && + (!def->os.loader || + def->os.loader->type != VIR_DOMAIN_LOADER_TYPE_PFLASH)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ACPI requires UEFI on this architecture")); + return -1; + } + if (def->os.loader && def->os.loader->secure == VIR_TRISTATE_BOOL_YES) { /* These are the QEMU implementation limitations. But we diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args index bf4b2f7..68fb61b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args @@ -16,6 +16,7 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c \ -kernel /aarch64.kernel \ -initrd /aarch64.initrd \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.xml index 8c7428c..5d72173 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.xml @@ -13,7 +13,6 @@ <boot dev='hd'/> </os> <features> - <acpi/> <apic/> <pae/> <gic version='2'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args index 52d2112..9c8c001 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args @@ -16,6 +16,7 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c \ -drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.xml index 4cdf387..0dda095 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.xml @@ -8,7 +8,6 @@ <type arch="aarch64" machine="virt">hvm</type> </os> <features> - <acpi/> <apic/> <pae/> </features> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-video-virtio-gpu-pci.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-video-virtio-gpu-pci.args index 76ee977..2f8c516 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-video-virtio-gpu-pci.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-video-virtio-gpu-pci.args @@ -16,6 +16,7 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64-vgpu/monitor.sock,server,nowait \ +-no-acpi \ -device ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ addr=0x1 \ -device ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,multifunction=on,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-video-virtio-gpu-pci.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-video-virtio-gpu-pci.xml index 4b52a73..d9a0128 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-video-virtio-gpu-pci.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-video-virtio-gpu-pci.xml @@ -7,9 +7,6 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> </os> - <features> - <acpi/> - </features> <cpu mode='custom' match='exact'> <model fallback='allow'>cortex-a57</model> </cpu> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.args index df03c6e..e99d412 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.args @@ -16,6 +16,7 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c \ -kernel /aarch64.kernel \ -initrd /aarch64.initrd \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.xml index e745101..43bc008 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.xml @@ -12,7 +12,6 @@ <cmdline>earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait</cmdline> </os> <features> - <acpi/> <apic/> <pae/> </features> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args index 29f65f6..47d7761 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args @@ -17,6 +17,7 @@ QEMU_AUDIO_DRV=none \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64-virt-default/monitor.sock,server,\ nowait \ +-no-acpi \ -boot c \ -kernel /aarch64.kernel \ -initrd /aarch64.initrd \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml index 3a6f098..17ddc90 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml @@ -4,9 +4,6 @@ <memory>1048576</memory> <currentMemory>1048576</currentMemory> <vcpu>1</vcpu> - <features> - <acpi/> - </features> <cpu match='exact'> <model>cortex-a53</model> </cpu> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args index b5b010c..5fef3b4 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args @@ -16,6 +16,7 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c \ -kernel /aarch64.kernel \ -initrd /aarch64.initrd \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.xml index ad34615..2692e61 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.xml @@ -12,7 +12,6 @@ <cmdline>earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait</cmdline> </os> <features> - <acpi/> <apic/> <pae/> </features> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args index 46ac51d..23a5fff 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args @@ -16,6 +16,7 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c \ -kernel /aarch64.kernel \ -initrd /aarch64.initrd \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.xml index 2a84a96..72bf0c9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.xml @@ -12,7 +12,6 @@ <cmdline>earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait</cmdline> </os> <features> - <acpi/> <apic/> <pae/> </features> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args index 0640399..54244fd 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args @@ -16,6 +16,7 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c \ -kernel /aarch64.kernel \ -initrd /aarch64.initrd \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml index 5e1b494..fee3258 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml @@ -13,7 +13,6 @@ <boot dev='hd'/> </os> <features> - <acpi/> <apic/> <pae/> </features> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args b/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args index 10d1362..e568e3c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args @@ -16,6 +16,7 @@ QEMU_AUDIO_DRV=none \ -nodefconfig \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \ +-no-acpi \ -boot c \ -kernel /aarch64.kernel \ -initrd /aarch64.initrd \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.xml b/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.xml index 1b5b48c..49b7d2c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.xml @@ -12,7 +12,6 @@ <cmdline>earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait</cmdline> </os> <features> - <acpi/> <apic/> <pae/> </features> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml index bea6599..9e72830 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml @@ -13,7 +13,6 @@ <boot dev='hd'/> </os> <features> - <acpi/> <apic/> <pae/> <gic version='2'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml index 2c765e7..8590f48 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml @@ -8,7 +8,6 @@ <type arch='aarch64' machine='virt'>hvm</type> </os> <features> - <acpi/> <gic version='2'/> </features> <cpu mode='custom' match='exact' check='none'> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml index 88a6a6a..e549642 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml @@ -13,7 +13,6 @@ <boot dev='hd'/> </os> <features> - <acpi/> <apic/> <pae/> <gic version='2'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml index 83cf0d1..83d8dcc 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml @@ -13,7 +13,6 @@ <boot dev='hd'/> </os> <features> - <acpi/> <apic/> <pae/> <gic version='2'/> -- 2.7.4

On 03/29/2017 10:08 AM, Andrea Bolognani wrote:
Depending on the architecture, requirements for ACPI and UEFI can be different; more specifically, while on x86 UEFI requires ACPI, on aarch64 it's the other way around.
Enforce these requirements when validating the domain, and make the error message more accurate by mentioning that they're not necessarily applicable to all architectures.
Several aarch64 test cases had to be tweaked because they would have failed the validation step otherwise. --- src/qemu/qemu_command.c | 20 ++++---------------- src/qemu/qemu_domain.c | 20 ++++++++++++++++++++ .../qemuxml2argv-aarch64-aavmf-virtio-mmio.args | 1 + .../qemuxml2argv-aarch64-aavmf-virtio-mmio.xml | 1 - .../qemuxml2argv-aarch64-cpu-passthrough.args | 1 + .../qemuxml2argv-aarch64-cpu-passthrough.xml | 1 - .../qemuxml2argv-aarch64-video-virtio-gpu-pci.args | 1 + .../qemuxml2argv-aarch64-video-virtio-gpu-pci.xml | 3 --- ...xml2argv-aarch64-virt-2.6-virtio-pci-default.args | 1 + ...uxml2argv-aarch64-virt-2.6-virtio-pci-default.xml | 1 - .../qemuxml2argv-aarch64-virt-default-nic.args | 1 + .../qemuxml2argv-aarch64-virt-default-nic.xml | 3 --- .../qemuxml2argv-aarch64-virt-virtio.args | 1 + .../qemuxml2argv-aarch64-virt-virtio.xml | 1 - .../qemuxml2argv-aarch64-virtio-pci-default.args | 1 + .../qemuxml2argv-aarch64-virtio-pci-default.xml | 1 - ...xml2argv-aarch64-virtio-pci-manual-addresses.args | 1 + ...uxml2argv-aarch64-virtio-pci-manual-addresses.xml | 1 - .../qemuxml2argv-balloon-mmio-deflate.args | 1 + .../qemuxml2argv-balloon-mmio-deflate.xml | 1 - .../qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml | 1 - .../qemuxml2xmlout-aarch64-video-virtio-gpu-pci.xml | 1 - .../qemuxml2xmlout-aarch64-virtio-pci-default.xml | 1 - ...ml2xmlout-aarch64-virtio-pci-manual-addresses.xml | 1 - 24 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 64d2d71..5cf383a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9324,18 +9324,16 @@ qemuBuildRedirdevCommandLine(virLogManagerPtr logManager, }
-static int +static void qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, - virDomainDefPtr def, - virQEMUCapsPtr qemuCaps) + virDomainDefPtr def) { - int ret = -1; virDomainLoaderDefPtr loader = def->os.loader; virBuffer buf = VIR_BUFFER_INITIALIZER; int unit = 0;
if (!loader) - return 0; + return;
switch ((virDomainLoader) loader->type) { case VIR_DOMAIN_LOADER_TYPE_ROM: @@ -9344,12 +9342,6 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, break;
case VIR_DOMAIN_LOADER_TYPE_PFLASH: - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_ACPI) && - def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("ACPI must be enabled in order to use UEFI")); - goto cleanup; - }
if (loader->secure == VIR_TRISTATE_BOOL_YES) { virCommandAddArgList(cmd, @@ -9387,10 +9379,7 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, break; }
- ret = 0; - cleanup: virBufferFreeAndReset(&buf); - return ret; }
@@ -9827,8 +9816,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildCpuCommandLine(cmd, driver, def, qemuCaps) < 0) goto error;
- if (qemuBuildDomainLoaderCommandLine(cmd, def, qemuCaps) < 0) - goto error; + qemuBuildDomainLoaderCommandLine(cmd, def);
if (!migrateURI && !snapshot && qemuDomainAlignMemorySizes(def) < 0) goto error; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 458bb5f..e41e8e4 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2884,6 +2884,26 @@ qemuDomainDefValidate(const virDomainDef *def, goto cleanup; }
+ /* On x86, UEFI requires ACPI */ + if (def->os.loader && + def->os.loader->type == VIR_DOMAIN_LOADER_TYPE_PFLASH && + ARCH_IS_X86(def->os.arch) && + def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("UEFI requires ACPI on this architecture")); + goto cleanup; + } + + /* On aarch64, ACPI requires UEFI */ + if (def->features[VIR_DOMAIN_FEATURE_ACPI] == VIR_TRISTATE_SWITCH_ON && + def->os.arch == VIR_ARCH_AARCH64 && + (!def->os.loader || + def->os.loader->type != VIR_DOMAIN_LOADER_TYPE_PFLASH)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ACPI requires UEFI on this architecture")); + return -1;
goto cleanup;
+ } +
So as I said in my last response to v1 - are you sure there couldn't be a guest running that now disappears because of this check? IOW should this move to post parse processing... ACK - if you're positive this won't affect the running guest causing it to disappear. John
if (def->os.loader && def->os.loader->secure == VIR_TRISTATE_BOOL_YES) { /* These are the QEMU implementation limitations. But we

On Wed, 2017-03-29 at 19:50 -0400, John Ferlan wrote: [...]
@@ -2884,6 +2884,26 @@ qemuDomainDefValidate(const virDomainDef *def, goto cleanup; } + /* On x86, UEFI requires ACPI */ + if (def->os.loader && + def->os.loader->type == VIR_DOMAIN_LOADER_TYPE_PFLASH && + ARCH_IS_X86(def->os.arch) && + def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("UEFI requires ACPI on this architecture")); + goto cleanup; + } + + /* On aarch64, ACPI requires UEFI */ + if (def->features[VIR_DOMAIN_FEATURE_ACPI] == VIR_TRISTATE_SWITCH_ON && + def->os.arch == VIR_ARCH_AARCH64 && + (!def->os.loader || + def->os.loader->type != VIR_DOMAIN_LOADER_TYPE_PFLASH)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ACPI requires UEFI on this architecture")); + return -1; goto cleanup;
Missed that when moving the code over, good catch :) [...]
So as I said in my last response to v1 - are you sure there couldn't be a guest running that now disappears because of this check? IOW should this move to post parse processing... ACK - if you're positive this won't affect the running guest causing it to disappear.
AIUI it's the other way around: PostParse() is called every time the XML is loaded, including daemon start / reload, so adding a new error condition there can cause existing guests to disappear. Validate() on the other hand is only called when creating, editing or starting guests, so having the check there will prevent users from misconfiguring guests but will also give them a chance to fix existing guests. As part of preparing this respin, I created a misconfigured guest and verified that it didn't disappear after starting a build of libvirt that included this patch, so I'll take your ACK :) -- Andrea Bolognani / Red Hat / Virtualization

On 03/30/2017 03:47 AM, Andrea Bolognani wrote:
On Wed, 2017-03-29 at 19:50 -0400, John Ferlan wrote: [...]
@@ -2884,6 +2884,26 @@ qemuDomainDefValidate(const virDomainDef *def, goto cleanup; }
+ /* On x86, UEFI requires ACPI */ + if (def->os.loader && + def->os.loader->type == VIR_DOMAIN_LOADER_TYPE_PFLASH && + ARCH_IS_X86(def->os.arch) && + def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("UEFI requires ACPI on this architecture")); + goto cleanup; + } + + /* On aarch64, ACPI requires UEFI */ + if (def->features[VIR_DOMAIN_FEATURE_ACPI] == VIR_TRISTATE_SWITCH_ON && + def->os.arch == VIR_ARCH_AARCH64 && + (!def->os.loader || + def->os.loader->type != VIR_DOMAIN_LOADER_TYPE_PFLASH)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ACPI requires UEFI on this architecture")); + return -1;
goto cleanup;
Missed that when moving the code over, good catch :)
[...]
So as I said in my last response to v1 - are you sure there couldn't be a guest running that now disappears because of this check?
IOW should this move to post parse processing...
ACK - if you're positive this won't affect the running guest causing it to disappear.
AIUI it's the other way around: PostParse() is called every time the XML is loaded, including daemon start / reload, so adding a new error condition there can cause existing guests to disappear.
Validate() on the other hand is only called when creating, editing or starting guests, so having the check there will prevent users from misconfiguring guests but will also give them a chance to fix existing guests.
Fair enough - I didn't have the processing committed to memory and the whole guest disappearing as a result of post processing or validation when moving checks to earlier from qemu_command is something that I know has caused issues in the past. I was being too lazy to "page back in" those algorithms ;-)
As part of preparing this respin, I created a misconfigured guest and verified that it didn't disappear after starting a build of libvirt that included this patch, so I'll take your ACK :)
Great - thanks John

Make sure every combination of ACPI and UEFI works, or fails to work, as expected. --- .../qemuxml2argv-aarch64-acpi-nouefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-aarch64-acpi-nouefi.xml | 22 +++++++++++++++++++++ .../qemuxml2argv-aarch64-acpi-uefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-aarch64-acpi-uefi.xml | 21 ++++++++++++++++++++ .../qemuxml2argv-aarch64-noacpi-nouefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-aarch64-noacpi-nouefi.xml | 19 ++++++++++++++++++ .../qemuxml2argv-aarch64-noacpi-uefi.args | 23 ++++++++++++++++++++++ .../qemuxml2argv-aarch64-noacpi-uefi.xml | 18 +++++++++++++++++ .../qemuxml2argv-q35-acpi-nouefi.args | 21 ++++++++++++++++++++ .../qemuxml2argv-q35-acpi-nouefi.xml | 22 +++++++++++++++++++++ .../qemuxml2argv-q35-acpi-uefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-q35-acpi-uefi.xml | 21 ++++++++++++++++++++ .../qemuxml2argv-q35-noacpi-nouefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-q35-noacpi-nouefi.xml | 19 ++++++++++++++++++ .../qemuxml2argv-q35-noacpi-uefi.xml | 18 +++++++++++++++++ tests/qemuxml2argvtest.c | 14 +++++++++++++ 16 files changed, 328 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-uefi.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.args new file mode 100644 index 0000000..5d9e1fb --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.args @@ -0,0 +1,22 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 \ +-name guest \ +-S \ +-M virt \ +-cpu host \ +-m 1024 \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \ +-boot c \ +-kernel /var/lib/libvirt/images/guest.vmlinux \ +-initrd /var/lib/libvirt/images/guest.initramfs \ +-append 'console=ttyAMA0 rw root=/dev/vda rootwait' diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.xml new file mode 100644 index 0000000..cda1b1b --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.xml @@ -0,0 +1,22 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <kernel>/var/lib/libvirt/images/guest.vmlinuz</kernel> + <initrd>/var/lib/libvirt/images/guest.initramfs</initrd> + <cmdline>console=ttyAMA0 rw root=/dev/vda rootwait</cmdline> + </os> + <features> + <acpi/> + </features> + <cpu mode='custom'> + <model>cortex-a57</model> + </cpu> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.args new file mode 100644 index 0000000..36371ba --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.args @@ -0,0 +1,22 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 \ +-name guest \ +-S \ +-M virt \ +-cpu cortex-a57 \ +-drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,\ +readonly=on \ +-drive file=/var/lib/libvirt/qemu/nvram/guest_VARS.fd,if=pflash,format=raw,\ +unit=1 \ +-m 1024 \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \ +-boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.xml new file mode 100644 index 0000000..5de2eb5 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.xml @@ -0,0 +1,21 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> + </os> + <features> + <acpi/> + </features> + <cpu mode='custom'> + <model>cortex-a57</model> + </cpu> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.args new file mode 100644 index 0000000..301eda8 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.args @@ -0,0 +1,22 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 \ +-name guest \ +-S \ +-M virt \ +-cpu cortex-a57 \ +-m 1024 \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \ +-no-acpi \ +-boot c \ +-kernel /var/lib/libvirt/images/guest.vmlinuz \ +-initrd /var/lib/libvirt/images/guest.initramfs \ +-append 'console=ttyAMA0 rw root=/dev/vda rootwait' diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.xml new file mode 100644 index 0000000..e8551ed --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.xml @@ -0,0 +1,19 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <kernel>/var/lib/libvirt/images/guest.vmlinuz</kernel> + <initrd>/var/lib/libvirt/images/guest.initramfs</initrd> + <cmdline>console=ttyAMA0 rw root=/dev/vda rootwait</cmdline> + </os> + <cpu mode='custom'> + <model>cortex-a57</model> + </cpu> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.args new file mode 100644 index 0000000..c62de75 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.args @@ -0,0 +1,23 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 \ +-name guest \ +-S \ +-M virt \ +-cpu cortex-a57 \ +-drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,\ +readonly=on \ +-drive file=/var/lib/libvirt/qemu/nvram/guest_VARS.fd,if=pflash,format=raw,\ +unit=1 \ +-m 1024 \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \ +-no-acpi \ +-boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.xml new file mode 100644 index 0000000..e66b805 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.xml @@ -0,0 +1,18 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> + </os> + <cpu mode='custom'> + <model>cortex-a57</model> + </cpu> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.args new file mode 100644 index 0000000..eea422d --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.args @@ -0,0 +1,21 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name guest \ +-S \ +-M q35 \ +-cpu Haswell \ +-m 1024 \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \ +-boot c \ +-kernel /var/lib/libvirt/images/guest.vmlinuz \ +-initrd /var/lib/libvirt/images/guest.initramfs \ +-append 'rw root=/dev/vda rootwait' diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.xml b/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.xml new file mode 100644 index 0000000..7d735f9 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.xml @@ -0,0 +1,22 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <kernel>/var/lib/libvirt/images/guest.vmlinuz</kernel> + <initrd>/var/lib/libvirt/images/guest.initramfs</initrd> + <cmdline>rw root=/dev/vda rootwait</cmdline> + </os> + <features> + <acpi/> + </features> + <cpu mode='custom'> + <model>Haswell</model> + </cpu> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.args new file mode 100644 index 0000000..9dfa583 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.args @@ -0,0 +1,22 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name guest \ +-S \ +-M q35 \ +-cpu Haswell \ +-drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,\ +readonly=on \ +-drive file=/var/lib/libvirt/qemu/nvram/guest_VARS.fd,if=pflash,format=raw,\ +unit=1 \ +-m 1024 \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \ +-boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.xml b/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.xml new file mode 100644 index 0000000..4eb5a46 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.xml @@ -0,0 +1,21 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> + </os> + <features> + <acpi/> + </features> + <cpu mode='custom'> + <model>Haswell</model> + </cpu> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.args new file mode 100644 index 0000000..ba0f59c --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.args @@ -0,0 +1,22 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name guest \ +-S \ +-M q35 \ +-cpu Haswell \ +-m 1024 \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \ +-no-acpi \ +-boot c \ +-kernel /var/lib/libvirt/images/guest.vmlinuz \ +-initrd /var/lib/libvirt/images/guest.initramfs \ +-append 'rw root=/dev/vda rootwait' diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.xml b/tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.xml new file mode 100644 index 0000000..163b424 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.xml @@ -0,0 +1,19 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <kernel>/var/lib/libvirt/images/guest.vmlinuz</kernel> + <initrd>/var/lib/libvirt/images/guest.initramfs</initrd> + <cmdline>rw root=/dev/vda rootwait</cmdline> + </os> + <cpu mode='custom'> + <model>Haswell</model> + </cpu> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-uefi.xml b/tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-uefi.xml new file mode 100644 index 0000000..91c83c8 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-uefi.xml @@ -0,0 +1,18 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> + </os> + <cpu mode='custom'> + <model>Haswell</model> + </cpu> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 731b793..ad68556 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -757,6 +757,13 @@ mymain(void) QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_MACHINE_SMM_OPT, QEMU_CAPS_VIRTIO_SCSI); + + /* Make sure all combinations of ACPI and UEFI behave as expected */ + DO_TEST("q35-acpi-uefi", NONE); + DO_TEST_PARSE_ERROR("q35-noacpi-uefi", NONE); + DO_TEST("q35-noacpi-nouefi", NONE); + DO_TEST("q35-acpi-nouefi", NONE); + DO_TEST("clock-utc", QEMU_CAPS_NODEFCONFIG); DO_TEST("clock-localtime", NONE); DO_TEST("clock-localtime-basis-localtime", QEMU_CAPS_RTC); @@ -2318,6 +2325,13 @@ mymain(void) DO_TEST_FAILURE("aarch64-kvm-32-on-64", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_KVM); + + /* Make sure all combinations of ACPI and UEFI behave as expected */ + DO_TEST("aarch64-acpi-uefi", NONE); + DO_TEST("aarch64-noacpi-uefi", NONE); + DO_TEST("aarch64-noacpi-nouefi", NONE); + DO_TEST_PARSE_ERROR("aarch64-acpi-nouefi", NONE); + qemuTestSetHostArch(driver.caps, VIR_ARCH_NONE); DO_TEST("kvm-pit-delay", QEMU_CAPS_KVM_PIT_TICK_POLICY); -- 2.7.4

On 03/29/2017 10:08 AM, Andrea Bolognani wrote:
Make sure every combination of ACPI and UEFI works, or fails to work, as expected. --- .../qemuxml2argv-aarch64-acpi-nouefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-aarch64-acpi-nouefi.xml | 22 +++++++++++++++++++++ .../qemuxml2argv-aarch64-acpi-uefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-aarch64-acpi-uefi.xml | 21 ++++++++++++++++++++ .../qemuxml2argv-aarch64-noacpi-nouefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-aarch64-noacpi-nouefi.xml | 19 ++++++++++++++++++ .../qemuxml2argv-aarch64-noacpi-uefi.args | 23 ++++++++++++++++++++++ .../qemuxml2argv-aarch64-noacpi-uefi.xml | 18 +++++++++++++++++ .../qemuxml2argv-q35-acpi-nouefi.args | 21 ++++++++++++++++++++ .../qemuxml2argv-q35-acpi-nouefi.xml | 22 +++++++++++++++++++++ .../qemuxml2argv-q35-acpi-uefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-q35-acpi-uefi.xml | 21 ++++++++++++++++++++ .../qemuxml2argv-q35-noacpi-nouefi.args | 22 +++++++++++++++++++++ .../qemuxml2argv-q35-noacpi-nouefi.xml | 19 ++++++++++++++++++ .../qemuxml2argv-q35-noacpi-uefi.xml | 18 +++++++++++++++++ tests/qemuxml2argvtest.c | 14 +++++++++++++ 16 files changed, 328 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-acpi-uefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-noacpi-uefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-acpi-uefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-nouefi.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-noacpi-uefi.xml
ACK John

Now that the NO_ACPI and NO_HPET capabilities are set automatically by virQEMUCapsInitQMPBasicArch() if appropriate for the architecture, they shouldn't be used manually to avoid masking bugs. --- tests/qemuxml2argvtest.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 731b793..5c0e1e8 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -762,9 +762,8 @@ mymain(void) DO_TEST("clock-localtime-basis-localtime", QEMU_CAPS_RTC); DO_TEST("clock-variable", QEMU_CAPS_RTC); DO_TEST("clock-france", QEMU_CAPS_RTC); - DO_TEST("clock-hpet-off", QEMU_CAPS_RTC, QEMU_CAPS_NO_HPET, - QEMU_CAPS_NO_KVM_PIT); - DO_TEST("clock-catchup", QEMU_CAPS_RTC, QEMU_CAPS_NO_KVM_PIT); + DO_TEST("clock-hpet-off", QEMU_CAPS_RTC); + DO_TEST("clock-catchup", QEMU_CAPS_RTC); DO_TEST("cpu-kvmclock", QEMU_CAPS_ENABLE_KVM); DO_TEST("cpu-host-kvmclock", QEMU_CAPS_ENABLE_KVM); DO_TEST("kvmclock", QEMU_CAPS_KVM); @@ -797,7 +796,7 @@ mymain(void) DO_TEST("pmu-feature-off", NONE); DO_TEST("hugepages", QEMU_CAPS_MEM_PATH); - DO_TEST("hugepages-numa", QEMU_CAPS_RTC, QEMU_CAPS_NO_KVM_PIT, + DO_TEST("hugepages-numa", QEMU_CAPS_RTC, QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -1990,7 +1989,6 @@ mymain(void) DO_TEST("q35-virt-manager-basic", QEMU_CAPS_KVM, QEMU_CAPS_RTC, - QEMU_CAPS_NO_KVM_PIT, QEMU_CAPS_ICH9_DISABLE_S3, QEMU_CAPS_ICH9_DISABLE_S4, QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY, @@ -2322,7 +2320,7 @@ mymain(void) DO_TEST("kvm-pit-delay", QEMU_CAPS_KVM_PIT_TICK_POLICY); DO_TEST("kvm-pit-discard", QEMU_CAPS_KVM_PIT_TICK_POLICY); - DO_TEST("no-kvm-pit-device", QEMU_CAPS_NO_KVM_PIT); + DO_TEST("no-kvm-pit-device", NONE); DO_TEST("panic", QEMU_CAPS_DEVICE_PANIC, QEMU_CAPS_NODEFCONFIG); -- 2.7.4

On 03/30/2017 08:48 AM, Andrea Bolognani wrote:
Now that the NO_ACPI and NO_HPET capabilities are set automatically by virQEMUCapsInitQMPBasicArch() if appropriate for the architecture, they shouldn't be used manually to avoid masking bugs. --- tests/qemuxml2argvtest.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
ACK (seems reasonable and answers the needle in the haystack for patch3) John
participants (3)
-
Andrea Bolognani
-
John Ferlan
-
Ján Tomko