diff options
| author | Alex Williamson <alex.williamson@redhat.com> | 2012-12-10 12:33:32 -0500 |
|---|---|---|
| committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-12-13 20:25:24 -0500 |
| commit | 1e702d9af5d633cf0eca76f6340b3c50fbb5a4e5 (patch) | |
| tree | d4ef29de97fc976ed7245c629b6f8a41fd660f86 /include/linux | |
| parent | 6104f472a5ea287fbdcf4644e74867dfd905a018 (diff) | |
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')
| -rw-r--r-- | include/linux/kvm_host.h | 4 |
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 { | |||
| 270 | struct kvm_arch_memory_slot arch; | 270 | struct kvm_arch_memory_slot arch; |
| 271 | unsigned long userspace_addr; | 271 | unsigned long userspace_addr; |
| 272 | u32 flags; | 272 | u32 flags; |
| 273 | int id; | 273 | short id; |
| 274 | bool user_alloc; | 274 | bool user_alloc; |
| 275 | }; | 275 | }; |
| 276 | 276 | ||
| @@ -330,7 +330,7 @@ struct kvm_memslots { | |||
| 330 | u64 generation; | 330 | u64 generation; |
| 331 | struct kvm_memory_slot memslots[KVM_MEM_SLOTS_NUM]; | 331 | struct kvm_memory_slot memslots[KVM_MEM_SLOTS_NUM]; |
| 332 | /* The mapping table from slot id to the index in memslots[]. */ | 332 | /* The mapping table from slot id to the index in memslots[]. */ |
| 333 | int id_to_index[KVM_MEM_SLOTS_NUM]; | 333 | short id_to_index[KVM_MEM_SLOTS_NUM]; |
| 334 | }; | 334 | }; |
| 335 | 335 | ||
| 336 | struct kvm { | 336 | struct kvm { |
