]> git.proxmox.com Git - mirror_qemu.git/commit
tcg: Widen CPUTLBEntry comparators to 64-bits
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 24 Mar 2023 20:02:59 +0000 (13:02 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 5 Jun 2023 19:04:28 +0000 (12:04 -0700)
commit238f43809a85a47cfbbc2e1d6aff4640fec30328
treed60c778ef821469bde1ba5ed8fe18169fc2941e6
parentff0c61bf35fbeffd5c0f85a0b67b49ccb65e04f5
tcg: Widen CPUTLBEntry comparators to 64-bits

This makes CPUTLBEntry agnostic to the address size of the guest.
When 32-bit addresses are in effect, we can simply read the low
32 bits of the 64-bit field.  Similarly when we need to update
the field for setting TLB_NOTDIRTY.

For TCG backends that could in theory be big-endian, but in
practice are not (arm, loongarch, riscv), use QEMU_BUILD_BUG_ON
to document and ensure this is not accidentally missed.

For s390x, which is always big-endian, use HOST_BIG_ENDIAN anyway,
to document the reason for the adjustment.

For sparc64 and ppc64, always perform a 64-bit load, and rely on
the following 32-bit comparison to ignore the high bits.

Rearrange mips and ppc if ladders for clarity.

Reviewed-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/cputlb.c
include/exec/cpu-defs.h
include/exec/cpu_ldst.h
tcg/aarch64/tcg-target.c.inc
tcg/arm/tcg-target.c.inc
tcg/loongarch64/tcg-target.c.inc
tcg/mips/tcg-target.c.inc
tcg/ppc/tcg-target.c.inc
tcg/riscv/tcg-target.c.inc
tcg/s390x/tcg-target.c.inc
tcg/sparc64/tcg-target.c.inc