]> git.itanic.dy.fi Git - linux-stable/commitdiff
KVM: x86: Expose Hyper-V L2 TLB flush feature
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 1 Nov 2022 14:54:07 +0000 (15:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Nov 2022 17:59:19 +0000 (12:59 -0500)
With both nSVM and nVMX implementations in place, KVM can now expose
Hyper-V L2 TLB flush feature to userspace.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221101145426.251680-30-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c

index 15880da73a7b19ec4c376a5ede5c6ee3cccdc963..2c7f2a26421e825097982d800a03d09435e9917a 100644 (file)
@@ -2779,6 +2779,7 @@ int kvm_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid,
 
                case HYPERV_CPUID_NESTED_FEATURES:
                        ent->eax = evmcs_ver;
+                       ent->eax |= HV_X64_NESTED_DIRECT_FLUSH;
                        ent->eax |= HV_X64_NESTED_MSR_BITMAP;
                        ent->ebx |= HV_X64_NESTED_EVMCS1_PERF_GLOBAL_CTRL;
                        break;