]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Handle host stage-2 faults from 32-bit EL0
authorWill Deacon <will@kernel.org>
Wed, 27 Apr 2022 17:13:32 +0000 (18:13 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 27 Apr 2022 20:54:30 +0000 (21:54 +0100)
commit37afae8be9571d7814a26552b89b5a26df55b77a
tree45cc2ee0a2e10103099bfefb07e05d722834e74f
parentce03a3ed3021c13e8060b1a8e208e5857bbd9c98
KVM: arm64: Handle host stage-2 faults from 32-bit EL0

When pKVM is enabled, host memory accesses are translated by an identity
mapping at stage-2, which is populated lazily in response to synchronous
exceptions from 64-bit EL1 and EL0.

Extend this handling to cover exceptions originating from 32-bit EL0 as
well. Although these are very unlikely to occur in practice, as the
kernel typically ensures that user pages are initialised before mapping
them in, drivers could still map previously untouched device pages into
userspace and expect things to work rather than panic the system.

Cc: Quentin Perret <qperret@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220427171332.13635-1-will@kernel.org
arch/arm64/kvm/hyp/nvhe/host.S