Skip to content

RFC tcg: Always pass the full write size to notdirty_write()

Ilya Leoshkevich qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1tcg: Always pass the full write size to notdirty_write()accel/tcg/cputlb.c+4 -43 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/1] tcg: Always pass the full write size to notdirty_write()

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(-)
Signature · 1 line
2.41.0