3b07a936d3
Do not encode the pointer as a constant in the opcode stream. This pointer is specific to the cpu that first generated the translation, which runs into problems with both hot-pluggable cpus and user-only threads, as cpus are removed. It's also a potential correctness issue in the theoretical case of a slightly-heterogenous system, because if CPU 0 generates a TB and then CPU 1 executes it, CPU 1 will end up using CPU 0's hash table, which might have a wrong set of registers in it. (All our current systems are either completely homogenous, M-profile, or have CPUs sufficiently different that they wouldn't be sharing TBs anyway because the differences would show up in the TB flags, so the correctness issue is only theoretical, not practical.) Perform the lookup in either helper_access_check_cp_reg, or a new helper_lookup_cp_reg. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20230106194451.1213153-3-richard.henderson@linaro.org [PMM: added note in commit message about correctness issue] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
||
---|---|---|
.. | ||
hvf | ||
a32-uncond.decode | ||
a32.decode | ||
arch_dump.c | ||
arm_ldst.h | ||
arm-powerctl.c | ||
arm-powerctl.h | ||
common-semi-target.h | ||
cpregs.h | ||
cpu64.c | ||
cpu_tcg.c | ||
cpu-param.h | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
crypto_helper.c | ||
debug_helper.c | ||
gdbstub64.c | ||
gdbstub.c | ||
helper-a64.c | ||
helper-a64.h | ||
helper-mve.h | ||
helper-sme.h | ||
helper-sve.h | ||
helper.c | ||
helper.h | ||
hvf_arm.h | ||
idau.h | ||
internals.h | ||
iwmmxt_helper.c | ||
Kconfig | ||
kvm64.c | ||
kvm_arm.h | ||
kvm-consts.h | ||
kvm-stub.c | ||
kvm.c | ||
m_helper.c | ||
m-nocp.decode | ||
machine.c | ||
meson.build | ||
monitor.c | ||
mte_helper.c | ||
mve_helper.c | ||
mve.decode | ||
neon_helper.c | ||
neon-dp.decode | ||
neon-ls.decode | ||
neon-shared.decode | ||
op_addsub.h | ||
op_helper.c | ||
pauth_helper.c | ||
psci.c | ||
ptw.c | ||
sme_helper.c | ||
sme-fa64.decode | ||
sme.decode | ||
sve_helper.c | ||
sve_ldst_internal.h | ||
sve.decode | ||
syndrome.h | ||
t16.decode | ||
t32.decode | ||
tlb_helper.c | ||
trace-events | ||
trace.h | ||
translate-a32.h | ||
translate-a64.c | ||
translate-a64.h | ||
translate-m-nocp.c | ||
translate-mve.c | ||
translate-neon.c | ||
translate-sme.c | ||
translate-sve.c | ||
translate-vfp.c | ||
translate.c | ||
translate.h | ||
vec_helper.c | ||
vec_internal.h | ||
vfp_helper.c | ||
vfp-uncond.decode | ||
vfp.decode |