]> git.proxmox.com Git - mirror_qemu.git/commit
valgrind/i386: avoid false positives on KVM_SET_MSRS ioctl
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 30 Oct 2014 08:27:34 +0000 (09:27 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Dec 2014 11:21:01 +0000 (12:21 +0100)
commitc7fe4b12984a36b87438080e48aff5e8f6d48ac9
tree7559264f8be1fbac5a2e4089b955ef07e7d1ee7e
parentbdfc8480c50a53d91aa9a513d23a84de0d5fbc86
valgrind/i386: avoid false positives on KVM_SET_MSRS ioctl

struct kvm_msrs contains padding bytes. Let's use a designated
initializer on the info part to avoid false positives from
valgrind/memcheck. Do the same for generic MSRS, the TSC and
feature control.

We also need to zero out the reserved fields in the entries.
We do this in kvm_msr_entry_set as suggested by Paolo. This
avoids a big memset that a designated initializer on the
full structure would do.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-i386/kvm.c