summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2008-10-16 11:30:57 +0200
committerAvi Kivity <avi@redhat.com>2008-12-31 15:51:45 +0100
commit291f26bc0f89518ad7ee3207c09eb8a743ac8fcc (patch)
treed0ce8ff4d0a4b88b656db0f559a00c5b25738ed2 /arch/x86/include/asm
parentKVM: Clean up kvm_x86_emulate.h (diff)
downloadlinux-291f26bc0f89518ad7ee3207c09eb8a743ac8fcc.tar.xz
linux-291f26bc0f89518ad7ee3207c09eb8a743ac8fcc.zip
KVM: MMU: Extend kvm_mmu_page->slot_bitmap size
Otherwise set_bit() for private memory slot(above KVM_MEMORY_SLOTS) would corrupted memory in 32bit host. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/kvm_host.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 93040b5eed96..59c3ae10de6c 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -192,9 +192,11 @@ struct kvm_mmu_page {
u64 *spt;
/* hold the gfn of each spte inside spt */
gfn_t *gfns;
- unsigned long slot_bitmap; /* One bit set per slot which has memory
- * in this shadow page.
- */
+ /*
+ * One bit set per slot which has memory
+ * in this shadow page.
+ */
+ DECLARE_BITMAP(slot_bitmap, KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS);
int multimapped; /* More than one parent_pte? */
int root_count; /* Currently serving as active root */
bool unsync;