[PATCH] KVM: Move gfn_to_memslot() to kvm_host.h

Alexander Graf agraf at suse.de
Sat Dec 24 00:33:18 EST 2011


On 20.12.2011, at 10:21, Paul Mackerras wrote:

> This moves gfn_to_memslot(), and the functions it calls, that is,
> search_memslots() and __gfn_to_memslot(), from kvm_main.c to kvm_host.h
> so that gfn_to_memslot() can be called from non-modular code even
> when KVM is a module.  On powerpc, the Book3S HV style of KVM has
> code that is called from real mode which needs to call gfn_to_memslot()
> and thus needs this.  (Module code is allocated in the vmalloc region,
> which can't be accessed in real mode.)
> 
> With this, we can remove builtin_gfn_to_memslot() from book3s_hv_rm_mmu.c
> and thus eliminate a little bit of duplication.
> 
> Signed-off-by: Paul Mackerras <paulus at samba.org>

Avi, please ack.


Alex



More information about the Linuxppc-dev mailing list