valgrind/i386: avoid false positives on KVM_SET_XCRS ioctl
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 30 Oct 2014 08:23:41 +0000 (09:23 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Dec 2014 11:21:01 +0000 (12:21 +0100)
struct kvm_xcrs contains padding bytes. Let's use a designated
initializer to avoid false positives from valgrind/memcheck.

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

index 3a3dfc4795fcbbc2709a3014f0b3ec154be96dc5..42f8def0fa2741a5e4e7ca174de42fef4bf10a2f 100644 (file)
@@ -1085,7 +1085,7 @@ static int kvm_put_xsave(X86CPU *cpu)
 static int kvm_put_xcrs(X86CPU *cpu)
 {
     CPUX86State *env = &cpu->env;
-    struct kvm_xcrs xcrs;
+    struct kvm_xcrs xcrs = {};
 
     if (!kvm_has_xcrs()) {
         return 0;