summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/kvm/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/loongarch/kvm/vm.c')
-rw-r--r--arch/loongarch/kvm/vm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/loongarch/kvm/vm.c b/arch/loongarch/kvm/vm.c
index 33398a151e71..e0d267aec7a4 100644
--- a/arch/loongarch/kvm/vm.c
+++ b/arch/loongarch/kvm/vm.c
@@ -122,6 +122,10 @@ static int kvm_vm_feature_has_attr(struct kvm *kvm, struct kvm_device_attr *attr
if (cpu_has_lbt_mips)
return 0;
return -ENXIO;
+ case KVM_LOONGARCH_VM_FEAT_PMU:
+ if (cpu_has_pmp)
+ return 0;
+ return -ENXIO;
default:
return -ENXIO;
}