]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Add ioctl to fetch/store tags in a guest
authorSteven Price <steven.price@arm.com>
Mon, 21 Jun 2021 11:17:15 +0000 (12:17 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 22 Jun 2021 13:08:06 +0000 (14:08 +0100)
commit0b053623cad6fcaf19e5083918908633736de75c
tree34470ac344cda4f7e8353e0b1392c089bbb3123e
parent49430d4d357448bd7514565150a58b2e116d30e7
KVM: arm64: Add ioctl to fetch/store tags in a guest

The VMM may not wish to have it's own mapping of guest memory mapped
with PROT_MTE because this causes problems if the VMM has tag checking
enabled (the guest controls the tags in physical RAM and it's unlikely
the tags are correct for the VMM).

Instead add a new ioctl which allows the VMM to easily read/write the
tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE
while the VMM can still read/write the tags for the purpose of
migration.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210621111716.37157-6-steven.price@arm.com
arch/arm64/include/asm/kvm_host.h
arch/arm64/include/asm/mte-def.h
arch/arm64/include/uapi/asm/kvm.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/guest.c
include/uapi/linux/kvm.h