]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
KVM: struct kvm_memory_slot.flags -> u32
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 10 Dec 2012 17:33:26 +0000 (10:33 -0700)
committerMarcelo Tosatti <mtosatti@redhat.com>
Fri, 14 Dec 2012 01:25:24 +0000 (23:25 -0200)
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>
include/linux/kvm_host.h

index d897f035749f164164df28205255047da9fdddd3..fec607537fa378a89d08b1ac81f5b4cf4c21a1df 100644 (file)
@@ -266,10 +266,10 @@ static inline int kvm_vcpu_exiting_guest_mode(struct kvm_vcpu *vcpu)
 struct kvm_memory_slot {
        gfn_t base_gfn;
        unsigned long npages;
-       unsigned long flags;
        unsigned long *dirty_bitmap;
        struct kvm_arch_memory_slot arch;
        unsigned long userspace_addr;
+       u32 flags;
        int id;
        bool user_alloc;
 };