Skip to content

Commit 6104f47

Browse files
Alex Williamsonmatosatti
authored andcommitted
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>
1 parent f82a8cf commit 6104f47

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/linux/kvm_host.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,10 @@ static inline int kvm_vcpu_exiting_guest_mode(struct kvm_vcpu *vcpu)
266266
struct kvm_memory_slot {
267267
gfn_t base_gfn;
268268
unsigned long npages;
269-
unsigned long flags;
270269
unsigned long *dirty_bitmap;
271270
struct kvm_arch_memory_slot arch;
272271
unsigned long userspace_addr;
272+
u32 flags;
273273
int id;
274274
bool user_alloc;
275275
};

0 commit comments

Comments
 (0)