]> 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)
commit50ac07a7db0e3476643c28392f18bb5804fd2a12
treea4caafdbbb8b9f416346a962efc9b3e98e0011f2
parent4f0be5a267ce1c80d673727864ba230cec2dd40b
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 835cb0a0c3fd ("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