target/arm: *_EL12 registers should UNDEF when HCR_EL2.E2H is 0
commite730287cef2a0c2889ed819fc158e21117cd84f8
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 9 Jan 2024 14:43:47 +0000 (9 14:43 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 9 Jan 2024 14:43:47 +0000 (9 14:43 +0000)
tree6bb5cbd6bab3dcaec2b488886ce917f6641760a4
parent6f53b1267bb68b55bde65248212bcc071a15848f
target/arm: *_EL12 registers should UNDEF when HCR_EL2.E2H is 0

The alias registers like SCTLR_EL12 only exist when HCR_EL2.E2H
is 1; they should UNDEF otherwise. We weren't implementing this.
Add an intercept of the accessfn for these aliases, and implement
the UNDEF check.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
target/arm/cpregs.h
target/arm/helper.c