diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-06-19 15:16:23 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 08:33:02 +0300 |
commit | ec04b2604c3707a46db1d26d98f82b11d0844669 (patch) | |
tree | a7332c98d61b08b95ff4dc769f87c5861845ffe5 /arch/x86/kvm/paging_tmpl.h | |
parent | f340ca0f065ecf3e7549687e763370106dacb2c2 (diff) | |
download | kernel_samsung_tuna-ec04b2604c3707a46db1d26d98f82b11d0844669.zip kernel_samsung_tuna-ec04b2604c3707a46db1d26d98f82b11d0844669.tar.gz kernel_samsung_tuna-ec04b2604c3707a46db1d26d98f82b11d0844669.tar.bz2 |
KVM: Prepare memslot data structures for multiple hugepage sizes
[avi: fix build on non-x86]
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.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 322e811..53e129c 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -401,7 +401,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-1); + large_gfn = walker.gfn & + ~(KVM_PAGES_PER_HPAGE(PT_DIRECTORY_LEVEL) - 1); if (is_largepage_backed(vcpu, large_gfn)) { walker.gfn = large_gfn; largepage = 1; |