Skip to content

Commit 38dfa83

Browse files
vittyvkbonzini
authored andcommitted
KVM: SVM: hyper-v: Enable Enlightened MSR-Bitmap support for real
Commit c4327f1 ("KVM: SVM: hyper-v: Enlightened MSR-Bitmap support") introduced enlightened MSR-Bitmap support for KVM-on-Hyper-V but it didn't actually enable the support. Similar to enlightened NPT TLB flush and direct TLB flush features, the guest (KVM) has to tell L0 (Hyper-V) that it's using the feature by setting the appropriate feature fit in VMCB control area (sw reserved fields). Fixes: c4327f1 ("KVM: SVM: hyper-v: Enlightened MSR-Bitmap support") Signed-off-by: Vitaly Kuznetsov <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent cdf85e0 commit 38dfa83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/kvm/svm/svm_onhyperv.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ static inline void svm_hv_init_vmcb(struct vmcb *vmcb)
4646
if (npt_enabled &&
4747
ms_hyperv.nested_features & HV_X64_NESTED_ENLIGHTENED_TLB)
4848
hve->hv_enlightenments_control.enlightened_npt_tlb = 1;
49+
50+
if (ms_hyperv.nested_features & HV_X64_NESTED_MSR_BITMAP)
51+
hve->hv_enlightenments_control.msr_bitmap = 1;
4952
}
5053

5154
static inline void svm_hv_hardware_setup(void)

0 commit comments

Comments
 (0)