diff options
author | Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> | 2010-04-13 22:47:24 +0900 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 12:17:41 +0300 |
commit | 660c22c425cbe14badfb3b0a0206862577701ab7 (patch) | |
tree | 272889023481c810eebe54ab5343e634f0cd50bc /include/linux | |
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/linux')
-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 169d07758ee..55830638aeb 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; |