From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] target-i386: kvm: do not initialize padding fields
Date: Thu, 18 Oct 2018 14:33:32 +0200 [thread overview]
Message-ID: <20181018123332.23518-1-pbonzini@redhat.com> (raw)
The exception.pad field is going to be renamed to pending in an upcoming header
file update. Remove the unnecessary initialization.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
| 5 +----
target/i386/kvm.c | 2 --
2 files changed, 1 insertion(+), 6 deletions(-)
--git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
index 7a7acf9e47..dabfcf7c39 100644
--- a/linux-headers/asm-x86/kvm.h
+++ b/linux-headers/asm-x86/kvm.h
@@ -300,10 +300,7 @@ struct kvm_vcpu_events {
__u8 injected;
__u8 nr;
__u8 has_error_code;
- union {
- __u8 pad;
- __u8 pending;
- }
+ __u8 pending;
__u32 error_code;
} exception;
struct {
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 6e5f951f4f..74193b1b9d 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;
--
2.17.1
next reply other threads:[~2018-10-18 12:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 12:33 Paolo Bonzini [this message]
2018-10-18 13:03 ` [Qemu-devel] [PATCH] target-i386: kvm: do not initialize padding fields Peter Maydell
2018-10-18 14:30 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181018123332.23518-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).