yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-target-i386-kvm-do-not-initialize-padding-fields.patch

Pablo Greco e6a3ae
From 61f0e94fd78c21f2d7e1b2893dc11103399a0efe Mon Sep 17 00:00:00 2001
Pablo Greco e6a3ae
From: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
Date: Mon, 22 Jul 2019 18:22:12 +0100
Pablo Greco e6a3ae
Subject: [PATCH 31/39] target-i386: kvm: do not initialize padding fields
Pablo Greco e6a3ae
Pablo Greco e6a3ae
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
Message-id: <20190722182220.19374-11-pbonzini@redhat.com>
Pablo Greco e6a3ae
Patchwork-id: 89627
Pablo Greco e6a3ae
O-Subject: [RHEL-8.1.0 PATCH qemu-kvm v3 10/18] target-i386: kvm: do not initialize padding fields
Pablo Greco e6a3ae
Bugzilla: 1689269
Pablo Greco e6a3ae
RH-Acked-by: Peter Xu <zhexu@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
The exception.pad field is going to be renamed to pending in an upcoming
Pablo Greco e6a3ae
header file update.  Remove the unnecessary initialization; it was
Pablo Greco e6a3ae
introduced to please valgrind (commit 7e680753cfa2) but they were later
Pablo Greco e6a3ae
rendered unnecessary by commit 076796f8fd27f4d, which added the "= {}"
Pablo Greco e6a3ae
initializer to the declaration of "events".  Therefore the patch does
Pablo Greco e6a3ae
not change behavior in any way.
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Pablo Greco e6a3ae
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
(cherry picked from commit b31c003895b030bea1319037d6bec976d47d9020)
Pablo Greco e6a3ae
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Pablo Greco e6a3ae
---
Pablo Greco e6a3ae
 target/i386/kvm.c | 2 --
Pablo Greco e6a3ae
 1 file changed, 2 deletions(-)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
Pablo Greco e6a3ae
index f741e8b..8a6da90 100644
Pablo Greco e6a3ae
--- a/target/i386/kvm.c
Pablo Greco e6a3ae
+++ b/target/i386/kvm.c
Pablo Greco e6a3ae
@@ -2696,7 +2696,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level)
Pablo Greco e6a3ae
     events.exception.nr = env->exception_injected;
Pablo Greco e6a3ae
     events.exception.has_error_code = env->has_error_code;
Pablo Greco e6a3ae
     events.exception.error_code = env->error_code;
Pablo Greco e6a3ae
-    events.exception.pad = 0;
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
     events.interrupt.injected = (env->interrupt_injected >= 0);
Pablo Greco e6a3ae
     events.interrupt.nr = env->interrupt_injected;
Pablo Greco e6a3ae
@@ -2705,7 +2704,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level)
Pablo Greco e6a3ae
     events.nmi.injected = env->nmi_injected;
Pablo Greco e6a3ae
     events.nmi.pending = env->nmi_pending;
Pablo Greco e6a3ae
     events.nmi.masked = !!(env->hflags2 & HF2_NMI_MASK);
Pablo Greco e6a3ae
-    events.nmi.pad = 0;
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
     events.sipi_vector = env->sipi_vector;
Pablo Greco e6a3ae
     events.flags = 0;
Pablo Greco e6a3ae
-- 
Pablo Greco e6a3ae
1.8.3.1
Pablo Greco e6a3ae