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

2015-03-13 Thread Marcelo Tosatti
On Wed, Mar 04, 2015 at 02:31:56PM +0800, Wincy Van wrote: > 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. > > Fi

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

2015-03-04 Thread Wincy Van
On Wed, Mar 4, 2015 at 11:58 PM, Bandan Das wrote: > Hi Wincy, > > 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 b

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

2015-03-04 Thread Bandan Das
Hi Wincy, 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_bit

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

2015-03-03 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