From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "open list:S390 TCG CPUs" <qemu-s390x@nongnu.org>,
Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>,
qemu-devel@nongnu.org, David Hildenbrand <david@redhat.com>
Subject: Re: [RFC PATCH] target/s390x: don't double ld_code() when reading instructions
Date: Tue, 12 Oct 2021 15:52:13 +0100 [thread overview]
Message-ID: <87lf2ywap4.fsf@linaro.org> (raw)
In-Reply-To: <b512ff29-4db2-5574-7e2b-b806db624d0e@linaro.org>
Richard Henderson <richard.henderson@linaro.org> writes:
> On 10/12/21 2:31 AM, Alex Bennée wrote:
>> For the 4 byte instruction case we started doing an ld_code2 and then
>> reloaded the data with ld_code4 once it was identified as a 4 byte op.
>> This is confusing for the plugin hooks which are expecting to see
>> simple sequential loading so end up reporting a malformed 6 byte
>> instruction buffer.
>
> I think the plugin stuff could be more clever, knowing where the read
> occurs within the sequence. Otherwise, we should simplify the
> interface so that it is not possible to make this mistake.
It's plugin_insn_append which is doing the tracking here so we could
extend the interface to include the current pc of the load and make the
appropriate adjustments. That said it's a bunch hoops to jump every
instruction when we could just as easily add an assert and fix up any
cases where we do. I guess it comes down to how prevalent double dipping
in the instruction stream is when constructing a translation?
What happens if the protection of the code area changes half way through
a translation? Could a mapping change in flight?
>
>
> r~
--
Alex Bennée
next prev parent reply other threads:[~2021-10-12 15:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 9:31 [RFC PATCH] target/s390x: don't double ld_code() when reading instructions Alex Bennée
2021-10-12 12:07 ` Richard Henderson
2021-10-12 12:10 ` Richard Henderson
2021-10-12 14:52 ` Alex Bennée [this message]
2021-10-12 15:38 ` Richard Henderson
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=87lf2ywap4.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.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 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.