From: Ian Campbell Date: Mon, 30 Mar 2015 15:19:32 +0000 (+0100) Subject: xen: arm: Annotate registers trapped by MDCR_EL2.{TPM,TPMCR} X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3298 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1ef1b107f239e864c253c27e06152a305bc57517;p=xen.git xen: arm: Annotate registers trapped by MDCR_EL2.{TPM,TPMCR} Signed-off-by: Ian Campbell Reviewed-by: Julien Grall --- diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index f77db63002..591e94eca9 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1673,6 +1673,24 @@ static void do_cp15_32(struct cpu_user_regs *regs, *r = v->arch.actlr; break; + /* + * MDCR_EL2.TPM + * + * ARMv7 (DDI 0406C.b): B1.14.17 + * ARMv8 (DDI 0487A.d): D1-1511 Table D1-61 + * + * Unhandled: + * PMEVCNTR + * PMEVTYPER + * PMCCFILTR + * + * MDCR_EL2.TPMCR + * + * ARMv7 (DDI 0406C.b): B1.14.17 + * ARMv8 (DDI 0487A.d): D1-1511 Table D1-62 + * + * NB: Both MDCR_EL2.TPM and MDCR_EL2.TPMCR cause trapping of PMCR. + */ /* We could trap ID_DFR0 and tell the guest we don't support * performance monitoring, but Linux doesn't check the ID_DFR0. * Therefore it will read PMCR. @@ -1687,7 +1705,6 @@ static void do_cp15_32(struct cpu_user_regs *regs, return handle_ro_raz(regs, r, cp32.read, hsr, 0); else return handle_raz_wi(regs, r, cp32.read, hsr, 1); - case HSR_CPREG32(PMINTENSET): case HSR_CPREG32(PMINTENCLR): /* EL1 only, however MDCR_EL2.TPM==1 means EL0 may trap here also. */ @@ -2087,8 +2104,22 @@ static void do_sysreg(struct cpu_user_regs *regs, HSR_SYSREG_DBG_CASES(DBGWCR): return handle_raz_wi(regs, x, hsr.sysreg.read, hsr, 1); - /* RAZ/WI registers: */ - /* - Perf monitors */ + /* + * MDCR_EL2.TPM + * + * ARMv8 (DDI 0487A.d): D1-1511 Table D1-61 + * + * Unhandled: + * PMEVCNTR_EL0 + * PMEVTYPER_EL0 + * PMCCFILTR_EL0 + * MDCR_EL2.TPMCR + * + * ARMv7 (DDI 0406C.b): B1.14.17 + * ARMv8 (DDI 0487A.d): D1-1511 Table D1-62 + * + * NB: Both MDCR_EL2.TPM and MDCR_EL2.TPMCR cause trapping of PMCR. + */ case HSR_SYSREG_PMINTENSET_EL1: case HSR_SYSREG_PMINTENCLR_EL1: /* @@ -2096,8 +2127,6 @@ static void do_sysreg(struct cpu_user_regs *regs, * undef. */ return handle_raz_wi(regs, x, hsr.sysreg.read, hsr, 1); - - /* - Perf monitors */ case HSR_SYSREG_PMUSERENR_EL0: /* RO at EL0. RAZ/WI at EL1 */ if ( psr_mode_is_user(regs) )