Re: [PATCH v2 3/3] KVM: VMX: Some minor refactor of MSR bitmap

2019-10-18 Thread Xiaoyao Li
On 10/19/2019 1:27 AM, Sean Christopherson wrote: On Fri, Oct 18, 2019 at 05:37:23PM +0800, Xiaoyao Li wrote: Move the MSR bitmap capability check from vmx_disable_intercept_for_msr() and vmx_enable_intercept_for_msr(), so that we can do the check far early before we really want to touch the

Re: [PATCH v2 3/3] KVM: VMX: Some minor refactor of MSR bitmap

2019-10-18 Thread Sean Christopherson
On Sat, Oct 19, 2019 at 02:39:57AM +0800, Xiaoyao Li wrote: > On 10/19/2019 1:27 AM, Sean Christopherson wrote: > >>@@ -6745,22 +6762,6 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm > >>*kvm, unsigned int id) > >>if (err < 0) > >>goto free_msrs; > >>- msr_bitmap =

Re: [PATCH v2 3/3] KVM: VMX: Some minor refactor of MSR bitmap

2019-10-18 Thread Xiaoyao Li
On 10/19/2019 1:27 AM, Sean Christopherson wrote: On Fri, Oct 18, 2019 at 05:37:23PM +0800, Xiaoyao Li wrote: Move the MSR bitmap capability check from vmx_disable_intercept_for_msr() and vmx_enable_intercept_for_msr(), so that we can do the check far early before we really want to touch the

Re: [PATCH v2 3/3] KVM: VMX: Some minor refactor of MSR bitmap

2019-10-18 Thread Sean Christopherson
On Fri, Oct 18, 2019 at 05:37:23PM +0800, Xiaoyao Li wrote: > Move the MSR bitmap capability check from vmx_disable_intercept_for_msr() > and vmx_enable_intercept_for_msr(), so that we can do the check far > early before we really want to touch the bitmap. > > Also, we can move the common MSR

[PATCH v2 3/3] KVM: VMX: Some minor refactor of MSR bitmap

2019-10-18 Thread Xiaoyao Li
Move the MSR bitmap capability check from vmx_disable_intercept_for_msr() and vmx_enable_intercept_for_msr(), so that we can do the check far early before we really want to touch the bitmap. Also, we can move the common MSR not-intercept setup to where msr bitmap is actually used. Signed-off-by: