[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-discuss] Booting a QEMU instance within a QEMU instance using KVM
[Qemu-discuss] Booting a QEMU instance within a QEMU instance using KVM doesn't work
Tue, 5 Feb 2019 03:21:16 +0000
I am trying to show that KVM is working by booting a guest QEMU instance within
a host QEMU instance using KVM. To provide context, the host QEMU is
translating x86 to aarch64, while the guest QEMU is translating aarch 64 to
aarch64, so is a candidate for KVM acceleration. I’m using QEMU 3.1.0 with the
xlnx-versal-virt machine model for both the host and the guest since this is
the only QEMU version + machine model combination that I’ve found that
successfully initializes the KVM hypervisor (shown below). In addition, both
the host and the guest are using a Debian 4.9.130-2 kernel and a
Yocto-generated rootfs. Here is the command I use to launch the host QEMU
qemu-system-aarch64 -M xlnx-versal-virt -m 2048 -cpu cortex-a53 -kernel
vmlinuz-4.9.0-8-arm64 -initrd new_rootfs.cpio.gz -nographic -D
After the host QEMU boots, here is the dmesg output regarding KVM:
[ 12.058077] kvm : HYP VA range: 800000000000:ffffffffffff
[ 12.061797] kvm : Hyp mode initialized successfully
In addition, /dev/kvm exists and I’m operating as root, so that’s good.
However, when I do lsmod, I get an empty output, which is a concern. Anyway,
this is the command I used to boot the guest QEMU instance with KVM
acceleration within the host QEMU:
qemu-system-aarch64 -M xlnx-versal-virt -m 1024 -cpu cortex-a53 -kernel
vmlinuz-4.9.0-8-arm64 -initrd new_rootfs.cpio.gz -accel kvm -enable-kvm
-nographic -D "./qemu_debug.txt"
However, this is the error that I get:
cpu_address_space_init: Assertion `asidx == 0 || !kvm_enabled()' failed.
[ 2083.334829] audit: type=1701 audit(1549051290.640:2): auid=4294967295 uid=0
gid=0 ses=4294967295 pid=153 comm="qemu-system-aar"
./boot_qemu.sh: line 8: 153 Aborted qemu-system-aarch64 -M
xlnx-versal-virt -m 1024 -cpu cortex-a53 -kernel vmlinuz-4.9.0-8-arm64 -initrd
new_rootfs.cpio.gz -accel kvm -enable-kvm -nographic -D "./qemu_debug.txt"
Any help would be appreciated. I’m happy to answer questions as well.
- [Qemu-discuss] Booting a QEMU instance within a QEMU instance using KVM doesn't work,
Kaushik Datta <=