From: Alvise Rigo <a.rigo@virtualopensystems.com>
To: mttcg@listserver.greensocs.com, alex.bennee@linaro.org
Cc: qemu-devel@nongnu.org, jani.kokkonen@huawei.com,
claudio.fontana@huawei.com, tech@virtualopensystems.com,
fred.konrad@greensocs.com, pbonzini@redhat.com, rth@twiddle.net,
serge.fdrv@gmail.com, cota@braap.org, peter.maydell@linaro.org,
Alvise Rigo <a.rigo@virtualopensystems.com>
Subject: [Qemu-devel] [RFC 05/10] target-arm: End TB after ldrex instruction
Date: Thu, 26 May 2016 18:35:44 +0200 [thread overview]
Message-ID: <20160526163549.3276-6-a.rigo@virtualopensystems.com> (raw)
In-Reply-To: <20160526163549.3276-1-a.rigo@virtualopensystems.com>
A VCPU executing a ldrex instruction might query flushes to other VCPUs:
in this cases, the calling VCPU uses cpu_exit to exit from the cpu loop
and wait the other VCPUs to perform the flush. In order to exit from the
cpu loop as soon as possible, interrupt the TB after the ldrex
instruction.
Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com>
---
target-arm/translate-a64.c | 2 ++
target-arm/translate.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
index 376cb1c..2a14c14 100644
--- a/target-arm/translate-a64.c
+++ b/target-arm/translate-a64.c
@@ -1875,6 +1875,8 @@ static void disas_ldst_excl(DisasContext *s, uint32_t insn)
if (!is_store) {
s->is_ldex = true;
gen_load_exclusive(s, rt, rt2, tcg_addr, size, is_pair);
+ gen_a64_set_pc_im(s->pc);
+ s->is_jmp = DISAS_JUMP;
} else {
gen_store_exclusive(s, rs, rt, rt2, tcg_addr, size, is_pair);
}
diff --git a/target-arm/translate.c b/target-arm/translate.c
index 0677e04..7c1cb19 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -8807,6 +8807,8 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn)
default:
abort();
}
+ gen_set_pc_im(s, s->pc);
+ s->is_jmp = DISAS_JUMP;
} else {
rm = insn & 0xf;
switch (op1) {
--
2.8.3
next prev parent reply other threads:[~2016-05-26 16:36 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 16:35 [Qemu-devel] [RFC 00/10] MTTCG: Slow-path for atomic insns Alvise Rigo
2016-05-26 16:35 ` [Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}() Alvise Rigo
2016-05-31 15:03 ` Pranith Kumar
2016-06-02 16:21 ` alvise rigo
2016-06-08 9:21 ` Alex Bennée
2016-06-08 10:00 ` alvise rigo
2016-06-08 11:32 ` Peter Maydell
2016-06-08 13:52 ` Alex Bennée
2016-05-26 16:35 ` [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading Alvise Rigo
2016-06-10 15:21 ` Sergey Fedorov
2016-06-10 15:53 ` alvise rigo
2016-06-10 16:00 ` Sergey Fedorov
2016-06-10 16:04 ` alvise rigo
2016-06-14 12:00 ` Alex Bennée
2016-06-14 12:58 ` alvise rigo
2016-06-14 13:14 ` Alex Bennée
2016-06-10 16:15 ` Alex Bennée
2016-06-11 19:53 ` Sergey Fedorov
2016-06-14 8:37 ` Alex Bennée
2016-06-14 9:31 ` Sergey Fedorov
2016-05-26 16:35 ` [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu() Alvise Rigo
2016-06-08 13:54 ` Alex Bennée
2016-06-08 14:10 ` alvise rigo
2016-06-08 14:53 ` Sergey Fedorov
2016-06-08 15:20 ` Alex Bennée
2016-06-08 16:24 ` alvise rigo
2016-06-13 9:26 ` Alex Bennée
2016-05-26 16:35 ` [Qemu-devel] [RFC 04/10] cputlb: Introduce tlb_flush_other() Alvise Rigo
2016-05-26 16:35 ` Alvise Rigo [this message]
2016-05-26 16:35 ` [Qemu-devel] [RFC 06/10] cputlb: Add tlb_tables_flush_bitmap() Alvise Rigo
2016-05-26 16:35 ` [Qemu-devel] [RFC 07/10] cputlb: Query tlb_flush_by_mmuidx Alvise Rigo
2016-05-26 16:35 ` [Qemu-devel] [RFC 08/10] cputlb: Query tlb_flush_page_by_mmuidx Alvise Rigo
2016-05-26 16:35 ` [Qemu-devel] [RFC 09/10] cputlb: Query tlb_flush_page_all Alvise Rigo
2016-05-26 16:35 ` [Qemu-devel] [RFC 10/10] cpus: Do not sleep if some work item is pending Alvise Rigo
2016-06-10 15:21 ` [Qemu-devel] [RFC 00/10] MTTCG: Slow-path for atomic insns Alex Bennée
2016-06-10 15:30 ` alvise rigo
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=20160526163549.3276-6-a.rigo@virtualopensystems.com \
--to=a.rigo@virtualopensystems.com \
--cc=alex.bennee@linaro.org \
--cc=claudio.fontana@huawei.com \
--cc=cota@braap.org \
--cc=fred.konrad@greensocs.com \
--cc=jani.kokkonen@huawei.com \
--cc=mttcg@listserver.greensocs.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=serge.fdrv@gmail.com \
--cc=tech@virtualopensystems.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).