]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Add exit to userspace on {LD,ST}64B* outside of memslots
authorMarc Zyngier <maz@kernel.org>
Mon, 19 Jan 2026 02:29:22 +0000 (10:29 +0800)
committerWill Deacon <will@kernel.org>
Thu, 22 Jan 2026 13:24:49 +0000 (13:24 +0000)
commitf174a9ffcd48d78a45d560c02ce4071ded036b53
tree25fd4dea206ad4a0ae8796af33698919b2ed3359
parent018a231b0260ebd85eddca3fec85031b59f50117
KVM: arm64: Add exit to userspace on {LD,ST}64B* outside of memslots

The main use of {LD,ST}64B* is to talk to a device, which is hopefully
directly assigned to the guest and requires no additional handling.

However, this does not preclude a VMM from exposing a virtual device
to the guest, and to allow 64 byte accesses as part of the programming
interface. A direct consequence of this is that we need to be able
to forward such access to userspace.

Given that such a contraption is very unlikely to ever exist, we choose
to offer a limited service: userspace gets (as part of a new exit reason)
the ESR, the IPA, and that's it. It is fully expected to handle the full
semantics of the instructions, deal with ACCDATA, the return values and
increment PC. Much fun.

A canonical implementation can also simply inject an abort and be done
with it. Frankly, don't try to do anything else unless you have time
to waste.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Oliver Upton <oupton@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kvm/mmio.c
include/uapi/linux/kvm.h