summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2010-04-13 22:47:24 +0900
committerAvi Kivity <avi@redhat.com>2010-05-17 12:17:41 +0300
commit660c22c425cbe14badfb3b0a0206862577701ab7 (patch)
tree272889023481c810eebe54ab5343e634f0cd50bc /include
parent020df0794f5764e742feaa718be88b8f1b4ce04f (diff)
downloadop-kernel-dev-660c22c425cbe14badfb3b0a0206862577701ab7.zip
op-kernel-dev-660c22c425cbe14badfb3b0a0206862577701ab7.tar.gz
KVM: limit the number of pages per memory slot
This patch limits the number of pages per memory slot to make us free from extra care about type issues. Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kvm_host.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 169d077..5583063 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -105,6 +105,12 @@ struct kvm_vcpu {
struct kvm_vcpu_arch arch;
};
+/*
+ * Some of the bitops functions do not support too long bitmaps.
+ * This number must be determined not to exceed such limits.
+ */
+#define KVM_MEM_MAX_NR_PAGES ((1UL << 31) - 1)
+
struct kvm_memory_slot {
gfn_t base_gfn;
unsigned long npages;
OpenPOWER on IntegriCloud