From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org, pbonzini@redhat.com,
edgar.iglesias@xilinx.com, cota@braap.org
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [RFC DEBUG PATCH 0/3] debug patch for lookup-ptr hang
Date: Fri, 9 Jun 2017 18:00:57 +0100 [thread overview]
Message-ID: <20170609170100.3599-1-alex.bennee@linaro.org> (raw)
Hi,
These are debug patches only but represent how much I have narrowed
down the problem so far. I've included Thomas' patch to fix the
thread=single|multi option as that is currently broken upstream. So
far it seems though the problem is unrelated to multi-threading.
As discussed in the other thread I found not returning to a
tb_htable_lookup but adding it to the tb_jmp_cache made the problem go
away. I also tried various printfs but they also seemed to un-wedge
the hang I was seeing. It is not really a hang rather than a busy-spin
that will eventually given enough time unwind.
So added a new TB flag (is_magic) which if set would skip returning
the code ptr and default to exiting the loop via the epilogue and set
it for all DISAS_JUMP/DISAS_UPDATE paths that trigger
lookup_and_goto_ptr. After selectively commenting them out I found the
RET instruction is responsible for my particular fail case.
I find this confusing because BL and BLR basically do the same thing
and they seem to work fine.
I have an uneasy feeling there is some subtle black magic in the
interaction between cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags),
addr and the TCGv cpu_pc but I haven't nailed it down. I'm posting
this for those that still have some Friday left in case it prompts any
thoughts.
Over to you, hopefully inspiration will strike before I return to the
fray on Monday ;-)
Cheers,
Alex Bennée (2):
tcg-runtime: light re-factor of lookup_tb_ptr
translate-a64: fix lookup_tb_ptr hang (DEBUG!)
Thomas Huth (1):
vl: Fix broken thread=xxx option of the --accel parameter
include/exec/exec-all.h | 2 ++
target/arm/translate-a64.c | 21 +++++++++++++++++----
target/arm/translate.h | 2 ++
tcg-runtime.c | 37 +++++++++++++++++++++----------------
vl.c | 13 +++++--------
5 files changed, 47 insertions(+), 28 deletions(-)
--
2.13.0
next reply other threads:[~2017-06-09 17:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 17:00 Alex Bennée [this message]
2017-06-09 17:00 ` [Qemu-devel] [RFC DEBUG PATCH 1/3] vl: Fix broken thread=xxx option of the --accel parameter Alex Bennée
2017-06-09 17:00 ` [Qemu-devel] [RFC DEBUG PATCH 2/3] tcg-runtime: light re-factor of lookup_tb_ptr Alex Bennée
2017-06-09 17:01 ` [Qemu-devel] [RFC DEBUG PATCH 3/3] translate-a64: fix lookup_tb_ptr hang (DEBUG!) Alex Bennée
2017-06-10 2:29 ` Richard Henderson
2017-06-10 8:51 ` Alex Bennée
2017-06-10 16:59 ` Richard Henderson
2017-06-11 5:07 ` Emilio G. Cota
2017-06-12 10:31 ` Alex Bennée
2017-06-13 22:53 ` [Qemu-devel] [PATCH] target/aarch64: exit to main loop after handling MSR Emilio G. Cota
2017-06-13 23:01 ` no-reply
2017-06-14 4:48 ` Richard Henderson
2017-06-14 10:46 ` Paolo Bonzini
2017-06-14 11:45 ` Alex Bennée
2017-06-14 12:02 ` Paolo Bonzini
2017-06-14 12:14 ` Alex Bennée
2017-06-14 12:16 ` Paolo Bonzini
2017-06-14 12:35 ` Alex Bennée
2017-06-14 12:43 ` Paolo Bonzini
2017-06-14 10:38 ` Alex Bennée
2017-06-09 21:11 ` [Qemu-devel] [RFC DEBUG PATCH 0/3] debug patch for lookup-ptr hang no-reply
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=20170609170100.3599-1-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=cota@braap.org \
--cc=edgar.iglesias@xilinx.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).