Re: [PATCH 8/9] KVM: MMU: fix MTRR update

2015-05-11 Thread Xiao Guangrong
On 05/08/2015 12:53 AM, Paolo Bonzini wrote: On 30/04/2015 12:24, guangrong.x...@linux.intel.com wrote: +static void vmx_set_msr_mtrr(struct kvm_vcpu *vcpu, u32 msr) +{ + struct mtrr_state_type *mtrr_state = &vcpu->arch.mtrr_state; + unsigned char mtrr_enabled = mtrr_state->enabl

Re: [PATCH 8/9] KVM: MMU: fix MTRR update

2015-05-07 Thread Paolo Bonzini
On 30/04/2015 12:24, guangrong.x...@linux.intel.com wrote: > +static void vmx_set_msr_mtrr(struct kvm_vcpu *vcpu, u32 msr) > +{ > + struct mtrr_state_type *mtrr_state = &vcpu->arch.mtrr_state; > + unsigned char mtrr_enabled = mtrr_state->enabled; > + gfn_t start, end, mask; > + in

Re: [PATCH 8/9] KVM: MMU: fix MTRR update

2015-05-06 Thread Xiao Guangrong
Hi David, Thanks for your review. On 05/07/2015 05:36 AM, David Matlack wrote: +static void vmx_set_msr_mtrr(struct kvm_vcpu *vcpu, u32 msr) +{ + struct mtrr_state_type *mtrr_state = &vcpu->arch.mtrr_state; + unsigned char mtrr_enabled = mtrr_state->enabled; + gfn_t start, e

Re: [PATCH 8/9] KVM: MMU: fix MTRR update

2015-05-06 Thread David Matlack
On Thu, Apr 30, 2015 at 3:24 AM, wrote: > From: Xiao Guangrong > > Currently, whenever guest MTRR registers are changed kvm_mmu_reset_context > is called to switch to the new root shadow page table, however, it's useless > since: > 1) the cache type is not cached into shadow page's attribute so