qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Richard Henderson <richard.henderson@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH RFC 0/1] tcg: Always pass the full write size to notdirty_write()
Date: Mon,  7 Aug 2023 15:56:36 +0200	[thread overview]
Message-ID: <20230807141846.786530-1-iii@linux.ibm.com> (raw)

Hi,

this is the fix for an issue I complained about a few days back on the
IRC. Unfortunately my reproducer [1] does not work anymore, so I'm
sending this separately and as an RFC.

The user-visible effect was that:

- If a TB writes to itself;
- The address of the write is before the TB start;
- The newly written instruction causes an exception;
- Then single-stepping the instruction that does a write gets you to
  an interrupt handler and not to the newly written "bad" instruction.

You can still see that something is wrong with the softmmu reproducer
in the debugger though. In helper_vstl(), probe_write_access() does not
lead to cpu_loop_exit_noexc() - which I think it should, but
cpu_stq_be_data_ra() still does, masking the issue.

Best regards,
Ilya

[1] https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg01081.html

Ilya Leoshkevich (1):
  tcg: Always pass the full write size to notdirty_write()

 accel/tcg/cputlb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.41.0



             reply	other threads:[~2023-08-07 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 13:56 Ilya Leoshkevich [this message]
2023-08-07 13:56 ` [PATCH RFC 1/1] tcg: Always pass the full write size to notdirty_write() Ilya Leoshkevich
2023-08-07 18:21   ` Richard Henderson
2023-08-08  9:59     ` Ilya Leoshkevich
2023-08-08 14:23       ` 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=20230807141846.786530-1-iii@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).