From: Marc Zyngier Date: Fri, 21 Apr 2023 08:30:46 +0000 (+0100) Subject: Merge branch kvm-arm64/lock-inversion into kvmarm-master/next X-Git-Tag: microblaze-v6.6~557^2~7^2~5 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=ef5f97e9de9fc0d5bb6136de3d01d78c072a452f;p=linux-2.6-microblaze.git Merge branch kvm-arm64/lock-inversion into kvmarm-master/next * kvm-arm64/lock-inversion: : . : vm/vcpu lock inversion fixes, courtesy of Oliver Upton, plus a few : extra fixes from both Oliver and Reiji Watanabe. : : From the initial cover letter: : : As it so happens, lock ordering in KVM/arm64 is completely backwards. : There's a significant amount of VM-wide state that needs to be accessed : from the context of a vCPU. Until now, this was accomplished by : acquiring the kvm->lock, but that cannot be nested within vcpu->mutex. : : This series fixes the issue with some fine-grained locking for MP state : and a new, dedicated mutex that can nest with both kvm->lock and : vcpu->mutex. : . KVM: arm64: Have kvm_psci_vcpu_on() use WRITE_ONCE() to update mp_state KVM: arm64: Acquire mp_state_lock in kvm_arch_vcpu_ioctl_vcpu_init() KVM: arm64: vgic: Don't acquire its_lock before config_lock KVM: arm64: Use config_lock to protect vgic state KVM: arm64: Use config_lock to protect data ordered against KVM_RUN KVM: arm64: Avoid lock inversion when setting the VM register width KVM: arm64: Avoid vcpu->mutex v. kvm->lock inversion in CPU_ON Signed-off-by: Marc Zyngier --- ef5f97e9de9fc0d5bb6136de3d01d78c072a452f