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

2012-01-12 Thread Avi Kivity
On 01/12/2012 12:41 PM, Paul Mackerras wrote: > This moves __gfn_to_memslot() and search_memslots() from kvm_main.c to > kvm_host.h to reduce the code duplication caused by the need for > non-modular code in arch/powerpc/kvm/book3s_hv_rm_mmu.c to call > gfn_to_memslot() in real mode. > > Rather tha

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

2012-01-12 Thread Alexander Graf
On 01/12/2012 11:41 AM, Paul Mackerras wrote: This moves __gfn_to_memslot() and search_memslots() from kvm_main.c to kvm_host.h to reduce the code duplication caused by the need for non-modular code in arch/powerpc/kvm/book3s_hv_rm_mmu.c to call gfn_to_memslot() in real mode. Rather than putting

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

2012-01-12 Thread Paul Mackerras
This moves __gfn_to_memslot() and search_memslots() from kvm_main.c to kvm_host.h to reduce the code duplication caused by the need for non-modular code in arch/powerpc/kvm/book3s_hv_rm_mmu.c to call gfn_to_memslot() in real mode. Rather than putting gfn_to_memslot() itself in a header, which woul

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

2012-01-02 Thread Avi Kivity
On 01/02/2012 05:23 PM, Alexander Graf wrote: > > Or we could move the implementation into a header file, with an extra __ > > prefix, and have the C stubs call those inlines, so we have exactly on > > instantiation. Your real mode code can then call the inlines. > > I like this version. That way

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

2012-01-02 Thread Alexander Graf
On 26.12.2011, at 14:22, Avi Kivity wrote: > On 12/20/2011 11:21 AM, 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 cod

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

2011-12-26 Thread Avi Kivity
On 12/20/2011 11:21 AM, 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 Bo

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

2011-12-23 Thread Alexander Graf
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

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

2011-12-20 Thread Paul Mackerras
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