Skip to content

Commit f3d5cca

Browse files
author
Marc Zyngier
committed
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: Marc Zyngier <[email protected]> Reviewed-by: Fuad Tabba <[email protected]> Tested-by: Fuad Tabba <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3c90cb1 commit f3d5cca

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

arch/arm64/kvm/hyp/nvhe/sys_regs.c

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -371,34 +371,8 @@ static const struct sys_reg_desc pvm_sys_reg_descs[] = {
371371
AARCH64(SYS_ID_AA64MMFR1_EL1),
372372
AARCH64(SYS_ID_AA64MMFR2_EL1),
373373

374-
HOST_HANDLED(SYS_SCTLR_EL1),
375-
HOST_HANDLED(SYS_ACTLR_EL1),
376-
HOST_HANDLED(SYS_CPACR_EL1),
377-
378-
HOST_HANDLED(SYS_RGSR_EL1),
379-
HOST_HANDLED(SYS_GCR_EL1),
380-
381374
/* Scalable Vector Registers are restricted. */
382375

383-
HOST_HANDLED(SYS_TTBR0_EL1),
384-
HOST_HANDLED(SYS_TTBR1_EL1),
385-
HOST_HANDLED(SYS_TCR_EL1),
386-
387-
HOST_HANDLED(SYS_APIAKEYLO_EL1),
388-
HOST_HANDLED(SYS_APIAKEYHI_EL1),
389-
HOST_HANDLED(SYS_APIBKEYLO_EL1),
390-
HOST_HANDLED(SYS_APIBKEYHI_EL1),
391-
HOST_HANDLED(SYS_APDAKEYLO_EL1),
392-
HOST_HANDLED(SYS_APDAKEYHI_EL1),
393-
HOST_HANDLED(SYS_APDBKEYLO_EL1),
394-
HOST_HANDLED(SYS_APDBKEYHI_EL1),
395-
HOST_HANDLED(SYS_APGAKEYLO_EL1),
396-
HOST_HANDLED(SYS_APGAKEYHI_EL1),
397-
398-
HOST_HANDLED(SYS_AFSR0_EL1),
399-
HOST_HANDLED(SYS_AFSR1_EL1),
400-
HOST_HANDLED(SYS_ESR_EL1),
401-
402376
RAZ_WI(SYS_ERRIDR_EL1),
403377
RAZ_WI(SYS_ERRSELR_EL1),
404378
RAZ_WI(SYS_ERXFR_EL1),
@@ -408,43 +382,19 @@ static const struct sys_reg_desc pvm_sys_reg_descs[] = {
408382
RAZ_WI(SYS_ERXMISC0_EL1),
409383
RAZ_WI(SYS_ERXMISC1_EL1),
410384

411-
HOST_HANDLED(SYS_TFSR_EL1),
412-
HOST_HANDLED(SYS_TFSRE0_EL1),
413-
414-
HOST_HANDLED(SYS_FAR_EL1),
415-
HOST_HANDLED(SYS_PAR_EL1),
416-
417385
/* Performance Monitoring Registers are restricted. */
418386

419-
HOST_HANDLED(SYS_MAIR_EL1),
420-
HOST_HANDLED(SYS_AMAIR_EL1),
421-
422387
/* Limited Ordering Regions Registers are restricted. */
423388

424-
HOST_HANDLED(SYS_VBAR_EL1),
425-
HOST_HANDLED(SYS_DISR_EL1),
426-
427389
/* GIC CPU Interface registers are restricted. */
428390

429-
HOST_HANDLED(SYS_CONTEXTIDR_EL1),
430-
HOST_HANDLED(SYS_TPIDR_EL1),
431-
432-
HOST_HANDLED(SYS_SCXTNUM_EL1),
433-
434-
HOST_HANDLED(SYS_CNTKCTL_EL1),
435-
436391
HOST_HANDLED(SYS_CCSIDR_EL1),
437392
HOST_HANDLED(SYS_CLIDR_EL1),
438393
HOST_HANDLED(SYS_CSSELR_EL1),
439394
HOST_HANDLED(SYS_CTR_EL0),
440395

441396
/* Performance Monitoring Registers are restricted. */
442397

443-
HOST_HANDLED(SYS_TPIDR_EL0),
444-
HOST_HANDLED(SYS_TPIDRRO_EL0),
445-
446-
HOST_HANDLED(SYS_SCXTNUM_EL0),
447-
448398
/* Activity Monitoring Registers are restricted. */
449399

450400
HOST_HANDLED(SYS_CNTP_TVAL_EL0),

0 commit comments

Comments
 (0)