]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: Track KVM IOCTLs and their associated KVM caps
authorFuad Tabba <tabba@google.com>
Thu, 11 Dec 2025 10:47:07 +0000 (10:47 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 15 Jan 2026 15:46:57 +0000 (15:46 +0000)
commit8823485a697de5c280a7a2632620338722f16663
treea7ca698119f2b141ca4fada938c6eeb7c8f0ccda
parentf4eee308c8f4013a52bd7d7735e64b5127c1b4a8
KVM: arm64: Track KVM IOCTLs and their associated KVM caps

Track KVM IOCTLs (VM IOCTLs for now), and the associated KVM capability
that enables that IOCTL. Add a function that performs the lookup.

This will be used by CoCo VM Hypervisors (e.g., pKVM) to determine
whether a particular KVM IOCTL is allowed for its VMs.

Suggested-by: Oliver Upton <oupton@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
[maz: don't expose KVM_CAP_BASIC to userspace, and rely on NR_VCPUS
      as a proxy for this]
Link: https://patch.msgid.link/20251211104710.151771-8-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c