summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorEmilio G. Cota2018-06-25 18:31:42 +0200
committerRichard Henderson2018-07-02 17:02:20 +0200
commita688e73ba8c2e3b6f3e5e683c4a9c37d2ddc8984 (patch)
treeab984da818a04b6ba128d881cd16c22f59e8cabe /include/exec
parentMerge remote-tracking branch 'remotes/vivier/tags/m68k-for-3.0-pull-request' ... (diff)
downloadqemu-a688e73ba8c2e3b6f3e5e683c4a9c37d2ddc8984.tar.gz
qemu-a688e73ba8c2e3b6f3e5e683c4a9c37d2ddc8984.tar.xz
qemu-a688e73ba8c2e3b6f3e5e683c4a9c37d2ddc8984.zip
translate-all: fix locking of TBs whose two pages share the same physical page
Commit 0b5c91f ("translate-all: use per-page locking in !user-mode", 2018-06-15) introduced per-page locking. It assumed that the physical pages corresponding to a TB (at most two pages) are always distinct, which is wrong. For instance, an xtensa test provided by Max Filippov is broken by the commit, since the test maps two virtual pages to the same physical page: virt1: 7fff, virt2: 8000 phys1 6000fff, phys2 6000000 Fix it by removing the assumption from page_lock_pair. If the two physical page addresses are equal, we only lock the PageDesc once. Note that the two callers of page_lock_pair, namely page_unlock_tb and tb_link_page, are also updated so that we do not try to unlock the same PageDesc twice. Fixes: 0b5c91f74f3c83a36f37740969df8c775c997e69 Reported-by: Max Filippov <jcmvbkbc@gmail.com> Tested-by: Max Filippov <jcmvbkbc@gmail.com> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Message-Id: <1529944302-14186-1-git-send-email-cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions