Re: [PATCH v3 5/6] KVM: MMU: abstract invalid guest pte mapping

2010-11-22 Thread Avi Kivity
On 11/19/2010 11:04 AM, Xiao Guangrong wrote: Introduce a common function to map invalid gpte Signed-off-by: Xiao Guangrongxiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |3 -- arch/x86/kvm/paging_tmpl.h | 71 +++- 2 files changed,

Re: [PATCH v3 5/6] KVM: MMU: abstract invalid guest pte mapping

2010-11-22 Thread Xiao Guangrong
On 11/22/2010 05:28 PM, Avi Kivity wrote: +static bool FNAME(map_invalid_gpte)(struct kvm_vcpu *vcpu, +struct kvm_mmu_page *sp, u64 *spte, +pt_element_t gpte) It's really only for speculative maps, the name should reflect that. OK, i'll use

Re: [PATCH v3 5/6] KVM: MMU: abstract invalid guest pte mapping

2010-11-22 Thread Avi Kivity
On 11/22/2010 12:18 PM, Xiao Guangrong wrote: I think the order is reversed. If !is_present_gpte(), it doesn't matter if reserved bits are set or not. if !is_present_gpte() is_rsvd_bits_set, then we may mark the spte notrap, so the guest will detect #PF with PFEC.P=PEFC.RSVD=0, but the

Re: [PATCH v3 5/6] KVM: MMU: abstract invalid guest pte mapping

2010-11-22 Thread Xiao Guangrong
version and it use prefetch_invalid_gpte instead of map_invalid_gpte Subject: [PATCH v3 5/6] KVM: MMU: abstract invalid guest pte mapping From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Introduce a common function to map invalid gpte Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com

[PATCH v3 5/6] KVM: MMU: abstract invalid guest pte mapping

2010-11-19 Thread Xiao Guangrong
Introduce a common function to map invalid gpte Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |3 -- arch/x86/kvm/paging_tmpl.h | 71 +++- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git