target/arm: Add VHE system register redirection and aliasing
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 7 Feb 2020 14:04:25 +0000 (14:04 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 7 Feb 2020 14:04:25 +0000 (14:04 +0000)
commite2cce18f5c1d0d55328c585c8372cdb096bbf528
treecd80e298ff4c47095c01a3a3534e06584456c780
parentb4ecf60f7eee88cbfe5700044790cb7494c5dd37
target/arm: Add VHE system register redirection and aliasing

Several of the EL1/0 registers are redirected to the EL2 version when in
EL2 and HCR_EL2.E2H is set.  Many of these registers have side effects.
Link together the two ARMCPRegInfo structures after they have been
properly instantiated.  Install common dispatch routines to all of the
relevant registers.

The same set of registers that are redirected also have additional
EL12/EL02 aliases created to access the original register that was
redirected.

Omit the generic timer registers from redirection here, because we'll
need multiple kinds of redirection from both EL0 and EL2.

Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20200206105448.4726-29-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.h
target/arm/helper.c