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

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