KVM: nVMX: Disable intercept for FS/GS base MSRs in vmcs02 when possible
authorSean Christopherson <sean.j.christopherson@xxxxxxxxx>
Wed, 8 May 2019 14:32:15 +0000 (07:32 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 May 2019 20:53:44 +0000 (22:53 +0200)
commitd69129b4e46a7b61dc956af038d143eb791f22c7
treee054df4261c2403c98fca18cd31ce47c52af71fc
parent9b5db6c762adcca120667b683af55700ffd7ae29
KVM: nVMX: Disable intercept for FS/GS base MSRs in vmcs02 when possible

If L1 is using an MSR bitmap, unconditionally merge the MSR bitmaps from
L0 and L1 for MSR_{KERNEL,}_{FS,GS}_BASE.  KVM unconditionally exposes
MSRs L1.  If KVM is also running in L1 then it's highly likely L1 is
also exposing the MSRs to L2, i.e. KVM doesn't need to intercept L2
accesses.

Based on code from Jintack Lim.

Cc: Jintack Lim <jintack@xxxxxxxxxxxxxxx>
Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c