summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-11-06 03:25:59 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2022-11-06 03:30:49 -0500
commitf4298cac2bfcced49ab308756dc8fef684f3da81 (patch)
treec0170dfc9064a427b5c4bf65c0c8c599cb4f1b2c /virt
parent146201496604781b77fa8d41db6117b75b2088ed (diff)
parentbe0ddf5293a7895a8c9096e1a8560930c6a0ab3f (diff)
downloadlinux-stable-f4298cac2bfcced49ab308756dc8fef684f3da81.tar.gz
linux-stable-f4298cac2bfcced49ab308756dc8fef684f3da81.tar.bz2
linux-stable-f4298cac2bfcced49ab308756dc8fef684f3da81.zip
Merge tag 'kvmarm-fixes-6.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
* Fix the pKVM stage-1 walker erronously using the stage-2 accessor * Correctly convert vcpu->kvm to a hyp pointer when generating an exception in a nVHE+MTE configuration * Check that KVM_CAP_DIRTY_LOG_* are valid before enabling them * Fix SMPRI_EL1/TPIDR2_EL0 trapping on VHE * Document the boot requirements for FGT when entering the kernel at EL1
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f1df24c2bc84..25d7872b29c1 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -4585,6 +4585,9 @@ static int kvm_vm_ioctl_enable_cap_generic(struct kvm *kvm,
}
case KVM_CAP_DIRTY_LOG_RING:
case KVM_CAP_DIRTY_LOG_RING_ACQ_REL:
+ if (!kvm_vm_ioctl_check_extension_generic(kvm, cap->cap))
+ return -EINVAL;
+
return kvm_vm_ioctl_enable_dirty_log_ring(kvm, cap->args[0]);
default:
return kvm_vm_ioctl_enable_cap(kvm, cap);