Skip to content
Snippets Groups Projects
Commit e665cf72 authored by Mark Cave-Ayland's avatar Mark Cave-Ayland Committed by Richard Henderson
Browse files

accel/tcg: Assert one page in tb_invalidate_phys_page_range__locked


Ensure that that both the start and last addresses are within
the same guest page.

Signed-off-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230629082522.606219-3-mark.cave-ayland@ilande.co.uk>
[rth: Use tcg_debug_assert, simplify the expression]
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent 3307e08c
No related branches found
No related tags found
No related merge requests found
......@@ -1092,6 +1092,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 */
/* Range may not cross a page. */
tcg_debug_assert(((start ^ last) & TARGET_PAGE_MASK) == 0);
/*
* We remove all the TBs in the range [start, last].
* XXX: see if in some cases it could be faster to invalidate all the code
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment