From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>
Cc: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Subject: [Qemu-devel] [PATCH v2 2/4] target-i386: Allow interrupt injection after STGI
Date: Tue, 3 Apr 2018 17:36:12 +0200 [thread overview]
Message-ID: <37939b244dda0e9cccf96ce50f2b15df1e48315d.1522769774.git.jan.kiszka@web.de> (raw)
In-Reply-To: <cover.1522769774.git.jan.kiszka@web.de>
In-Reply-To: <cover.1522769774.git.jan.kiszka@web.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
We need to terminate the translation block after STGI so that pending
interrupts can be injected.
This fixes pending NMI injection for Jailhouse which uses "stgi; clgi"
to open a brief injection window.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
target/i386/translate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 0135415d92..71d97876c7 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -7450,8 +7450,9 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
break;
}
gen_update_cc_op(s);
- gen_jmp_im(pc_start - s->cs_base);
gen_helper_stgi(cpu_env);
+ gen_jmp_im(s->pc - s->cs_base);
+ gen_eob(s);
break;
case 0xdd: /* CLGI */
--
2.13.6
next prev parent reply other threads:[~2018-04-03 15:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 15:36 [Qemu-devel] [PATCH v2 0/4] target-i386: Enhance SVM support Jan Kiszka
2018-04-03 15:36 ` [Qemu-devel] [PATCH v2 1/4] target-i386: Add NMI interception to SVM Jan Kiszka
2018-04-03 15:36 ` Jan Kiszka [this message]
2018-04-03 15:36 ` [Qemu-devel] [PATCH v2 3/4] target-i386: Mark cpu_vmexit noreturn Jan Kiszka
2018-04-03 15:36 ` [Qemu-devel] [PATCH v2 4/4] target-i386: Add NPT support Jan Kiszka
2018-06-27 12:14 ` Paolo Bonzini
2018-06-30 5:25 ` Jan Kiszka
2018-06-30 6:05 ` Paolo Bonzini
2018-06-30 6:07 ` Jan Kiszka
2018-04-03 15:48 ` [Qemu-devel] [PATCH v2 0/4] target-i386: Enhance SVM support no-reply
2018-05-22 7:12 ` Jan Kiszka
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=37939b244dda0e9cccf96ce50f2b15df1e48315d.1522769774.git.jan.kiszka@web.de \
--to=jan.kiszka@web.de \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=valentine.sinitsyn@gmail.com \
/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).