Commit 87013f9c authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

powerpc/kvm/book3s: switch from raw_spin_*lock to arch_spin_lock.

These functions can get called in realmode. Hence use low level
arch_spin_lock which is safe to be called in realmode.
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200505071729.54912-9-aneesh.kumar@linux.ibm.com
parent 15759cb0
...@@ -948,7 +948,7 @@ static long kvmppc_do_h_page_init_zero(struct kvm_vcpu *vcpu, ...@@ -948,7 +948,7 @@ static long kvmppc_do_h_page_init_zero(struct kvm_vcpu *vcpu,
return ret; return ret;
/* Check if we've been invalidated */ /* Check if we've been invalidated */
raw_spin_lock(&kvm->mmu_lock.rlock); arch_spin_lock(&kvm->mmu_lock.rlock.raw_lock);
if (mmu_notifier_retry(kvm, mmu_seq)) { if (mmu_notifier_retry(kvm, mmu_seq)) {
ret = H_TOO_HARD; ret = H_TOO_HARD;
goto out_unlock; goto out_unlock;
...@@ -960,7 +960,7 @@ static long kvmppc_do_h_page_init_zero(struct kvm_vcpu *vcpu, ...@@ -960,7 +960,7 @@ static long kvmppc_do_h_page_init_zero(struct kvm_vcpu *vcpu,
kvmppc_update_dirty_map(memslot, dest >> PAGE_SHIFT, PAGE_SIZE); kvmppc_update_dirty_map(memslot, dest >> PAGE_SHIFT, PAGE_SIZE);
out_unlock: out_unlock:
raw_spin_unlock(&kvm->mmu_lock.rlock); arch_spin_unlock(&kvm->mmu_lock.rlock.raw_lock);
return ret; return ret;
} }
...@@ -984,7 +984,7 @@ static long kvmppc_do_h_page_init_copy(struct kvm_vcpu *vcpu, ...@@ -984,7 +984,7 @@ static long kvmppc_do_h_page_init_copy(struct kvm_vcpu *vcpu,
return ret; return ret;
/* Check if we've been invalidated */ /* Check if we've been invalidated */
raw_spin_lock(&kvm->mmu_lock.rlock); arch_spin_lock(&kvm->mmu_lock.rlock.raw_lock);
if (mmu_notifier_retry(kvm, mmu_seq)) { if (mmu_notifier_retry(kvm, mmu_seq)) {
ret = H_TOO_HARD; ret = H_TOO_HARD;
goto out_unlock; goto out_unlock;
...@@ -996,7 +996,7 @@ static long kvmppc_do_h_page_init_copy(struct kvm_vcpu *vcpu, ...@@ -996,7 +996,7 @@ static long kvmppc_do_h_page_init_copy(struct kvm_vcpu *vcpu,
kvmppc_update_dirty_map(dest_memslot, dest >> PAGE_SHIFT, PAGE_SIZE); kvmppc_update_dirty_map(dest_memslot, dest >> PAGE_SHIFT, PAGE_SIZE);
out_unlock: out_unlock:
raw_spin_unlock(&kvm->mmu_lock.rlock); arch_spin_unlock(&kvm->mmu_lock.rlock.raw_lock);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment