[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does QEMU TCG mode support running KVM inside the VM?

From: Alex Bennée
Subject: Re: Does QEMU TCG mode support running KVM inside the VM?
Date: Thu, 04 Aug 2022 10:38:58 +0100
User-agent: mu4e 1.7.27; emacs 28.1.91

Kaifeng Xu <kaifengx@princeton.edu> writes:

> Hi folks,
> I am curious does whether QEMU TCG mode emulation support the VM to run KVM 
> inside? I tried to run VM inside the
> QEMU VM, i.e. running L2 VM inside L1 VM on a host machine. This is not about 
> enabling KVM for running QEMU KVM
> mode, I am working on the TCG mode to get some tracing, so I am focusing on 
> whether TCG mode supports running KVM
> in the VM. I tried to launch another VM (L2 VM) inside the QEMU by KVM (the 
> KVM is running in L1 VM), but it gets stuck at
> some point and was only able to launch into the maintenance mode in
> the L2 VM,

Conceptually yes (for example we have tested non-VHE and VHE KVMs for
ARM inside a TCG emulation).

> I got some warning about "TCG doesn't support requested feature: 
> CPUID.01H:ECX.vmx", when I added "-cpu
> qemu64,+vmx" when I launch the VM in TCG mode. I am wondering does TCG
> support those vmx instructions?

This comes down to the relative lack of support for newer instructions
on the x86 TCG frontend. That said the frontend does support some of the
older AMD64 virtualisation instructions (VMRUN/VMMCALL/VMSAVE/VMLOAD)
which I think is part of the Secure Virtual Machine (SVM) - not to be
confused with AMD's later secure virt tech for encrypted VMs.

But I don't think any of the later VMX instructions are supported under

Also the confusion about -cpu qemu64,+vmx is warranted because the
option is overloaded. In TCG world it selects a processor to emulate, in
KVM (et all) world it filters the host CPU features visible to the

> Best,
> Kaifeng

Alex Bennée

reply via email to

[Prev in Thread] Current Thread [Next in Thread]