summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorAlex Williamson2012-12-10 18:33:32 +0100
committerMarcelo Tosatti2012-12-14 02:25:24 +0100
commit1e702d9af5d633cf0eca76f6340b3c50fbb5a4e5 (patch)
treed4ef29de97fc976ed7245c629b6f8a41fd660f86 /include/linux/kvm_host.h
parentKVM: struct kvm_memory_slot.flags -> u32 (diff)
downloadkernel-qcow2-linux-1e702d9af5d633cf0eca76f6340b3c50fbb5a4e5.tar.gz
kernel-qcow2-linux-1e702d9af5d633cf0eca76f6340b3c50fbb5a4e5.tar.xz
kernel-qcow2-linux-1e702d9af5d633cf0eca76f6340b3c50fbb5a4e5.zip
KVM: struct kvm_memory_slot.id -> short
We're currently offering a whopping 32 memory slots to user space, an int is a bit excessive for storing this. We would like to increase our memslots, but SHRT_MAX should be more than enough. Reviewed-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index fec607537fa3..32fdc45ca35e 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -270,7 +270,7 @@ struct kvm_memory_slot {
struct kvm_arch_memory_slot arch;
unsigned long userspace_addr;
u32 flags;
- int id;
+ short id;
bool user_alloc;
};
@@ -330,7 +330,7 @@ struct kvm_memslots {
u64 generation;
struct kvm_memory_slot memslots[KVM_MEM_SLOTS_NUM];
/* The mapping table from slot id to the index in memslots[]. */
- int id_to_index[KVM_MEM_SLOTS_NUM];
+ short id_to_index[KVM_MEM_SLOTS_NUM];
};
struct kvm {