arm64/cpufeatures: Emulate MRS instructions by parsing ESR_ELx.ISS
authorAnshuman Khandual <anshuman.khandual@arm.com>
Thu, 20 Sep 2018 04:06:21 +0000 (09:36 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 21 Sep 2018 10:06:18 +0000 (11:06 +0100)
commit21f84796177443695680180a8493a9e20d254d5e
tree8808359a3a825302a71aa12f2599c0e2b517dc5f
parent520ad98871a072471d2583a9386b9d7243fa584d
arm64/cpufeatures: Emulate MRS instructions by parsing ESR_ELx.ISS

Armv8.4-A extension enables MRS instruction encodings inside ESR_ELx.ISS
during exception class ESR_ELx_EC_SYS64 (0x18). This encoding can be used
to emulate MRS instructions which can avoid fetch/decode from user space
thus improving performance. This adds a new sys64_hook structure element
with applicable ESR mask/value pair for MRS instructions on various system
registers but constrained by sysreg encodings which is currently allowed
to be emulated.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/esr.h
arch/arm64/kernel/traps.c