summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorXiao Guangrong2011-11-24 10:37:48 +0100
committerAvi Kivity2011-12-27 10:17:34 +0100
commit93a5cef07d686a0341d056b0f930a762c7174a13 (patch)
tree8db1ec00bd74a7297b32abf4d7463d845c34fea8 /include/linux/kvm_host.h
parentKVM: x86 emulator: Use opcode::execute for BSF/BSR (diff)
downloadkernel-qcow2-linux-93a5cef07d686a0341d056b0f930a762c7174a13.tar.gz
kernel-qcow2-linux-93a5cef07d686a0341d056b0f930a762c7174a13.tar.xz
kernel-qcow2-linux-93a5cef07d686a0341d056b0f930a762c7174a13.zip
KVM: introduce KVM_MEM_SLOTS_NUM macro
Introduce KVM_MEM_SLOTS_NUM macro to instead of KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 7c654aa46b6c..924df0d7ac5f 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -227,11 +227,14 @@ struct kvm_irq_routing_table {};
#endif
+#ifndef KVM_MEM_SLOTS_NUM
+#define KVM_MEM_SLOTS_NUM (KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS)
+#endif
+
struct kvm_memslots {
int nmemslots;
u64 generation;
- struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS +
- KVM_PRIVATE_MEM_SLOTS];
+ struct kvm_memory_slot memslots[KVM_MEM_SLOTS_NUM];
};
struct kvm {