On 8/14/24 16:09, Nicholas Piggin wrote:
@@ -1107,6 +1107,9 @@ tb_invalidate_phys_page_range__locked(struct
page_collection *pages,
TranslationBlock *current_tb = retaddr ? tcg_tb_lookup(retaddr) : NULL;
#endif /* TARGET_HAS_PRECISE_SMC */
+ start &= TARGET_PAGE_MASK;
+ last |= ~TARGET_PAGE_MASK;
+
/* Range may not cross a page. */
tcg_debug_assert(((start ^ last) & TARGET_PAGE_MASK) == 0);
This would definitely break SMC.
They can't invalidate the instruction currently being executed?
They can. But that's where adjusting start/last would break things, because we've lost
track of exactly what's being modified, which changes the result of "did we modify the
current instruction".
r~