]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Introduce MTE VM feature
authorSteven Price <steven.price@arm.com>
Mon, 21 Jun 2021 11:17:12 +0000 (12:17 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 22 Jun 2021 13:08:05 +0000 (14:08 +0100)
commitef0072e156e41615e949af4ec1362fb123222bea
tree69524ca0a8e1c7048db4490cb5b73ad65266f2c5
parenteb0a2f904c85c834dad029fe4fbb632b6e8afe31
KVM: arm64: Introduce MTE VM feature

Add a new VM feature 'KVM_ARM_CAP_MTE' which enables memory tagging
for a VM. This will expose the feature to the guest and automatically
tag memory pages touched by the VM as PG_mte_tagged (and clear the tag
storage) to ensure that the guest cannot see stale tags, and so that
the tags are correctly saved/restored across swap.

Actually exposing the new capability to user space happens in a later
patch.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
[maz: move VM_SHARED sampling into the critical section]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210621111716.37157-3-steven.price@arm.com
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/hyp/exception.c
arch/arm64/kvm/mmu.c
arch/arm64/kvm/sys_regs.c
include/uapi/linux/kvm.h