aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-02-29 17:54:29 +0200
committerAvi Kivity <avi@redhat.com>2012-03-07 12:31:48 +0200
commit7e680753cfa2986e0a8b3b222b6bf0b003c5eb69 (patch)
tree30e58d17254b14fc37130aa66b041edc1dd017a2 /kvm-all.c
parent5d17c0d2df4998598e6002b27b8e47e792899a0f (diff)
kvm: fill in padding to help valgrind
valgrind warns about padding fields which are passed to vcpu ioctls uninitialized. This is not an error in practice because kvm ignored padding. Since the ioctls in question are off data path and the cost is zero anyway, initialize padding to 0 to suppress these errors. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 278085fc2d..21c7dd28db 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -448,6 +448,7 @@ int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
zone.addr = start;
zone.size = size;
+ zone.pad = 0;
ret = kvm_vm_ioctl(s, KVM_REGISTER_COALESCED_MMIO, &zone);
}
@@ -465,6 +466,7 @@ int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
zone.addr = start;
zone.size = size;
+ zone.pad = 0;
ret = kvm_vm_ioctl(s, KVM_UNREGISTER_COALESCED_MMIO, &zone);
}