[PATCH v9 16/22] KVM: arm64: pkvm: Drop sysregs that should never be routed to the host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: Marc Zyngier <maz@xxxxxxxxxx>
---
 arch/arm64/kvm/hyp/nvhe/sys_regs.c | 50 ------------------------------
 1 file changed, 50 deletions(-)

diff --git a/arch/arm64/kvm/hyp/nvhe/sys_regs.c b/arch/arm64/kvm/hyp/nvhe/sys_regs.c
index e2b3a9e167da..eb4ee2589316 100644
--- a/arch/arm64/kvm/hyp/nvhe/sys_regs.c
+++ b/arch/arm64/kvm/hyp/nvhe/sys_regs.c
@@ -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),
-- 
2.30.2




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux