diff options
author | Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> | 2010-04-13 09:47:24 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:17:41 -0400 |
commit | 660c22c425cbe14badfb3b0a0206862577701ab7 (patch) | |
tree | 272889023481c810eebe54ab5343e634f0cd50bc /include | |
parent | 020df0794f5764e742feaa718be88b8f1b4ce04f (diff) |
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.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 169d07758ee5..55830638aeb1 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -105,6 +105,12 @@ struct kvm_vcpu { | |||
105 | struct kvm_vcpu_arch arch; | 105 | struct kvm_vcpu_arch arch; |
106 | }; | 106 | }; |
107 | 107 | ||
108 | /* | ||
109 | * Some of the bitops functions do not support too long bitmaps. | ||
110 | * This number must be determined not to exceed such limits. | ||
111 | */ | ||
112 | #define KVM_MEM_MAX_NR_PAGES ((1UL << 31) - 1) | ||
113 | |||
108 | struct kvm_memory_slot { | 114 | struct kvm_memory_slot { |
109 | gfn_t base_gfn; | 115 | gfn_t base_gfn; |
110 | unsigned long npages; | 116 | unsigned long npages; |