]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: arm64: Don't advertise unsupported features for protected guests
authorWill Deacon <will@kernel.org>
Mon, 30 Mar 2026 14:48:06 +0000 (15:48 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 30 Mar 2026 15:58:07 +0000 (16:58 +0100)
Both SVE and PMUv3 are treated as "restricted" features for protected
guests and attempts to access their corresponding architectural state
from a protected guest result in an undefined exception being injected
by the hypervisor.

Since these exceptions are unexpected and typically fatal for the guest,
don't advertise these features for protected guests.

Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Tested-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260330144841.26181-6-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_pkvm.h

index 757076ad4ec92fdc4056180a246b475964939aad..7041e398fb4c3145d91b11985d99ef3034a640e6 100644 (file)
@@ -40,8 +40,6 @@ static inline bool kvm_pkvm_ext_allowed(struct kvm *kvm, long ext)
        case KVM_CAP_MAX_VCPU_ID:
        case KVM_CAP_MSI_DEVID:
        case KVM_CAP_ARM_VM_IPA_SIZE:
-       case KVM_CAP_ARM_PMU_V3:
-       case KVM_CAP_ARM_SVE:
        case KVM_CAP_ARM_PTRAUTH_ADDRESS:
        case KVM_CAP_ARM_PTRAUTH_GENERIC:
                return true;