Blob Blame History Raw
From 61f0e94fd78c21f2d7e1b2893dc11103399a0efe Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Mon, 22 Jul 2019 18:22:12 +0100
Subject: [PATCH 31/39] target-i386: kvm: do not initialize padding fields

RH-Author: Paolo Bonzini <pbonzini@redhat.com>
Message-id: <20190722182220.19374-11-pbonzini@redhat.com>
Patchwork-id: 89627
O-Subject: [RHEL-8.1.0 PATCH qemu-kvm v3 10/18] target-i386: kvm: do not initialize padding fields
Bugzilla: 1689269
RH-Acked-by: Peter Xu <zhexu@redhat.com>
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

The exception.pad field is going to be renamed to pending in an upcoming
header file update.  Remove the unnecessary initialization; it was
introduced to please valgrind (commit 7e680753cfa2) but they were later
rendered unnecessary by commit 076796f8fd27f4d, which added the "= {}"
initializer to the declaration of "events".  Therefore the patch does
not change behavior in any way.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit b31c003895b030bea1319037d6bec976d47d9020)
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
 target/i386/kvm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index f741e8b..8a6da90 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -2696,7 +2696,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level)
     events.exception.nr = env->exception_injected;
     events.exception.has_error_code = env->has_error_code;
     events.exception.error_code = env->error_code;
-    events.exception.pad = 0;
 
     events.interrupt.injected = (env->interrupt_injected >= 0);
     events.interrupt.nr = env->interrupt_injected;
@@ -2705,7 +2704,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level)
     events.nmi.injected = env->nmi_injected;
     events.nmi.pending = env->nmi_pending;
     events.nmi.masked = !!(env->hflags2 & HF2_NMI_MASK);
-    events.nmi.pad = 0;
 
     events.sipi_vector = env->sipi_vector;
     events.flags = 0;
-- 
1.8.3.1