* Running x86 hypervisors inside QEMU x86 TCG outer guest?
@ 2024-03-12 12:34 Edgar E. Iglesias
0 siblings, 0 replies; only message in thread
From: Edgar E. Iglesias @ 2024-03-12 12:34 UTC (permalink / raw)
To: Paolo Bonzini, Richard Henderson, Eduardo Habkost; +Cc: qemu-devel
Hi!
I'm trying to figure out if QEMU supports running x86 hypervisors (KVM and Xen) inside emulated (TCG) x86_64 guests.
I.e, using TCG emulated x86 hardware virtualization (Intel VMX/EPT or AMD SVM/NPT).
So far, I've been able to run nested x86 KVM when the host is on KVM but no luck with TCG.
With intel TCG cores kvm-ok in the guest says there's no KVM support.
With AMD TCG cores, kvm-ok looks fine but as soon as I try to run a guest, it doesn't run anything.
Am I doing something wrong or is this expected?
Some of the command-lines I've tried:
This is the command-line I use for AMD like outer TCG guest:
${QEMU} -M q35,accel=tcg -m 6G \
-cpu "EPYC-Rome-v2" \
-smp 1 \
-display none \
-serial mon:stdio \
-kernel ubuntu-23.10-server-cloudimg-amd64-vmlinuz-generic \
-append "root=/dev/sda1 console=ttyS0 intel_iommu=on" \
-initrd ubuntu-23.10-server-cloudimg-amd64-initrd-generic \
-device intel-iommu,intremap=on,device-iotlb=on \
-device virtio-net-pci,netdev=net0,romfile="" \
-netdev type=user,id=net0,hostfwd=tcp::2228-:22 \
-drive file=ubuntu-23.10-server-cloudimg-amd64.img \
-drive file=cloudimg-user-data.img,format=raw,snapshot=yes \
-drive file=hd.qcow2 \
$*
This is the one for Intel TCG guests:
${QEMU} -M q35,accel=tcg -m 6G \
-cpu "Haswell,vmx=on" \
-smp 1 \
-display none \
-serial mon:stdio \
-kernel ubuntu-23.10-server-cloudimg-amd64-vmlinuz-generic \
-append "root=/dev/sda1 console=ttyS0 intel_iommu=on" \
-initrd ubuntu-23.10-server-cloudimg-amd64-initrd-generic \
-device intel-iommu,intremap=on,device-iotlb=on \
-device virtio-net-pci,netdev=net0,romfile="" \
-netdev type=user,id=net0,hostfwd=tcp::2228-:22 \
-drive file=ubuntu-23.10-server-cloudimg-amd64.img \
-drive file=cloudimg-user-data.img,format=raw,snapshot=yes \
-drive file=hd.qcow2 \
$*
This is the one that works (nested KVM):
${QEMU} -M q35,accel=kvm,kernel-irqchip=split -m 6G \
-cpu host \
-smp 1 \
-display none \
-serial mon:stdio \
-kernel ubuntu-23.10-server-cloudimg-amd64-vmlinuz-generic \
-append "root=/dev/sda1 console=ttyS0 intel_iommu=on" \
-initrd ubuntu-23.10-server-cloudimg-amd64-initrd-generic \
-device intel-iommu,intremap=on,device-iotlb=on \
-device virtio-net-pci,netdev=net0,romfile="" \
-netdev type=user,id=net0,hostfwd=tcp::2228-:22 \
-drive file=ubuntu-23.10-server-cloudimg-amd64.img \
-drive file=cloudimg-user-data.img,format=raw,snapshot=yes \
-drive file=hd.qcow2 \
$*
Best regards,
Edgar
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-12 12:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 12:34 Running x86 hypervisors inside QEMU x86 TCG outer guest? Edgar E. Iglesias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).