summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/paging_tmpl.h
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-07-27 16:30:43 +0200
committerAvi Kivity <avi@redhat.com>2009-09-10 08:33:18 +0300
commitd25797b24c0ff2efc2b2fabaebb0ec0cafc0d3e3 (patch)
tree2c73de073f169e66cc50141a604a1b72498d96d7 /arch/x86/kvm/paging_tmpl.h
parent44ad9944f151390363fc6edaba466de8dfef050f (diff)
KVM: MMU: rename is_largepage_backed to mapping_level
With the new name and the corresponding backend changes this function can now support multiple hugepage sizes. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/paging_tmpl.h')
-rw-r--r--arch/x86/kvm/paging_tmpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 36ac6d70a847..44f0346578cb 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -407,8 +407,8 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
if (walker.level == PT_DIRECTORY_LEVEL) {
gfn_t large_gfn;
large_gfn = walker.gfn &
- ~(KVM_PAGES_PER_HPAGE(PT_DIRECTORY_LEVEL) - 1);
- if (is_largepage_backed(vcpu, large_gfn)) {
+ ~(KVM_PAGES_PER_HPAGE(PT_DIRECTORY_LEVEL) - 1);
+ if (mapping_level(vcpu, large_gfn) == PT_DIRECTORY_LEVEL) {
walker.gfn = large_gfn;
largepage = 1;
}