[PATCH 0/2] accel/tcg: fix page invalidation in tb_invalidate_phys_range()

Mark Cave-Ayland posted 2 patches 10 months, 3 weeks ago
Failed in applying to current master (apply log)
accel/tcg/tb-maint.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
[PATCH 0/2] accel/tcg: fix page invalidation in tb_invalidate_phys_range()
Posted by Mark Cave-Ayland 10 months, 3 weeks ago
This series contains 2 patches: the first is a fix for page invalidation in
tb_invalidate_phys_range() which resolves the crash reported by Howard and
Cédric when booting MacOS 9 under qemu-system-ppc -M mac99,via=pmu.

The second patch adds an assert() to tb_invalidate_phys_page_range__locked()
which is enabled by --enable-debug-tcg to ensure that both the start and last
addresses are within the same target page.

I've confirmed that this assert() is first triggered by the commit that
initially introduced the bug e506ad6a05 ("accel/tcg: Pass last not end to
tb_invalidate_phys_range") when building QEMU with --enable-debug and
doesn't trigger after the series is applied.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


Mark Cave-Ayland (2):
  accel/tcg: fix start page passed to
    tb_invalidate_phys_page_range__locked()
  accel/tcg: add assert() check in
    tb_invalidate_phys_page_range__locked()

 accel/tcg/tb-maint.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

-- 
2.30.2


Re: [PATCH 0/2] accel/tcg: fix page invalidation in tb_invalidate_phys_range()
Posted by Richard Henderson 10 months, 3 weeks ago
On 6/29/23 10:25, Mark Cave-Ayland wrote:
> This series contains 2 patches: the first is a fix for page invalidation in
> tb_invalidate_phys_range() which resolves the crash reported by Howard and
> Cédric when booting MacOS 9 under qemu-system-ppc -M mac99,via=pmu.
> 
> The second patch adds an assert() to tb_invalidate_phys_page_range__locked()
> which is enabled by --enable-debug-tcg to ensure that both the start and last
> addresses are within the same target page.
> 
> I've confirmed that this assert() is first triggered by the commit that
> initially introduced the bug e506ad6a05 ("accel/tcg: Pass last not end to
> tb_invalidate_phys_range") when building QEMU with --enable-debug and
> doesn't trigger after the series is applied.
> 
> Signed-off-by: Mark Cave-Ayland<mark.cave-ayland@ilande.co.uk>
> 
> 
> Mark Cave-Ayland (2):
>    accel/tcg: fix start page passed to
>      tb_invalidate_phys_page_range__locked()
>    accel/tcg: add assert() check in
>      tb_invalidate_phys_page_range__locked()

Queued to tcg-next, with some wording changes.
And to use tcg_debug_assert instead of the ifdef.


r~