Re: [PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap

2015-06-17 Thread Xiao Guangrong
On 06/17/2015 04:15 PM, Paolo Bonzini wrote: On 09/06/2015 05:28, Xiao Guangrong wrote: -rmapp = gfn_to_rmap(kvm, sp->gfn, PT_PAGE_TABLE_LEVEL); +slots = kvm_memslots(kvm); +slot = __gfn_to_memslot(slots, sp->gfn); +rmapp = __gfn_to_rmap(sp->gfn, PT_PAGE_TABLE_LEVEL, slot);

Re: [PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap

2015-06-17 Thread Paolo Bonzini
On 09/06/2015 05:28, Xiao Guangrong wrote: >> >> -rmapp = gfn_to_rmap(kvm, sp->gfn, PT_PAGE_TABLE_LEVEL); >> +slots = kvm_memslots(kvm); >> +slot = __gfn_to_memslot(slots, sp->gfn); >> +rmapp = __gfn_to_rmap(sp->gfn, PT_PAGE_TABLE_LEVEL, slot); >> > > Why @sp is not available her

Re: [PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap

2015-06-08 Thread Xiao Guangrong
On 05/28/2015 01:05 AM, Paolo Bonzini wrote: This is always available (with one exception in the auditing code). Later we will also use the role to look up the right memslots array. return; @@ -191,11 +191,15 @@ static void audit_write_protection(struct kvm *kvm, str

[PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap

2015-05-27 Thread Paolo Bonzini
This is always available (with one exception in the auditing code). Later we will also use the role to look up the right memslots array. Signed-off-by: Paolo Bonzini --- v1->v2: new arch/x86/kvm/mmu.c | 10 +- arch/x86/kvm/mmu_audit.c | 8 ++-- 2 files changed, 11 ins