target/arm: Fix functional test failures in KVM-only builds
cover target/arm: Fix functional test failures in KVM-only builds
If you build QEMU with --disable-tcg on an AArch64 system, some of the "make check-functional" tests fail. This patchset fixes them.
The first patch fixes a bug in QEMU proper, where we broke the "x-remote" machine because we forgot to mark it up as being OK to expose in the qemu-system-arm and qemu-system-aarch64 binaries, the way we do for "none" and for all the actual Arm machine types.
The rest are tweaks to the tests:
* tests that run '-machine virt,virtualization=on' need to check for failure because the machine reports that the hypervisor can't support nested virt
* tests that use a specific CPU type need to either be restricted to TCG-only, or else changed to use 'max' instead (since that's the only CPU that will work on both TCG and KVM)
thanks
-- PMM
Peter Maydell (6):
hw/remote/machine.c: Mark x-remote machine as OK for AArch64 and
AArch32
tests/functional/test_virt_vbsa: Skip UEFI test if virtualization not
supported
tests/functional/test_kvm.py: Use -cpu max, not cortex-a72 tests/functional/test_kvm.py: Skip if virtualization not supported tests/functional/test_hotplug_pci.py: Require TCG tests/functional/test_tuxrun: Restrict to TCG
hw/remote/machine.c | 3 +++ tests/functional/aarch64/test_hotplug_pci.py | 1 + tests/functional/aarch64/test_kvm.py | 12 ++++++++++-- tests/functional/aarch64/test_tuxrun.py | 2 ++ tests/functional/aarch64/test_virt_vbsa.py | 10 +++++++++- 5 files changed, 25 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/6 hw/remote/machine.c: Mark x-remote machine as OK for AArch64 and AArch32
When we updated Arm and AArch64 board types to mark them for the target_machine_typename() filter, we forgot about the "x-remote" machine type, which meant that it disappeared from the set of board types exposed on the qemu-system-arm and qemu-system-aarch64 binaries. We didn't notice this, because although we have a functional test for it, it requires the KVM accelerator and we don't run the functional tests on an AArch64 host in CI.
Mark the machine as being OK to expose in qemu-system-arm and qemu-system-aarch64, in the same way we do for the "none" machine type. This fixes a check-functional failure on aarch64 host, where it would otherwise fail with:
qemu-system-aarch64: unsupported machine type: "x-remote"
---
I couldn't figure out which git commit started enforcing the filtering of machine types based on the TARGET_FOO_MACHINE interface markings, so I picked the Fixes: commit hash for when we added them to the "none" machine, on the basis that that's the point at which we logically ought to have also done x-remote.
--- hw/remote/machine.c | 3 +++ 1 file changed, 3 insertions(+)
hw/remote/machine.c +3 -0
@@ -24,6 +24,7 @@#include "hw/core/qdev.h" #include "hw/remote/vfio-user-obj.h" #include "hw/pci/msi.h" +#include "hw/arm/machines-qom.h" static void remote_machine_init (MachineState *machine) {
@@ -148,6 +149,8 @@ static const TypeInfo remote_machine = { .class_init = remote_machine_class_init, .interfaces = (const InterfaceInfo []) { {TYPE_HOTPLUG_HANDLER }, + {TYPE_TARGET_AARCH64_MACHINE }, + {TYPE_TARGET_ARM_MACHINE }, { } } };
Signature · 1 line
2.43.0
Re: [PATCH 1/6] hw/remote/machine.c: Mark x-remote machine as OK for AArch64 and AArch32
Quoted 17 lines · Peter Maydell
When we updated Arm and AArch64 board types to mark them for the
target_machine_typename()filter, we forgot about the "x-remote" machine type, which meant that it disappeared from the set of board types exposed on the qemu-system-arm and qemu-system-aarch64 binaries. We didn't notice this, because although we have a functional test for it, it requires the KVM accelerator and we don't run the functional tests on an AArch64 host in CI.Mark the machine as being OK to expose in qemu-system-arm and qemu-system-aarch64, in the same way we do for the "none" machine type. This fixes a check-functional failure on aarch64 host, where it would otherwise fail with:
qemu-system-aarch64: unsupported machine type: "x-remote"Fixes eb796c55513d9d39 ("hw/core: Allow ARM/Aarch64 binaries to use the 'none' machine")Signed-off-by Peter Maydell <[email protected]>
Quoted 6 lines
---
I couldn't figure out which git commit started enforcing the filtering of machine types based on theTARGET_FOO_MACHINEinterface markings, so I picked the Fixes: commit hash for when we added them to the "none" machine, on the basis that that's the point at which we logically ought to have also done x-remote.
Preliminary filtering commits:
28502121be7 ("system/vl: Filter machine list available for a particular target binary") 2c6fab1c143 ("hw/core: Filter machine list available for a particular target binary")
Re: [PATCH 1/6] hw/remote/machine.c: Mark x-remote machine as OK for AArch64 and AArch32
In reply to Peter Maydell+Stefan
Quoted 6 lines · Peter Maydell
When we updated Arm and AArch64 board types to mark them for the
target_machine_typename()filter, we forgot about the "x-remote" machine type, which meant that it disappeared from the set of board types exposed on the qemu-system-arm and qemu-system-aarch64 binaries. We didn't notice this, because although we have a functional test for it, it requires the KVM accelerator and we don't
I don't remember why it requires KVM.
$ git grep -i kvm hw/remote/ hw/remote/Kconfig:3: depends on PCI && PCI_EXPRESS && KVM hw/remote/proxy.c:36: kvm_irqchip_remove_irqfd_notifier_gsi(kvm_state, &dev->intr, dev->virq); hw/remote/proxy.c:45: kvm_irqchip_add_irqfd_notifier_gsi(kvm_state, &dev->intr,
I suppose these 2 calls should be replaced by generic equivalents:
- accel_irqchip_remove_irqfd_notifier_gsi()
- accel_irqchip_add_irqfd_notifier_gsi()
Quoted 3 lines
run the functional tests on an AArch64 host in CI.
Mark the machine as being OK to expose in qemu-system-arm and
Otherwise if it is tied to KVM, we removed support for 32-bit ARM KVM in commit 82bf7ae84ce; ...
Quoted 31 lines
qemu-system-aarch64, in the same way we do for the "none" machine type. This fixes a check-functional failure on aarch64 host, where it would otherwise fail with:
qemu-system-aarch64: unsupported machine type: "x-remote"Fixes eb796c55513d9d39 ("hw/core: Allow ARM/Aarch64 binaries to use the 'none' machine")Signed-off-by Peter Maydell <[email protected]>---
I couldn't figure out which git commit started enforcing the filtering of machine types based on theTARGET_FOO_MACHINEinterface markings, so I picked the Fixes: commit hash for when we added them to the "none" machine, on the basis that that's the point at which we logically ought to have also done x-remote.--- hw/remote/machine.c | 3 +++ 1 file changed, 3 insertions(+)hw/remote/machine.c +1
-0@@ -24,6 +24,7 @@#include "hw/core/qdev.h" #include "hw/remote/vfio-user-obj.h" #include "hw/pci/msi.h" +#include "hw/arm/machines-qom.h" static void remote_machine_init (MachineState *machine) {
hw/remote/machine.c static const TypeInfo remote_machine = { · line 153
Quoted 5 lines
hw/remote/machine.c +2
-0@@ -148,6 +149,8 @@ static const TypeInfo remote_machine = { .class_init = remote_machine_class_init, .interfaces = (const InterfaceInfo []) { {TYPE_HOTPLUG_HANDLER }, + {TYPE_TARGET_AARCH64_MACHINE }, + {TYPE_TARGET_ARM_MACHINE },
... so exposing this machine on 32-bit host binary doesn't look right.
Quoted 3 lines
hw/remote/machine.c +0
-0{ } } };
Re: [PATCH 1/6] hw/remote/machine.c: Mark x-remote machine as OK for AArch64 and AArch32
Quoted 61 lines · Philippe Mathieu-Daudé
+Stefan
Quoted 6 lines · Peter Maydell
When we updated Arm and AArch64 board types to mark them for the
target_machine_typename()filter, we forgot about the "x-remote" machine type, which meant that it disappeared from the set of board types exposed on the qemu-system-arm and qemu-system-aarch64 binaries. We didn't notice this, because although we have a functional test for it, it requires the KVM accelerator and we don'tI don't remember why it requires KVM.
$ git grep -i kvm hw/remote/ hw/remote/Kconfig:3: depends on PCI && PCI_EXPRESS && KVM hw/remote/proxy.c:36: kvm_irqchip_remove_irqfd_notifier_gsi(kvm_state, &dev->intr, dev->virq); hw/remote/proxy.c:45: kvm_irqchip_add_irqfd_notifier_gsi(kvm_state, &dev->intr,I suppose these 2 calls should be replaced by generic equivalents:
-accel_irqchip_remove_irqfd_notifier_gsi()
-accel_irqchip_add_irqfd_notifier_gsi()Quoted 3 lines
run the functional tests on an AArch64 host in CI.
Mark the machine as being OK to expose in qemu-system-arm and
Otherwise if it is tied to KVM, we removed support for 32-bit ARM KVM in commit
82bf7ae84ce; ...Quoted 31 lines
qemu-system-aarch64, in the same way we do for the "none" machine type. This fixes a check-functional failure on aarch64 host, where it would otherwise fail with:
qemu-system-aarch64: unsupported machine type: "x-remote"Fixes eb796c55513d9d39 ("hw/core: Allow ARM/Aarch64 binaries to usethe 'none' machine")
Signed-off-by Peter Maydell <[email protected]>---
I couldn't figure out which git commit started enforcing the filtering of machine types based on theTARGET_FOO_MACHINEinterface markings, so I picked the Fixes: commit hash for when we added them to the "none" machine, on the basis that that's the point at which we logically ought to have also done x-remote.
---
hw/remote/machine.c| 3 +++1 file changed, 3 insertions(+)hw/remote/machine.c +1
-0@@ -24,6 +24,7 @@ #include "hw/core/qdev.h" #include "hw/remote/vfio-user-obj.h" #include "hw/pci/msi.h" +#include "hw/arm/machines-qom.h" static void remote_machine_init(MachineState *machine) {@@ -148,6 +149,8 @@ static const TypeInfo remote_machine = {
Quoted 9 lines
hw/remote/machine.c static const TypeInfo remote_machine = { · line 153
Quoted 5 lines
hw/remote/machine.c +2
-0.class_init = remote_machine_class_init, .interfaces = (const InterfaceInfo[]) { { TYPE_HOTPLUG_HANDLER }, + { TYPE_TARGET_AARCH64_MACHINE }, + { TYPE_TARGET_ARM_MACHINE },... so exposing this machine on 32-bit host binary doesn't look right.
I noticed that and fix it in the upcoming series for single-binary.
Quoted 4 lines
Quoted 3 lines
hw/remote/machine.c +0
-0{ } } };
Re: [PATCH 1/6] hw/remote/machine.c: Mark x-remote machine as OK for AArch64 and AArch32
In reply to Philippe Mathieu-DaudéQuoted 19 lines · Philippe Mathieu-Daudé
+Stefan
Quoted 6 lines · Peter Maydell
When we updated Arm and AArch64 board types to mark them for the
target_machine_typename()filter, we forgot about the "x-remote" machine type, which meant that it disappeared from the set of board types exposed on the qemu-system-arm and qemu-system-aarch64 binaries. We didn't notice this, because although we have a functional test for it, it requires the KVM accelerator and we don'tI don't remember why it requires KVM.
$ git grep -i kvm hw/remote/ hw/remote/Kconfig:3: depends on PCI && PCI_EXPRESS && KVM hw/remote/proxy.c:36: kvm_irqchip_remove_irqfd_notifier_gsi(kvm_state, &dev->intr, dev->virq); hw/remote/proxy.c:45: kvm_irqchip_add_irqfd_notifier_gsi(kvm_state, &dev->intr,
Quoted 3 lines
I suppose these 2 calls should be replaced by generic equivalents:
-accel_irqchip_remove_irqfd_notifier_gsi()
-accel_irqchip_add_irqfd_notifier_gsi()
The generic functions call into KVM or MSHV or return -ENOSYS if neither are available in. While QEMU will compile, x-remote won't work at runtime.
If someone wants to make x-remote actually work at runtime without KVM then that should be possible too: set up an EventNotifier that handles interrupt requests from the remote process and invokes QEMU's internal irq APIs to inject them into the guest. There may already be code to do that somewhere or, if not, it shouldn't be hard to write.
Stefan
PATCH 2/6 tests/functional/test_virt_vbsa: Skip UEFI test if virtualization not supported
In reply to Peter MaydellIf you try to run the functional tests on an AArch64 host which doesn't support nested virtualization in KVM, the UEFI test fails with:
Output: qemu-system-aarch64: mach-virt: host kernel KVM does not support providing Virtualization extensions to the guest CPU
Catch the VMLaunchFailure exception and if it matches the error messages the virt board puts out for virtualization not being supported, skip the test.
--- tests/functional/aarch64/test_virt_vbsa.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
tests/functional/aarch64/test_virt_vbsa.py +9 -1
@@ -17,6 +17,7 @@ from qemu_test import get_qemu_img, skipIfMissingCommands from qemu_test import wait_for_console_pattern from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait +from qemu.machine.machine import VMLaunchFailure @skipIfMissingCommands("mformat", "mcopy", "mmd")
@@ -96,7 +97,14 @@ def test_aarch64_vbsa_uefi_tests(self): f'file={img_path},format=raw,if=none,id=drive0') self.vm.add_args('-device', 'virtio-blk-pci,drive=drive0') - self.vm.launch() + try: + self.vm.launch() + except VMLaunchFailure as excp: + if "does not support providing Virtualization" in excp.output: + self.skipTest("accelerator has no virtualization support") + else: + self.log.info("unhandled launch failure: %s", excp.output) + raise excp # wait for EFI prompt self.wait_for_console_pattern('Shell>')
Signature · 1 line
2.43.0
Re: [PATCH 2/6] tests/functional/test_virt_vbsa: Skip UEFI test if virtualization not supported
Quoted 6 lines · Peter Maydell
If you try to run the functional tests on an AArch64 host which doesn't support nested virtualization in KVM, the UEFI test fails with:
Output: qemu-system-aarch64: mach-virt: host kernel KVM does not support providing Virtualization extensions to the guest CPU
Quoted 8 lines
Catch the VMLaunchFailure exception and if it matches the error messages the virt board puts out for virtualization not being supported, skip the test.
Signed-off-by Peter Maydell <[email protected]>--- tests/functional/aarch64/test_virt_vbsa.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
PATCH 3/6 tests/functional/test_kvm.py: Use -cpu max, not cortex-a72
In reply to Peter MaydellThe test_kvm test claims to run on any accelerator supporting nested virtualization, but it specifies the cortex-a72 CPU. This doesn't exist for KVM-only builds. Use max instead.
This fixes a failure like
Output: qemu-system-aarch64: unable to find CPU model 'cortex-a72'
--- tests/functional/aarch64/test_kvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/functional/aarch64/test_kvm.py +1 -1
@@ -38,7 +38,7 @@ def _launch_guest(self, kvm_mode="nvhe"): kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + f"console=ttyAMA0 kvm-arm.mode={kvm_mode}") - self.vm.add_args("-cpu", "cortex-a72") + self.vm.add_args("-cpu", "max") self.vm.add_args("-machine", "virt,gic-version=3,virtualization=on", '-kernel', kernel_path, '-append', kernel_command_line)
Signature · 1 line
2.43.0
Re: [PATCH 3/6] tests/functional/test_kvm.py: Use -cpu max, not cortex-a72
Quoted 11 lines · Peter Maydell
The
test_kvmtest claims to run on any accelerator supporting nested virtualization, but it specifies the cortex-a72 CPU. This doesn't exist for KVM-only builds. Use max instead.This fixes a failure like
Output: qemu-system-aarch64: unable to find CPU model 'cortex-a72'Signed-off-by Peter Maydell <[email protected]>--- tests/functional/aarch64/test_kvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Re: [PATCH 3/6] tests/functional/test_kvm.py: Use -cpu max, not cortex-a72
In reply to Peter MaydellQuoted 17 lines · Peter Maydell
The
test_kvmtest claims to run on any accelerator supporting nested virtualization, but it specifies the cortex-a72 CPU. This doesn't exist for KVM-only builds. Use max instead.This fixes a failure like
Output: qemu-system-aarch64: unable to find CPU model 'cortex-a72'Signed-off-by Peter Maydell <[email protected]>--- tests/functional/aarch64/test_kvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/functional/aarch64/test_kvm.py +0
-0
tests/functional/aarch64/test_kvm.py def _launch_guest(self, kvm_mode="nvhe"): · line 44
Quoted 8 lines
tests/functional/aarch64/test_kvm.py +1
-1@@ -38,7 +38,7 @@ def _launch_guest(self, kvm_mode="nvhe"): kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + f"console=ttyAMA0 kvm-arm.mode={kvm_mode}") - self.vm.add_args("-cpu", "cortex-a72") + self.vm.add_args("-cpu", "max") self.vm.add_args("-machine", "virt,gic-version=3,virtualization=on", '-kernel', kernel_path, '-append', kernel_command_line)
r~
PATCH 4/6 tests/functional/test_kvm.py: Skip if virtualization not supported
In reply to Peter MaydellThe test_kvm test runs the virt board with virtualization=on, which will fail if run with an accelerator that doesn't support nested virtualization. Catch the VMLaunchFailure exception and skip the test if startup failed because the accelerator can't support virtualization.
--- tests/functional/aarch64/test_kvm.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
tests/functional/aarch64/test_kvm.py +9 -1
@@ -14,6 +14,7 @@ from qemu_test import Asset from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait from qemu_test.linuxkernel import LinuxKernelTest +from qemu.machine.machine import VMLaunchFailure class Aarch64VirtKVMTests(LinuxKernelTest):
@@ -44,7 +45,14 @@ def _launch_guest(self, kvm_mode="nvhe"): '-append', kernel_command_line) self.vm.add_args("-smp", "2", "-m", "320") - self.vm.launch() + try: + self.vm.launch() + except VMLaunchFailure as excp: + if "does not support providing Virtualization" in excp.output: + self.skipTest("accelerator has no virtualization support") + else: + self.log.info("unhandled launch failure: %s", excp.output) + raise excp self.wait_for_console_pattern('buildroot login:') ec_and_wait(self, 'root', '#')
Signature · 1 line
2.43.0
Re: [PATCH 4/6] tests/functional/test_kvm.py: Skip if virtualization not supported
Quoted 10 lines · Peter Maydell
The
test_kvmtest runs the virt board with virtualization=on, which will fail if run with an accelerator that doesn't support nested virtualization. Catch the VMLaunchFailure exception and skip the test if startup failed because the accelerator can't support virtualization.Signed-off-by Peter Maydell <[email protected]>--- tests/functional/aarch64/test_kvm.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
Re: [PATCH 4/6] tests/functional/test_kvm.py: Skip if virtualization not supported
In reply to Peter MaydellQuoted 29 lines · Peter Maydell
The
test_kvmtest runs the virt board with virtualization=on, which will fail if run with an accelerator that doesn't support nested virtualization. Catch the VMLaunchFailure exception and skip the test if startup failed because the accelerator can't support virtualization.Signed-off-by Peter Maydell <[email protected]>--- tests/functional/aarch64/test_kvm.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)tests/functional/aarch64/test_kvm.py +2
-1@@ -14,6 +14,7 @@ from qemu_test import Asset from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait from qemu_test.linuxkernel import LinuxKernelTest +from qemu.machine.machine import VMLaunchFailure class Aarch64VirtKVMTests(LinuxKernelTest):@@ -44,7 +45,14 @@ def _launch_guest(self, kvm_mode="nvhe"): '-append', kernel_command_line) self.vm.add_args("-smp", "2", "-m", "320") - self.vm.launch() + try:
tests/functional/aarch64/test_kvm.py def _launch_guest(self, kvm_mode="nvhe"): · line 58
Quoted 10 lines
tests/functional/aarch64/test_kvm.py +7
-0+ self.vm.launch() + except VMLaunchFailure as excp: + if "does not support providing Virtualization" in excp.output: + self.skipTest("accelerator has no virtualization support") + else: + self.log.info("unhandled launch failure: %s", excp.output) + raise excp self.wait_for_console_pattern('buildroot login:') ec_and_wait(self, 'root', '#')
r~
PATCH 5/6 tests/functional/test_hotplug_pci.py: Require TCG
In reply to Peter MaydellThe hotplug test asks for the cortex-a57 CPU type, so it will fail on an AArch64 system using KVM where TCG is not compiled into QEMU and the default accelerator is KVM:
Output: qemu-system-aarch64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument
Restrict it to the TCG accelerator.
--- tests/functional/aarch64/test_hotplug_pci.py | 1 + 1 file changed, 1 insertion(+)
tests/functional/aarch64/test_hotplug_pci.py +1 -0
@@ -27,6 +27,7 @@ class HotplugPCI(LinuxKernelTest): def test_hotplug_pci(self): self.set_machine('virt') + self.require_accelerator('tcg') self.vm.add_args('-m', '512M', '-cpu', 'cortex-a57',
Signature · 1 line
2.43.0
Re: [PATCH 5/6] tests/functional/test_hotplug_pci.py: Require TCG
Quoted 4 lines · Peter Maydell
The hotplug test asks for the cortex-a57 CPU type, so it will fail on an AArch64 system using KVM where TCG is not compiled into QEMU and the default accelerator is KVM:
Quoted 8 lines
Output: qemu-system-aarch64:
kvm_init_vcpu:kvm_arch_init_vcpufailed (0): Invalid argumentRestrict it to the TCG accelerator.
Signed-off-by Peter Maydell <[email protected]>--- tests/functional/aarch64/test_hotplug_pci.py | 1 + 1 file changed, 1 insertion(+)
Re: [PATCH 5/6] tests/functional/test_hotplug_pci.py: Require TCG
In reply to Peter MaydellQuoted 18 lines · Peter Maydell
The hotplug test asks for the cortex-a57 CPU type, so it will fail on an AArch64 system using KVM where TCG is not compiled into QEMU and the default accelerator is KVM:
Output: qemu-system-aarch64:
kvm_init_vcpu:kvm_arch_init_vcpufailed (0): Invalid argumentRestrict it to the TCG accelerator.
Signed-off-by Peter Maydell <[email protected]>--- tests/functional/aarch64/test_hotplug_pci.py | 1 + 1 file changed, 1 insertion(+)tests/functional/aarch64/test_hotplug_pci.py +0
-0
tests/functional/aarch64/test_hotplug_pci.py class HotplugPCI(LinuxKernelTest): · line 33
Quoted 7 lines
tests/functional/aarch64/test_hotplug_pci.py +1
-0@@ -27,6 +27,7 @@ class HotplugPCI(LinuxKernelTest): def test_hotplug_pci(self): self.set_machine('virt') + self.require_accelerator('tcg') self.vm.add_args('-m', '512M', '-cpu', 'cortex-a57',
r~
PATCH 6/6 tests/functional/test_tuxrun: Restrict to TCG
In reply to Peter MaydellThe tuxrun tests specify the cortex-a57 CPU; this doesn't work on a
KVM-only QEMU build, where the default accelerator is KVM but KVM
doesn't support that CPU type. Restrict the test to TCG, to avoid
failures on KVM-only AArch64 builds:
Output: qemu-system-aarch64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument
--- tests/functional/aarch64/test_tuxrun.py | 2 ++ 1 file changed, 2 insertions(+)
tests/functional/aarch64/test_tuxrun.py +2 -0
@@ -25,6 +25,7 @@ class TuxRunAarch64Test(TuxRunBaselineTest): def test_arm64(self): self.set_machine('virt') + self.require_accelerator('tcg') self.cpu='cortex-a57' self.console='ttyAMA0' self.wait_for_shutdown=False
@@ -40,6 +41,7 @@ def test_arm64(self): def test_arm64be(self): self.set_machine('virt') + self.require_accelerator('tcg') self.cpu='cortex-a57' self.console='ttyAMA0' self.wait_for_shutdown=False
Signature · 1 line
2.43.0
Re: [PATCH 6/6] tests/functional/test_tuxrun: Restrict to TCG
Quoted 10 lines · Peter Maydell
The tuxrun tests specify the cortex-a57 CPU; this doesn't work on a
KVM-only QEMU build, where the default accelerator is KVM but KVM
doesn't support that CPU type. Restrict the test to TCG, to avoid
failures on KVM-only AArch64 builds:
Output: qemu-system-aarch64:kvm_init_vcpu:kvm_arch_init_vcpufailed (0): Invalid argumentSigned-off-by Peter Maydell <[email protected]>--- tests/functional/aarch64/test_tuxrun.py | 2 ++ 1 file changed, 2 insertions(+)
Re: [PATCH 6/6] tests/functional/test_tuxrun: Restrict to TCG
In reply to Peter MaydellQuoted 24 lines · Peter Maydell
The tuxrun tests specify the cortex-a57 CPU; this doesn't work on a
KVM-only QEMU build, where the default accelerator is KVM but KVM
doesn't support that CPU type. Restrict the test to TCG, to avoid
failures on KVM-only AArch64 builds:
Output: qemu-system-aarch64:kvm_init_vcpu:kvm_arch_init_vcpufailed (0): Invalid argumentSigned-off-by Peter Maydell <[email protected]>--- tests/functional/aarch64/test_tuxrun.py | 2 ++ 1 file changed, 2 insertions(+)tests/functional/aarch64/test_tuxrun.py +1
-0@@ -25,6 +25,7 @@ class TuxRunAarch64Test(TuxRunBaselineTest): def test_arm64(self): self.set_machine('virt') + self.require_accelerator('tcg') self.cpu='cortex-a57' self.console='ttyAMA0' self.wait_for_shutdown=False
tests/functional/aarch64/test_tuxrun.py def test_arm64(self): · line 47
Quoted 7 lines
tests/functional/aarch64/test_tuxrun.py +1
-0@@ -40,6 +41,7 @@ def test_arm64(self): def test_arm64be(self): self.set_machine('virt') + self.require_accelerator('tcg') self.cpu='cortex-a57' self.console='ttyAMA0' self.wait_for_shutdown=False
r~
Quoted 30 lines · Peter Maydell
If you build QEMU with --disable-tcg on an AArch64 system, some of the "make check-functional" tests fail. This patchset fixes them.
The first patch fixes a bug in QEMU proper, where we broke the "x-remote" machine because we forgot to mark it up as being OK to expose in the qemu-system-arm and qemu-system-aarch64 binaries, the way we do for "none" and for all the actual Arm machine types.
The rest are tweaks to the tests:
* tests that run '-machine virt,virtualization=on' need to check for failure because the machine reports that the hypervisor can't support nested virt
* tests that use a specific CPU type need to either be restricted to TCG-only, or else changed to use 'max' instead (since that's the only CPU that will work on both TCG and KVM)thanks
-- PMMPeter Maydell (6):
hw/remote/machine.c: Mark x-remote machine as OK for AArch64 andAArch32tests/functional/test_virt_vbsa: Skip UEFI test if virtualization not
supported
tests/functional/test_kvm.py: Use -cpu max, not cortex-a72tests/functional/test_kvm.py: Skip if virtualization not supportedtests/functional/test_hotplug_pci.py: Require TCG tests/functional/test_tuxrun: Restrict to TCG
Quoted 7 lines
hw/remote/machine.c | 3 +++ tests/functional/aarch64/test_hotplug_pci.py | 1 + tests/functional/aarch64/test_kvm.py | 12 ++++++++++-- tests/functional/aarch64/test_tuxrun.py | 2 ++ tests/functional/aarch64/test_virt_vbsa.py | 10 +++++++++- 5 files changed, 25 insertions(+), 3 deletions(-)
For series: