summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2020-01-08 16:43:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-11 15:35:16 +0300
commitcc7931dc766fac756c95b36b59484abdae87fd31 (patch)
treeb9b6029ecdec1ee5a607c80b01a631b66a0234fa /arch/arm
parent5222ded5c72ce7b173c66d3e3fb2af6bea511367 (diff)
downloadlinux-cc7931dc766fac756c95b36b59484abdae87fd31.tar.xz
KVM: arm64: Correct PSTATE on exception entry
commit a425372e733177eb0779748956bc16c85167af48 upstream. When KVM injects an exception into a guest, it generates the PSTATE value from scratch, configuring PSTATE.{M[4:0],DAIF}, and setting all other bits to zero. This isn't correct, as the architecture specifies that some PSTATE bits are (conditionally) cleared or set upon an exception, and others are unchanged from the original context. This patch adds logic to match the architectural behaviour. To make this simple to follow/audit/extend, documentation references are provided, and bits are configured in order of their layout in SPSR_EL2. This layout can be seen in the diagram on ARM DDI 0487E.a page C5-429. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200108134324.46500-2-mark.rutland@arm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm')
0 files changed, 0 insertions, 0 deletions