]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Disallow copying MTE to guest memory while KVM is dirty logging
authorSean Christopherson <seanjc@google.com>
Fri, 26 Jul 2024 23:51:11 +0000 (16:51 -0700)
committerMarc Zyngier <maz@kernel.org>
Tue, 13 Aug 2024 18:29:17 +0000 (19:29 +0100)
commite0b7de4fd18c47ebd47ec0dd1af6503d4071b943
tree7dad5048ca6526b1be6825d26bfc0fcfdfd544df
parentae41d7dbaeb4f79134136cd65ad7015cf9ccf78a
KVM: arm64: Disallow copying MTE to guest memory while KVM is dirty logging

Disallow copying MTE tags to guest memory while KVM is dirty logging, as
writing guest memory without marking the gfn as dirty in the memslot could
result in userspace failing to migrate the updated page.  Ideally (maybe?),
KVM would simply mark the gfn as dirty, but there is no vCPU to work with,
and presumably the only use case for copy MTE tags _to_ the guest is when
restoring state on the target.

Fixes: f0376edb1ddc ("KVM: arm64: Add ioctl to fetch/store tags in a guest")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20240726235234.228822-3-seanjc@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/guest.c