tcg: Invalidate all TBs on target page

This commit is contained in:
Matt Borgerson 2021-10-04 23:32:32 -07:00 committed by mborgerson
parent 42f8873b23
commit 703566ce33
1 changed files with 6 additions and 0 deletions

View File

@ -1689,7 +1689,9 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages,
uintptr_t retaddr)
{
TranslationBlock *tb;
#ifndef XBOX
tb_page_addr_t tb_start, tb_end;
#endif
int n;
#ifdef TARGET_HAS_PRECISE_SMC
CPUState *cpu = current_cpu;
@ -1715,6 +1717,7 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages,
the code */
PAGE_FOR_EACH_TB(p, tb, n) {
assert_page_locked(p);
#ifndef XBOX
/* NOTE: this is subtle as a TB may span two physical pages */
if (n == 0) {
/* NOTE: tb_end may be after the end of the page, but
@ -1726,6 +1729,9 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages,
tb_end = tb_start + ((tb->pc + tb->size) & ~TARGET_PAGE_MASK);
}
if (!(tb_end <= start || tb_start >= end)) {
#else
{
#endif
#ifdef TARGET_HAS_PRECISE_SMC
if (current_tb_not_found) {
current_tb_not_found = false;