Re: [PATCH 2/5] KVM: MMU: simplify mmu_set_spte

2012-11-20 Thread Xiao Guangrong
On 11/21/2012 07:51 AM, Marcelo Tosatti wrote: > On Wed, Nov 21, 2012 at 07:23:26AM +0800, Xiao Guangrong wrote: >> On 11/21/2012 06:18 AM, Marcelo Tosatti wrote: >> >> -child = page_header(pte & PT64_BASE_ADDR_MASK); >> -drop_parent_pte(child

Re: [PATCH 2/5] KVM: MMU: simplify mmu_set_spte

2012-11-20 Thread Marcelo Tosatti
On Wed, Nov 21, 2012 at 07:23:26AM +0800, Xiao Guangrong wrote: > On 11/21/2012 06:18 AM, Marcelo Tosatti wrote: > > -child = page_header(pte & PT64_BASE_ADDR_MASK); > -drop_parent_pte(child, sptep); > -kvm_flus

Re: [PATCH 2/5] KVM: MMU: simplify mmu_set_spte

2012-11-20 Thread Xiao Guangrong
On 11/21/2012 06:18 AM, Marcelo Tosatti wrote: - child = page_header(pte & PT64_BASE_ADDR_MASK); - drop_parent_pte(child, sptep); - kvm_flush_remote_tlbs(vcpu->kvm); >>> >>> How come its safe to drop this case? >> >> We use "if (pfn

Re: [PATCH 2/5] KVM: MMU: simplify mmu_set_spte

2012-11-20 Thread Marcelo Tosatti
On Tue, Nov 13, 2012 at 04:39:44PM +0800, Xiao Guangrong wrote: > On 11/13/2012 07:12 AM, Marcelo Tosatti wrote: > > On Mon, Nov 05, 2012 at 08:10:08PM +0800, Xiao Guangrong wrote: > >> In order to detecting spte remapping, we can simply check whether the > >> spte has already been pointing to the

Re: [PATCH 2/5] KVM: MMU: simplify mmu_set_spte

2012-11-13 Thread Xiao Guangrong
On 11/13/2012 07:12 AM, Marcelo Tosatti wrote: > On Mon, Nov 05, 2012 at 08:10:08PM +0800, Xiao Guangrong wrote: >> In order to detecting spte remapping, we can simply check whether the >> spte has already been pointing to the pfn even if the spte is not the >> last spte for middle spte is pointing

Re: [PATCH 2/5] KVM: MMU: simplify mmu_set_spte

2012-11-12 Thread Marcelo Tosatti
On Mon, Nov 05, 2012 at 08:10:08PM +0800, Xiao Guangrong wrote: > In order to detecting spte remapping, we can simply check whether the > spte has already been pointing to the pfn even if the spte is not the > last spte for middle spte is pointing to the kernel pfn which can not > be mapped to user

[PATCH 2/5] KVM: MMU: simplify mmu_set_spte

2012-11-05 Thread Xiao Guangrong
In order to detecting spte remapping, we can simply check whether the spte has already been pointing to the pfn even if the spte is not the last spte for middle spte is pointing to the kernel pfn which can not be mapped to userspace Also, update slot and stat.lpages iff the spte is not remapped S