Re: [RFC PATCH 1/2] KVM: MMU: precompute page fault error code

2016-03-10 Thread Paolo Bonzini
On 10/03/2016 15:01, Xiao Guangrong wrote: > > > On 03/08/2016 07:45 PM, Paolo Bonzini wrote: >> For the next patch, we will want to filter PFERR_FETCH_MASK away early, >> and not pass it to permission_fault if neither NX nor SMEP are enabled. >> Prepare for the change. > > Why it is needed?

Re: [RFC PATCH 1/2] KVM: MMU: precompute page fault error code

2016-03-10 Thread Paolo Bonzini
On 10/03/2016 15:01, Xiao Guangrong wrote: > > > On 03/08/2016 07:45 PM, Paolo Bonzini wrote: >> For the next patch, we will want to filter PFERR_FETCH_MASK away early, >> and not pass it to permission_fault if neither NX nor SMEP are enabled. >> Prepare for the change. > > Why it is needed?

Re: [RFC PATCH 1/2] KVM: MMU: precompute page fault error code

2016-03-10 Thread Xiao Guangrong
On 03/08/2016 07:45 PM, Paolo Bonzini wrote: For the next patch, we will want to filter PFERR_FETCH_MASK away early, and not pass it to permission_fault if neither NX nor SMEP are enabled. Prepare for the change. Why it is needed? It is much easier to drop PFEC.F in

Re: [RFC PATCH 1/2] KVM: MMU: precompute page fault error code

2016-03-10 Thread Xiao Guangrong
On 03/08/2016 07:45 PM, Paolo Bonzini wrote: For the next patch, we will want to filter PFERR_FETCH_MASK away early, and not pass it to permission_fault if neither NX nor SMEP are enabled. Prepare for the change. Why it is needed? It is much easier to drop PFEC.F in

[RFC PATCH 1/2] KVM: MMU: precompute page fault error code

2016-03-08 Thread Paolo Bonzini
For the next patch, we will want to filter PFERR_FETCH_MASK away early, and not pass it to permission_fault if neither NX nor SMEP are enabled. Prepare for the change. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/mmu.c | 2 +- arch/x86/kvm/paging_tmpl.h | 26

[RFC PATCH 1/2] KVM: MMU: precompute page fault error code

2016-03-08 Thread Paolo Bonzini
For the next patch, we will want to filter PFERR_FETCH_MASK away early, and not pass it to permission_fault if neither NX nor SMEP are enabled. Prepare for the change. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/mmu.c | 2 +- arch/x86/kvm/paging_tmpl.h | 26 +++---