mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 18:35:27 +00:00
fbbd582fb9
In arm_cpu_realizefn() we make several assertions about the values of guest ID registers: * if the CPU provides AArch32 v7VE or better it must advertise the ARM_DIV feature * if the CPU provides AArch32 A-profile v6 or better it must advertise the Jazelle feature These are essentially consistency checks that our ID register specifications in cpu.c didn't accidentally miss out a feature, because increasingly the TCG emulation gates features on the values in ID registers rather than using old-style checks of ARM_FEATURE_FOO bits. Unfortunately, these asserts can cause problems if we're running KVM, because in that case we don't control the values of the ID registers -- we read them from the host kernel. In particular, if the host kernel is older than 4.15 then it doesn't expose the ID registers via the KVM_GET_ONE_REG ioctl, and we set up dummy values for some registers and leave the rest at zero. (See the comment in target/arm/kvm64.c kvm_arm_get_host_cpu_features().) This set of dummy values is not sufficient to pass our assertions, and so on those kernels running an AArch32 guest on AArch64 will assert. We could provide a more sophisticated set of dummy ID registers in this case, but that still leaves the possibility of a host CPU which reports bogus ID register values that would cause us to assert. It's more robust to only do these ID register checks if we're using TCG, as that is the only case where this is truly a QEMU code bug. Backports commit 8f4821d77e465bc2ef77302d47640d5a43d92b30 from qemu |
||
---|---|---|
.. | ||
arm-powerctl.c | ||
arm-powerctl.h | ||
arm_ldst.h | ||
cpu-param.h | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
cpu64.c | ||
crypto_helper.c | ||
debug_helper.c | ||
helper-a64.c | ||
helper-a64.h | ||
helper-sve.h | ||
helper.c | ||
helper.h | ||
internals.h | ||
iwmmxt_helper.c | ||
kvm-consts.h | ||
m_helper.c | ||
Makefile.objs | ||
neon_helper.c | ||
op_addsub.h | ||
op_helper.c | ||
pauth_helper.c | ||
psci.c | ||
sve.decode | ||
sve_helper.c | ||
tlb_helper.c | ||
translate-a64.c | ||
translate-a64.h | ||
translate-sve.c | ||
translate-vfp.inc.c | ||
translate.c | ||
translate.h | ||
unicorn.h | ||
unicorn_aarch64.c | ||
unicorn_arm.c | ||
vec_helper.c | ||
vfp-uncond.decode | ||
vfp.decode | ||
vfp_helper.c |