From: Richard Henderson <rth@twiddle.net>
To: Clemens Kolbitsch <kolbitsch@lastline.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Self-modifying code with REP-prefix on TCG
Date: Tue, 19 Nov 2013 17:18:40 +1000 [thread overview]
Message-ID: <528B10D0.3010806@twiddle.net> (raw)
In-Reply-To: <CAN+VXVNEkx0E2Uv+Jpui5+Rd9K2-=-nWbpEtawP+MhC1gM=RRQ@mail.gmail.com>
On 11/19/2013 05:47 AM, Clemens Kolbitsch wrote:
> Getting around this is not trivial, so if it's a new issue, does anyone have an
> idea how to approach it most meaningfully? I was thinking about detecting this
> very specific case and marking the TB for re-translation only after the TB is
> exited, but this is not very clean and also somewhat prone to errors.
>
I don't believe there are any good solutions for this.
See what's enabled by TARGET_HAS_PRECISE_SMC wrt flushing and re-generating TBs
for other bits of self-modifying code. Which are strictly at odds with the
desire here to continue executing the same REP.
I have a feeling even your example isn't robust even on real HW, in that if any
kind of interrupt occurs, the REP will terminate and (if overwritten) fail to
restart. Even with CLI, system management interrupts can still occur.
r~
prev parent reply other threads:[~2013-11-19 7:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 19:47 [Qemu-devel] Self-modifying code with REP-prefix on TCG Clemens Kolbitsch
2013-11-19 7:18 ` Richard Henderson [this message]
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=528B10D0.3010806@twiddle.net \
--to=rth@twiddle.net \
--cc=kolbitsch@lastline.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.