From 7bcc5930a66ed8d6ba692a2463547d17390531e7 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 6 Jul 2022 17:28:58 +1000 Subject: Invoke specific qemu-system-* binaries A lot of tests and examples invoke qemu with the command "kvm". However, as far as I can tell, "kvm" being aliased to the appropriate qemu system binary is Debian specific. The binary names from qemu upstream - qemu-system-$ARCH - also aren't universal, but they are more common (they should be good for both Debian and Fedora at least). In order to still get KVM acceleration when available, we use the option "-M accel=kvm:tcg" to tell qemu to try using either KVM or TCG in that order A number of the places we invoked "kvm" are expecting specifically an x86 guest, and so it's also safer to explicitly invoke qemu-system-x86_64. Some others appear to be independent of the target arch (just wanting the same arch as the host to allow KVM acceleration). Although I suspect there may be more subtle x86 specific options in the qemu command lines, attempt to preserve arch independence by using $(uname -m). Signed-off-by: David Gibson --- test/demo/passt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/demo') diff --git a/test/demo/passt b/test/demo/passt index 7c69e94..b67ed26 100644 --- a/test/demo/passt +++ b/test/demo/passt @@ -103,7 +103,7 @@ nl say back-end to passt's UNIX domain socket. sleep 2 hout VMLINUZ echo "/boot/vmlinuz-$(uname -r)" -guest ../passt/qrap 5 kvm -m 4096 -cpu host -smp 4 -kernel __VMLINUZ__ -initrd passt.img -nographic -serial stdio -nodefaults -append "console=ttyS0 virtio-net.napi_tx=1" -device virtio-net-pci,netdev=hostnet0,x-txburst=16384 -netdev socket,fd=5,id=hostnet0 +guest ../passt/qrap 5 qemu-system-x86_64 -enable-kvm -m 4096 -cpu host -smp 4 -kernel __VMLINUZ__ -initrd passt.img -nographic -serial stdio -nodefaults -append "console=ttyS0 virtio-net.napi_tx=1" -device virtio-net-pci,netdev=hostnet0,x-txburst=16384 -netdev socket,fd=5,id=hostnet0 sleep 10 nl -- cgit v1.2.3