Skip to content

Commit 91f673b

Browse files
Maxim Levitskybonzini
authored andcommitted
KVM: x86: nSVM: expose clean bit support to the guest
KVM already honours few clean bits thus it makes sense to let the nested guest know about it. Note that KVM also doesn't check if the hardware supports clean bits, and therefore nested KVM was already setting clean bits and L0 KVM was already honouring them. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20220207155447.840194-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 759cbd5 commit 91f673b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kvm/svm/svm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4652,6 +4652,7 @@ static __init void svm_set_cpu_caps(void)
46524652
/* CPUID 0x80000001 and 0x8000000A (SVM features) */
46534653
if (nested) {
46544654
kvm_cpu_cap_set(X86_FEATURE_SVM);
4655+
kvm_cpu_cap_set(X86_FEATURE_VMCBCLEAN);
46554656

46564657
if (nrips)
46574658
kvm_cpu_cap_set(X86_FEATURE_NRIPS);

0 commit comments

Comments
 (0)