KVM: arm64: Prevent NV feature flag on systems w/o nested virt
authorOliver Upton <oliver.upton@linux.dev>
Wed, 20 Sep 2023 19:50:33 +0000 (19:50 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 21 Sep 2023 18:13:29 +0000 (18:13 +0000)
commit12405b09926f0270f7033ed5293241180ea57343
tree67b9dcdd94664c04e5c4289ce0ecd8d463ee52ea
parentbaa28a53ddbe2d27377b9a4aeff5eb8b706c8d38
KVM: arm64: Prevent NV feature flag on systems w/o nested virt

It would appear that userspace can select the NV feature flag regardless
of whether the system actually supports the feature. Obviously a nested
guest isn't getting far in this situation; let's reject the flag
instead.

Link: https://lore.kernel.org/r/20230920195036.1169791-6-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/arm.c