lkml.org 
[lkml]   [2015]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap


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, struct kvm_mmu_page *sp)
> unsigned long *rmapp;
> u64 *sptep;
> struct rmap_iterator iter;
> + struct kvm_memslots *slots;
> + struct kvm_memory_slot *slot;
>
> if (sp->role.direct || sp->unsync || sp->role.invalid)
> return;
>
> - 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 here?


\
 
 \ /
  Last update: 2015-06-09 05:41    [W:0.521 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site