Re: [PATCH] KVM: vmx: Set msr bitmap correctly if vcpu is in guest mode

2015-03-03 Thread Wincy Van
On Wed, Mar 4, 2015 at 12:04 PM, Bandan Das wrote: > Wincy Van writes: > >> On Wed, Mar 4, 2015 at 1:39 AM, Bandan Das wrote: >>> Wincy Van writes: >>> In commit 3af18d9c5fe9 ("KVM: nVMX: Prepare for using hardware MSR bitmap"), we are setting MSR_BITMAP in prepare_vmcs02 if we

Re: [PATCH] KVM: vmx: Set msr bitmap correctly if vcpu is in guest mode

2015-03-03 Thread Bandan Das
Wincy Van writes: > On Wed, Mar 4, 2015 at 1:39 AM, Bandan Das wrote: >> Wincy Van writes: >> >>> In commit 3af18d9c5fe9 ("KVM: nVMX: Prepare for using hardware MSR bitmap"), >>> we are setting MSR_BITMAP in prepare_vmcs02 if we should use hardware. This >>> is not enough since the field will b

Re: [PATCH] KVM: vmx: Set msr bitmap correctly if vcpu is in guest mode

2015-03-03 Thread Wincy Van
On Wed, Mar 4, 2015 at 1:39 AM, Bandan Das wrote: > Wincy Van writes: > >> In commit 3af18d9c5fe9 ("KVM: nVMX: Prepare for using hardware MSR bitmap"), >> we are setting MSR_BITMAP in prepare_vmcs02 if we should use hardware. This >> is not enough since the field will be modified by following vmx

Re: [PATCH] KVM: vmx: Set msr bitmap correctly if vcpu is in guest mode

2015-03-03 Thread Bandan Das
Wincy Van writes: > In commit 3af18d9c5fe9 ("KVM: nVMX: Prepare for using hardware MSR bitmap"), > we are setting MSR_BITMAP in prepare_vmcs02 if we should use hardware. This > is not enough since the field will be modified by following vmx_set_efer. > > Fix this by setting vmx_msr_bitmap_nested

[PATCH] KVM: vmx: Set msr bitmap correctly if vcpu is in guest mode

2015-03-02 Thread Wincy Van
In commit 3af18d9c5fe9 ("KVM: nVMX: Prepare for using hardware MSR bitmap"), we are setting MSR_BITMAP in prepare_vmcs02 if we should use hardware. This is not enough since the field will be modified by following vmx_set_efer. Fix this by setting vmx_msr_bitmap_nested in vmx_set_msr_bitmap if vcpu