KVM: arm64: nv: Add trap description for SPSR_EL2 and ELR_EL2
authorMarc Zyngier <maz@kernel.org>
Mon, 21 Aug 2023 17:44:15 +0000 (18:44 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 23 Aug 2023 19:03:25 +0000 (20:03 +0100)
Having carved a hole for SP_EL1, we are now missing the entries
for SPSR_EL2 and ELR_EL2. Add them back.

Reported-by: Miguel Luis <miguel.luis@oracle.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/emulate-nested.c

index 1cc606c..9ced1bf 100644 (file)
@@ -651,6 +651,8 @@ static const struct encoding_to_trap_config encoding_to_cgt[] __initconst = {
        SR_RANGE_TRAP(sys_reg(3, 4, 0, 0, 0),
                      sys_reg(3, 4, 3, 15, 7), CGT_HCR_NV),
        /* Skip the SP_EL1 encoding... */
+       SR_TRAP(SYS_SPSR_EL2,           CGT_HCR_NV),
+       SR_TRAP(SYS_ELR_EL2,            CGT_HCR_NV),
        SR_RANGE_TRAP(sys_reg(3, 4, 4, 1, 1),
                      sys_reg(3, 4, 10, 15, 7), CGT_HCR_NV),
        SR_RANGE_TRAP(sys_reg(3, 4, 12, 0, 0),