Merge tag 'kvmarm-fixes-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 6.8, take #1

- Don't source the VFIO Kconfig twice

- Fix protected-mode locking order between kvm and vcpus

Changed files
+17 -11
arch
arm64
-1
arch/arm64/kvm/Kconfig
··· 3 3 # KVM configuration 4 4 # 5 5 6 - source "virt/lib/Kconfig" 7 6 source "virt/kvm/Kconfig" 8 7 9 8 menuconfig VIRTUALIZATION
+17 -10
arch/arm64/kvm/pkvm.c
··· 101 101 hyp_mem_base); 102 102 } 103 103 104 + static void __pkvm_destroy_hyp_vm(struct kvm *host_kvm) 105 + { 106 + if (host_kvm->arch.pkvm.handle) { 107 + WARN_ON(kvm_call_hyp_nvhe(__pkvm_teardown_vm, 108 + host_kvm->arch.pkvm.handle)); 109 + } 110 + 111 + host_kvm->arch.pkvm.handle = 0; 112 + free_hyp_memcache(&host_kvm->arch.pkvm.teardown_mc); 113 + } 114 + 104 115 /* 105 116 * Allocates and donates memory for hypervisor VM structs at EL2. 106 117 * ··· 192 181 return 0; 193 182 194 183 destroy_vm: 195 - pkvm_destroy_hyp_vm(host_kvm); 184 + __pkvm_destroy_hyp_vm(host_kvm); 196 185 return ret; 197 186 free_vm: 198 187 free_pages_exact(hyp_vm, hyp_vm_sz); ··· 205 194 { 206 195 int ret = 0; 207 196 208 - mutex_lock(&host_kvm->lock); 197 + mutex_lock(&host_kvm->arch.config_lock); 209 198 if (!host_kvm->arch.pkvm.handle) 210 199 ret = __pkvm_create_hyp_vm(host_kvm); 211 - mutex_unlock(&host_kvm->lock); 200 + mutex_unlock(&host_kvm->arch.config_lock); 212 201 213 202 return ret; 214 203 } 215 204 216 205 void pkvm_destroy_hyp_vm(struct kvm *host_kvm) 217 206 { 218 - if (host_kvm->arch.pkvm.handle) { 219 - WARN_ON(kvm_call_hyp_nvhe(__pkvm_teardown_vm, 220 - host_kvm->arch.pkvm.handle)); 221 - } 222 - 223 - host_kvm->arch.pkvm.handle = 0; 224 - free_hyp_memcache(&host_kvm->arch.pkvm.teardown_mc); 207 + mutex_lock(&host_kvm->arch.config_lock); 208 + __pkvm_destroy_hyp_vm(host_kvm); 209 + mutex_unlock(&host_kvm->arch.config_lock); 225 210 } 226 211 227 212 int pkvm_init_host_vm(struct kvm *host_kvm)