Files
linux/arch/arm/include/asm
Mark Rutland 5e366aaec1 arm: KVM: Survive unknown traps from guests
[ Upstream commit f050fe7a91 ]

Currently we BUG() if we see a HSR.EC value we don't recognise. As
configurable disables/enables are added to the architecture (controlled
by RES1/RES0 bits respectively), with associated synchronous exceptions,
it may be possible for a guest to trigger exceptions with classes that
we don't recognise.

While we can't service these exceptions in a manner useful to the guest,
we can avoid bringing down the host. Per ARM DDI 0406C.c, all currently
unallocated HSR EC encodings are reserved, and per ARM DDI
0487A.k_iss10775, page G6-4395, EC values within the range 0x00 - 0x2c
are reserved for future use with synchronous exceptions, and EC values
within the range 0x2d - 0x3f may be used for either synchronous or
asynchronous exceptions.

The patch makes KVM handle any unknown EC by injecting an UNDEFINED
exception into the guest, with a corresponding (ratelimited) warning in
the host dmesg. We could later improve on this with with a new (opt-in)
exit to the host userspace.

Cc: Dave Martin <dave.martin@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-14 09:28:19 +01:00
..
2016-06-21 10:54:29 -05:00
2016-10-06 08:45:40 +01:00
2014-12-04 12:41:50 +00:00
2015-05-05 13:35:39 -06:00
2015-05-28 15:31:53 +02:00
2017-07-21 07:42:21 +02:00
2015-09-16 16:53:39 +02:00
2012-09-14 13:53:39 +00:00
2016-08-02 19:35:29 -04:00
2012-07-24 15:27:28 +08:00
2014-06-01 01:17:12 +01:00
2013-07-08 22:08:51 +01:00
2015-06-01 23:48:19 +01:00
2014-02-25 11:33:37 +00:00
2016-10-19 10:18:47 +01:00
2014-03-18 16:39:40 -04:00