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

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