diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-12-23 00:03:54 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-12-23 00:03:54 +0100 |
commit | 5c2b2176ead1911d652b8848169bb44bdde75ca8 (patch) | |
tree | 94d3fcd88aa52b09f90bc5fc534f0cefdfd09e1c /virt | |
parent | KVM: SEV: Do not intercept accesses to MSR_IA32_XSS for SEV-ES guests (diff) | |
parent | KVM: selftests: Ensure sysreg-defs.h is generated at the expected path (diff) | |
download | linux-5c2b2176ead1911d652b8848169bb44bdde75ca8.tar.xz linux-5c2b2176ead1911d652b8848169bb44bdde75ca8.zip |
Merge tag 'kvmarm-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master
KVM/arm64 fixes for 6.7, part #2
- Ensure a vCPU's redistributor is unregistered from the MMIO bus
if vCPU creation fails
- Fix building KVM selftests for arm64 from the top-level Makefile
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 3b1b9e8dd70c..7db96875ac46 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -5540,7 +5540,6 @@ int kvm_io_bus_read(struct kvm_vcpu *vcpu, enum kvm_bus bus_idx, gpa_t addr, return r < 0 ? r : 0; } -/* Caller must hold slots_lock. */ int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, struct kvm_io_device *dev) { @@ -5548,6 +5547,8 @@ int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, struct kvm_io_bus *new_bus, *bus; struct kvm_io_range range; + lockdep_assert_held(&kvm->slots_lock); + bus = kvm_get_bus(kvm, bus_idx); if (!bus) return -ENOMEM; |