diff mbox series

[PULL,06/48] target-i386: kvm: do not initialize padding fields

Message ID 1539894735-14232-7-git-send-email-pbonzini@redhat.com
State New
Headers show
Series [PULL,01/48] es1370: more fixes for ADC_FRAMEADR and ADC_FRAMECNT | expand

Commit Message

Paolo Bonzini Oct. 18, 2018, 8:31 p.m. UTC
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.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/kvm.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Peter Maydell Oct. 19, 2018, 9:03 a.m. UTC | #1
On 18 October 2018 at 21:31, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 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.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
Paolo Bonzini Oct. 19, 2018, 11:44 a.m. UTC | #2
On 19/10/2018 11:03, Peter Maydell wrote:
> On 18 October 2018 at 21:31, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> 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.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> 
> thanks
> -- PMM
> 

I'll include your R-b in v3.

Paolo
diff mbox series

Patch

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index dc4047b..302f420 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -2686,7 +2686,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;
@@ -2695,7 +2694,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;