]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: to track if L1 is running L2 VM
authorDongli Zhang <dongli.zhang@oracle.com>
Fri, 5 Mar 2021 22:57:47 +0000 (14:57 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:28:02 +0000 (04:28 -0400)
commitf4681a4386e056518de9a2439c13351200b3af18
treea4caafdbbb8b9f416346a962efc9b3e98e0011f2
parent155740eb4d33ce3a3ca0d38d270a3f49add1ff95
KVM: x86: to track if L1 is running L2 VM

The new per-cpu stat 'nested_run' is introduced in order to track if L1 VM
is running or used to run L2 VM.

An example of the usage of 'nested_run' is to help the host administrator
to easily track if any L1 VM is used to run L2 VM. Suppose there is issue
that may happen with nested virtualization, the administrator will be able
to easily narrow down and confirm if the issue is due to nested
virtualization via 'nested_run'. For example, whether the fix like
commit 0f261cb34ffb ("KVM: nVMX: do not use dangling shadow VMCS after
guest reset") is required.

Cc: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Message-Id: <20210305225747.7682-1-dongli.zhang@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/nested.c
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/x86.c