]> git.proxmox.com Git - mirror_qemu.git/commit
accel/tcg: Call tb_invalidate_phys_page for PAGE_RESET
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 5 Oct 2022 16:44:52 +0000 (09:44 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 26 Oct 2022 01:11:28 +0000 (11:11 +1000)
commit8f39e01db9f82033543f707f7b06f81cb675ff67
tree6eb1fd76a6fd6749587722789e7dab1a3048aaf9
parent24ace1ac3cf4d64bc76b543224c1c0379fa34b51
accel/tcg: Call tb_invalidate_phys_page for PAGE_RESET

When PAGE_RESET is set, we are replacing pages with new
content, which means that we need to invalidate existing
cached data, such as TranslationBlocks.  Perform the
reset invalidate while we're doing other invalidates,
which allows us to remove the separate invalidates from
the user-only mmap/munmap/mprotect routines.

In addition, restrict invalidation to PAGE_EXEC pages.
Since cdf713085131, we have validated PAGE_EXEC is present
before translation, which means we can assume that if the
bit is not present, there are no translations to invalidate.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/translate-all.c
bsd-user/mmap.c
linux-user/mmap.c