]> xenbits.xensource.com Git - xen.git/commit
xen: arm: Handle CP14 32-bit register accesses from userspace
authorIan Campbell <ian.campbell@citrix.com>
Mon, 30 Mar 2015 11:12:30 +0000 (12:12 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 31 Mar 2015 08:42:53 +0000 (09:42 +0100)
commitedcbee5a5d66f0faf159f29a39dcc49c6856ad84
treeb9b3ac05c1ea1967e1a8b805a9c02f4481ba8938
parenta97c904a3bfbff63078d88b84f0c45d25a773b04
xen: arm: Handle CP14 32-bit register accesses from userspace

Accesses to these from 32-bit userspace would cause a hypervisor
exception (host crash) when running a 64-bit kernel, which is worked
around by the fix to XSA-102. On 32-bit kernels they would be
implemented as RAZ/WI which is incorrect but harmless.

Update as follows:
 - DBGDSCRINT should be R/O.
 - DBGDSCREXT should be EL1 only.
 - DBGOSLAR is WO and EL1 only.
 - DBGVCR, DBGB[VC]R*, DBGW[VC]R*, and DBGOSDLR are EL1 only.

DBGDIDR and DBGDSCRINT are accessible from EL0 if DBGDSCRext.UDCCdis.
Since we emulate that as RAZ/WI we allow access.

When we do not allow an access we now silently inject an undef even in
debug mode since the debugging messages are not helpful (we have
handled the access, by explicitly choosing not to).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/traps.c