]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: trap userspace "dc cvau" cache operation on errata-affected core
authorAndre Przywara <andre.przywara@arm.com>
Tue, 28 Jun 2016 17:07:32 +0000 (18:07 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 1 Jul 2016 10:46:00 +0000 (11:46 +0100)
commitc63e95993dcba7d30ab4ec2bf977f1d412c317da
treef064a41ff4949170f335e4fd495cdafb9d810903
parentc8ca1d1dbee810f5c35b4443d9b9afc5cb8254f3
arm64: trap userspace "dc cvau" cache operation on errata-affected core

The ARM errata 819472, 826319, 827319 and 824069 for affected
Cortex-A53 cores demand to promote "dc cvau" instructions to
"dc civac". Since we allow userspace to also emit those instructions,
we should make sure that "dc cvau" gets promoted there too.
So lets grasp the nettle here and actually trap every userland cache
maintenance instruction once we detect at least one affected core in
the system.
We then emulate the instruction by executing it on behalf of userland,
promoting "dc cvau" to "dc civac" on the way and injecting access
fault back into userspace.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[catalin.marinas@arm.com: s/set_segfault/arm64_notify_segfault/]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/processor.h
arch/arm64/include/asm/sysreg.h
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/entry.S
arch/arm64/kernel/traps.c