]> git.proxmox.com Git - mirror_qemu.git/commit
tcg: Define and use new tlb_hit() and tlb_hit_page() functions
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 29 Jun 2018 16:21:21 +0000 (17:21 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 2 Jul 2018 15:02:20 +0000 (08:02 -0700)
commit334692bce7f0653a93b8d84ecde8c847b08dec38
tree0bb2be80e0d9e50e9afc5b4545739497881898a3
parenta688e73ba8c2e3b6f3e5e683c4a9c37d2ddc8984
tcg: Define and use new tlb_hit() and tlb_hit_page() functions

The condition to check whether an address has hit against a particular
TLB entry is not completely trivial. We do this in various places, and
in fact in one place (get_page_addr_code()) we have got the condition
wrong. Abstract it out into new tlb_hit() and tlb_hit_page() inline
functions (one for a known-page-aligned address and one for an
arbitrary address), and use them in all the places where we had the
condition correct.

This is a no-behaviour-change patch; we leave fixing the buggy
code in get_page_addr_code() to a subsequent patch.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180629162122.19376-2-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/cputlb.c
accel/tcg/softmmu_template.h
include/exec/cpu-all.h
include/exec/cpu_ldst.h