diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2012-12-10 12:33:26 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-12-13 20:25:24 -0500 |
commit | 6104f472a5ea287fbdcf4644e74867dfd905a018 (patch) | |
tree | eb244dd5de134b740bab31cd62bf9e7e69689448 /include | |
parent | f82a8cfe9354f5cdea55ebeceba3fd19051d3ee8 (diff) |
KVM: struct kvm_memory_slot.flags -> u32
struct kvm_userspace_memory_region.flags is a u32 with a comment that
bits 0 ~ 15 are visible to userspace and the other bits are reserved
for kvm internal use. KVM_MEMSLOT_INVALID is the only internal use
flag and it has a comment that bits 16 ~ 31 are internally used and
the other bits are visible to userspace.
Therefore, let's define this as a u32 so we don't waste bytes on LP64
systems. Move to the end of the struct for alignment.
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')
-rw-r--r-- | include/linux/kvm_host.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index d897f035749f..fec607537fa3 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -266,10 +266,10 @@ static inline int kvm_vcpu_exiting_guest_mode(struct kvm_vcpu *vcpu) | |||
266 | struct kvm_memory_slot { | 266 | struct kvm_memory_slot { |
267 | gfn_t base_gfn; | 267 | gfn_t base_gfn; |
268 | unsigned long npages; | 268 | unsigned long npages; |
269 | unsigned long flags; | ||
270 | unsigned long *dirty_bitmap; | 269 | unsigned long *dirty_bitmap; |
271 | struct kvm_arch_memory_slot arch; | 270 | struct kvm_arch_memory_slot arch; |
272 | unsigned long userspace_addr; | 271 | unsigned long userspace_addr; |
272 | u32 flags; | ||
273 | int id; | 273 | int id; |
274 | bool user_alloc; | 274 | bool user_alloc; |
275 | }; | 275 | }; |