qemu-e2k/target-arm
Peter Maydell 2ebcebe262 target-arm: avoid undefined behaviour when writing TTBCR
LPAE CPUs have more potentially valid bits in the TTBCR, and so the
simple masking out of invalid bits is no longer sufficient to obtain
the base address width field of the register, which is what we use to
precalculate c2_mask and c2_base_mask.  Explicitly extract the
relevant register field rather than simply shifting by the register
value.

This bug would have had no ill effects in practice, since if the
EAE bit (TTBCR bit 31) is set then we don't use the precalculated
masks, and if EAE is zero then bits 30..3 are all UNK/SBZP, so
well-behaved guests won't set them. However the shift is undefined
behaviour, so we should avoid it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1372347527-4428-1-git-send-email-peter.maydell@linaro.org
2013-07-15 17:13:51 +01:00
..
arm-semi.c cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks 2013-06-28 13:25:12 +02:00
cpu-qom.h cpu: Drop unnecessary dynamic casts in *_env_get_cpu() 2013-07-09 21:20:28 +02:00
cpu.c target-arm: add feature flag for ARMv8 2013-07-15 14:35:25 +01:00
cpu.h target-arm: add feature flag for ARMv8 2013-07-15 14:35:25 +01:00
helper.c target-arm: avoid undefined behaviour when writing TTBCR 2013-07-15 17:13:51 +01:00
helper.h
iwmmxt_helper.c
kvm_arm.h target-arm: Initialize cpreg list from KVM when using KVM 2013-06-25 18:16:10 +01:00
kvm-stub.c target-arm: Initialize cpreg list from KVM when using KVM 2013-06-25 18:16:10 +01:00
kvm.c memory: add ref/unref calls 2013-07-04 17:42:45 +02:00
machine.c target-arm: Initialize cpreg list from KVM when using KVM 2013-06-25 18:16:10 +01:00
Makefile.objs target-arm: Initialize cpreg list from KVM when using KVM 2013-06-25 18:16:10 +01:00
neon_helper.c
op_addsub.h
op_helper.c
translate.c target-arm: explicitly decode SEVL instruction 2013-07-15 17:13:51 +01:00