aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2012-12-10 12:33:21 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2012-12-13 20:24:38 -0500
commitf82a8cfe9354f5cdea55ebeceba3fd19051d3ee8 (patch)
tree335e968cef697b7831c48849677de628cee4e73d /virt/kvm
parent0743247fbf0c4a27185b2aa1fdda91d0745dfed1 (diff)
KVM: struct kvm_memory_slot.user_alloc -> bool
There's no need for this to be an int, it holds a boolean. 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 'virt/kvm')
-rw-r--r--virt/kvm/kvm_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 5f0638cb6968..42c1eb73a0e3 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -709,7 +709,7 @@ static int check_memory_region_flags(struct kvm_userspace_memory_region *mem)
709 */ 709 */
710int __kvm_set_memory_region(struct kvm *kvm, 710int __kvm_set_memory_region(struct kvm *kvm,
711 struct kvm_userspace_memory_region *mem, 711 struct kvm_userspace_memory_region *mem,
712 int user_alloc) 712 bool user_alloc)
713{ 713{
714 int r; 714 int r;
715 gfn_t base_gfn; 715 gfn_t base_gfn;
@@ -889,7 +889,7 @@ EXPORT_SYMBOL_GPL(__kvm_set_memory_region);
889 889
890int kvm_set_memory_region(struct kvm *kvm, 890int kvm_set_memory_region(struct kvm *kvm,
891 struct kvm_userspace_memory_region *mem, 891 struct kvm_userspace_memory_region *mem,
892 int user_alloc) 892 bool user_alloc)
893{ 893{
894 int r; 894 int r;
895 895
@@ -903,7 +903,7 @@ EXPORT_SYMBOL_GPL(kvm_set_memory_region);
903int kvm_vm_ioctl_set_memory_region(struct kvm *kvm, 903int kvm_vm_ioctl_set_memory_region(struct kvm *kvm,
904 struct 904 struct
905 kvm_userspace_memory_region *mem, 905 kvm_userspace_memory_region *mem,
906 int user_alloc) 906 bool user_alloc)
907{ 907{
908 if (mem->slot >= KVM_USER_MEM_SLOTS) 908 if (mem->slot >= KVM_USER_MEM_SLOTS)
909 return -EINVAL; 909 return -EINVAL;
@@ -2148,7 +2148,7 @@ static long kvm_vm_ioctl(struct file *filp,
2148 sizeof kvm_userspace_mem)) 2148 sizeof kvm_userspace_mem))
2149 goto out; 2149 goto out;
2150 2150
2151 r = kvm_vm_ioctl_set_memory_region(kvm, &kvm_userspace_mem, 1); 2151 r = kvm_vm_ioctl_set_memory_region(kvm, &kvm_userspace_mem, true);
2152 break; 2152 break;
2153 } 2153 }
2154 case KVM_GET_DIRTY_LOG: { 2154 case KVM_GET_DIRTY_LOG: {