KVM: arm64: Restrict supported capabilities for protected VMs
authorFuad Tabba <tabba@google.com>
Tue, 23 Apr 2024 15:05:37 +0000 (16:05 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 1 May 2024 15:48:14 +0000 (16:48 +0100)
commit92536992cfd461207c78e46154d16050b236a6fc
treefa1f06f460882b0b00e95639c7fd51fe2578e25a
parent97a3dee1725dc690f806f7b899b086b67f1ef905
KVM: arm64: Restrict supported capabilities for protected VMs

For practical reasons as well as security related ones, not all
capabilities are supported for protected VMs in pKVM.

Add a function that restricts the capabilities for protected VMs.
This behaves as an allow-list to ensure that future capabilities
are checked for compatibility and security before being allowed
for protected VMs.

Signed-off-by: Fuad Tabba <tabba@google.com>
Acked-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240423150538.2103045-30-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/arm.c