target/arm: Honor HCR_EL2.TID2 trapping requirements
commit630fcd4d2ba37050329e0adafdc552d656ebe2f3
authorMarc Zyngier <maz@kernel.org>
Sun, 1 Dec 2019 12:20:14 +0000 (1 12:20 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 16 Dec 2019 10:46:34 +0000 (16 10:46 +0000)
tree2c7aefdd2a0ded36ca85739c776be9f0ed25baf1
parentccb88bf220b041f04e946d3a2b619dd2bc30951b
target/arm: Honor HCR_EL2.TID2 trapping requirements

HCR_EL2.TID2 mandates that access from EL1 to CTR_EL0, CCSIDR_EL1,
CCSIDR2_EL1, CLIDR_EL1, CSSELR_EL1 are trapped to EL2, and QEMU
completely ignores it, making it impossible for hypervisors to
virtualize the cache hierarchy.

Do the right thing by trapping to EL2 if HCR_EL2.TID2 is set.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20191201122018.25808-2-maz@kernel.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c