aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2014-10-30 09:33:23 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-12-15 12:21:01 +0100
commitd19ae73e987ecc13a89c0830b501341103d06982 (patch)
treeed3e2c1a81c8825e06e635dccfb596ebfe93cd4d /target-i386
parentc7fe4b12984a36b87438080e48aff5e8f6d48ac9 (diff)
downloadqemu-d19ae73e987ecc13a89c0830b501341103d06982.zip
qemu-d19ae73e987ecc13a89c0830b501341103d06982.tar.gz
qemu-d19ae73e987ecc13a89c0830b501341103d06982.tar.bz2
valgrind/i386: avoid false positives on KVM_GET_MSRS ioctl
struct kvm_msrs contains a pad field. Let's use a designated initializer on the info part to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/kvm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 93927bd..1762c2e 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -1655,7 +1655,10 @@ static int kvm_get_msrs(X86CPU *cpu)
}
}
- msr_data.info.nmsrs = n;
+ msr_data.info = (struct kvm_msrs) {
+ .nmsrs = n,
+ };
+
ret = kvm_vcpu_ioctl(CPU(cpu), KVM_GET_MSRS, &msr_data);
if (ret < 0) {
return ret;