Commit f3d5ccab authored by Marc Zyngier's avatar Marc Zyngier

KVM: arm64: pkvm: Drop sysregs that should never be routed to the host

A bunch of system registers (most of them MM related) should never
trap to the host under any circumstance. Keep them close to our chest.
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Reviewed-by: default avatarFuad Tabba <tabba@google.com>
Tested-by: default avatarFuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-6-maz@kernel.org
parent 3c90cb15
......@@ -371,34 +371,8 @@ static const struct sys_reg_desc pvm_sys_reg_descs[] = {
AARCH64(SYS_ID_AA64MMFR1_EL1),
AARCH64(SYS_ID_AA64MMFR2_EL1),
HOST_HANDLED(SYS_SCTLR_EL1),
HOST_HANDLED(SYS_ACTLR_EL1),
HOST_HANDLED(SYS_CPACR_EL1),
HOST_HANDLED(SYS_RGSR_EL1),
HOST_HANDLED(SYS_GCR_EL1),
/* Scalable Vector Registers are restricted. */
HOST_HANDLED(SYS_TTBR0_EL1),
HOST_HANDLED(SYS_TTBR1_EL1),
HOST_HANDLED(SYS_TCR_EL1),
HOST_HANDLED(SYS_APIAKEYLO_EL1),
HOST_HANDLED(SYS_APIAKEYHI_EL1),
HOST_HANDLED(SYS_APIBKEYLO_EL1),
HOST_HANDLED(SYS_APIBKEYHI_EL1),
HOST_HANDLED(SYS_APDAKEYLO_EL1),
HOST_HANDLED(SYS_APDAKEYHI_EL1),
HOST_HANDLED(SYS_APDBKEYLO_EL1),
HOST_HANDLED(SYS_APDBKEYHI_EL1),
HOST_HANDLED(SYS_APGAKEYLO_EL1),
HOST_HANDLED(SYS_APGAKEYHI_EL1),
HOST_HANDLED(SYS_AFSR0_EL1),
HOST_HANDLED(SYS_AFSR1_EL1),
HOST_HANDLED(SYS_ESR_EL1),
RAZ_WI(SYS_ERRIDR_EL1),
RAZ_WI(SYS_ERRSELR_EL1),
RAZ_WI(SYS_ERXFR_EL1),
......@@ -408,31 +382,12 @@ static const struct sys_reg_desc pvm_sys_reg_descs[] = {
RAZ_WI(SYS_ERXMISC0_EL1),
RAZ_WI(SYS_ERXMISC1_EL1),
HOST_HANDLED(SYS_TFSR_EL1),
HOST_HANDLED(SYS_TFSRE0_EL1),
HOST_HANDLED(SYS_FAR_EL1),
HOST_HANDLED(SYS_PAR_EL1),
/* Performance Monitoring Registers are restricted. */
HOST_HANDLED(SYS_MAIR_EL1),
HOST_HANDLED(SYS_AMAIR_EL1),
/* Limited Ordering Regions Registers are restricted. */
HOST_HANDLED(SYS_VBAR_EL1),
HOST_HANDLED(SYS_DISR_EL1),
/* GIC CPU Interface registers are restricted. */
HOST_HANDLED(SYS_CONTEXTIDR_EL1),
HOST_HANDLED(SYS_TPIDR_EL1),
HOST_HANDLED(SYS_SCXTNUM_EL1),
HOST_HANDLED(SYS_CNTKCTL_EL1),
HOST_HANDLED(SYS_CCSIDR_EL1),
HOST_HANDLED(SYS_CLIDR_EL1),
HOST_HANDLED(SYS_CSSELR_EL1),
......@@ -440,11 +395,6 @@ static const struct sys_reg_desc pvm_sys_reg_descs[] = {
/* Performance Monitoring Registers are restricted. */
HOST_HANDLED(SYS_TPIDR_EL0),
HOST_HANDLED(SYS_TPIDRRO_EL0),
HOST_HANDLED(SYS_SCXTNUM_EL0),
/* Activity Monitoring Registers are restricted. */
HOST_HANDLED(SYS_CNTP_TVAL_EL0),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment