From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Mattson Subject: Re: [PATCH 3/3] X86/nVMX: Update the MSR_BITMAP field with the L02 MSR BITMAP Date: Fri, 9 Feb 2018 15:26:51 -0800 Message-ID: References: <1518130410-6583-1-git-send-email-karahmed@amazon.de> <1518130410-6583-3-git-send-email-karahmed@amazon.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: kvm list , LKML , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= To: KarimAllah Ahmed Return-path: In-Reply-To: <1518130410-6583-3-git-send-email-karahmed@amazon.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, Feb 8, 2018 at 2:53 PM, KarimAllah Ahmed wrote= : > ... otherwise we will just be running with the L1 MSR BITMAP! > > It does not seem that we ever update the MSR_BITMAP when the nested guest > is running. The only place where we update the MSR_BITMAP field in VMCS i= s > for the L1 guest! > > Signed-off-by: KarimAllah Ahmed > Cc: Paolo Bonzini > Cc: Radim Kr=C4=8Dm=C3=A1=C5=99 > Cc: kvm@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- > arch/x86/kvm/vmx.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 91e3539..f40be10 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -10589,6 +10589,9 @@ static int prepare_vmcs02(struct kvm_vcpu *vcpu, = struct vmcs12 *vmcs12, > vmcs_writel(GUEST_GDTR_BASE, vmcs12->guest_gdtr_base); > vmcs_writel(GUEST_IDTR_BASE, vmcs12->guest_idtr_base); > > + if (cpu_has_vmx_msr_bitmap()) > + vmcs_write64(MSR_BITMAP, __pa(vmx->nested.vmcs02.msr_bitm= ap)); > + This is already in David's "[PATCH 5/9] KVM: VMX: make MSR bitmaps per-VCPU," isn't it? > if (from_vmentry && > (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_DEBUG_CONTROLS)) { > kvm_set_dr(vcpu, 7, vmcs12->guest_dr7); > -- > 2.7.4 >