From: Marc Zyngier Date: Mon, 21 Aug 2023 17:44:15 +0000 (+0100) Subject: KVM: arm64: nv: Add trap description for SPSR_EL2 and ELR_EL2 X-Git-Tag: v6.6.7~1953^2~9^2~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c948a0a2f5dc729411a6cfbe0348c0aac5d8a07a;p=platform%2Fkernel%2Flinux-starfive.git KVM: arm64: nv: Add trap description for SPSR_EL2 and ELR_EL2 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 Signed-off-by: Marc Zyngier --- diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c index 1cc606c..9ced1bf 100644 --- a/arch/arm64/kvm/emulate-nested.c +++ b/arch/arm64/kvm/emulate-nested.c @@ -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),