summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2013-10-03 01:22:28 +0400
committerGleb Natapov <gleb@redhat.com>2013-10-14 11:11:44 +0400
commit6d9d41e57440e32a3400f37aa05ef7a1a09ced64 (patch)
tree150c27fc74edb392cce5a116b2042c976554853b /include
parent7854cbca815562a49d50bbc6f31599312853d1f4 (diff)
downloadlinux-6d9d41e57440e32a3400f37aa05ef7a1a09ced64.tar.xz
KVM: Move gfn_to_index to x86 specific code
The gfn_to_index function relies on huge page defines which either may not make sense on systems that don't support huge pages or are defined in an unconvenient way for other architectures. Since this is x86-specific, move the function to arch/x86/include/asm/kvm_host.h. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kvm_host.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 7c961e1e9270..f6dccde755f6 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -841,13 +841,6 @@ static inline int memslot_id(struct kvm *kvm, gfn_t gfn)
return gfn_to_memslot(kvm, gfn)->id;
}
-static inline gfn_t gfn_to_index(gfn_t gfn, gfn_t base_gfn, int level)
-{
- /* KVM_HPAGE_GFN_SHIFT(PT_PAGE_TABLE_LEVEL) must be 0. */
- return (gfn >> KVM_HPAGE_GFN_SHIFT(level)) -
- (base_gfn >> KVM_HPAGE_GFN_SHIFT(level));
-}
-
static inline gfn_t
hva_to_gfn_memslot(unsigned long hva, struct kvm_memory_slot *slot)
{