1
0
Fork 0
alistair23-linux/arch
Paul Mackerras 9d4cba7f93 KVM: Move gfn_to_memslot() to kvm_host.h
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 would
lead to increased code size, this puts __gfn_to_memslot() in a header.
Then, the non-modular uses of gfn_to_memslot() are changed to call
__gfn_to_memslot() instead.  This way there is only one place in the
source code that needs to be changed should the gfn_to_memslot()
implementation need to be modified.

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.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-03-05 14:57:22 +02:00
..
alpha Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
arm IOMMU fixes for Linux 3.3-rc5 2012-02-28 09:15:31 -08:00
avr32 avr32: select generic atomic64_t support 2012-02-03 16:16:40 -08:00
blackfin Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
c6x Kbuild: Use dtc's -d (dependency) option 2012-02-14 21:14:44 -05:00
cris lib: use generic pci_iomap on all architectures 2012-01-10 18:04:27 -08:00
frv Merge branch 'for-next' of git://git.infradead.org/users/dhowells/linux-headers 2012-01-14 18:03:30 -08:00
h8300 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
hexagon lib: move GENERIC_IOMAP to lib/Kconfig 2011-11-24 22:21:19 +02:00
ia64 KVM: provide synchronous registers in kvm_run 2012-03-05 14:52:22 +02:00
m32r Merge branch 'for-next' of git://git.infradead.org/users/dhowells/linux-headers 2012-01-14 18:03:30 -08:00
m68k m68k: Do not set global share for non-kernel shared pages 2012-02-07 11:25:57 +10:00
microblaze Revert "microblaze: Add topology init" 2012-01-31 09:06:52 +01:00
mips mips: use the the PCI controller's io_map_base 2012-01-31 23:20:30 +02:00
mn10300 Merge branch 'for-next' of git://git.infradead.org/users/dhowells/linux-headers 2012-01-14 18:03:30 -08:00
openrisc openrisc: Fix up audit_syscall_[entry|exit]() usage 2012-02-17 09:53:12 +01:00
parisc parisc, exec: remove redundant set_fs(USER_DS) 2012-01-12 20:13:04 -08:00
powerpc KVM: Move gfn_to_memslot() to kvm_host.h 2012-03-05 14:57:22 +02:00
s390 KVM: s390: provide access guest registers via kvm_run 2012-03-05 14:52:22 +02:00
score score: fix off-by-one index into syscall table 2012-01-23 08:38:49 -08:00
sh SuperH fixes for 3.3-rc5 2012-02-24 08:56:51 -08:00
sparc lib: Fix multiple definitions of clz_tab 2012-02-02 10:34:23 +11:00
tile Merge branch 'for-next' of git://git.infradead.org/users/dhowells/linux-headers 2012-01-14 18:03:30 -08:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit 2012-01-17 16:41:31 -08:00
unicore32 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
x86 KVM: x86 emulator: reject SYSENTER in compatibility mode on AMD guests 2012-03-05 14:57:20 +02:00
xtensa xtensa: fix memscan() 2012-02-03 16:16:40 -08:00
.gitignore
Kconfig mm,x86,um: move CMPXCHG_DOUBLE config option 2012-01-12 20:13:03 -08:00