mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
KVM: s390: vsie: Move conditional reschedule
Let's move it to the outer loop, in case we ever run again into long loops, trying to map the prefix. While at it, convert it to cond_resched(). Signed-off-by: David Hildenbrand <david@redhat.com> Link: https://lore.kernel.org/r/20200403153050.20569-5-david@redhat.com Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
2a173ec993
commit
d075fc3154
@ -1000,8 +1000,6 @@ static int do_vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
|
|||||||
|
|
||||||
handle_last_fault(vcpu, vsie_page);
|
handle_last_fault(vcpu, vsie_page);
|
||||||
|
|
||||||
if (need_resched())
|
|
||||||
schedule();
|
|
||||||
if (test_cpu_flag(CIF_MCCK_PENDING))
|
if (test_cpu_flag(CIF_MCCK_PENDING))
|
||||||
s390_handle_mcck();
|
s390_handle_mcck();
|
||||||
|
|
||||||
@ -1185,6 +1183,7 @@ static int vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
|
|||||||
kvm_s390_vcpu_has_irq(vcpu, 0) ||
|
kvm_s390_vcpu_has_irq(vcpu, 0) ||
|
||||||
kvm_s390_vcpu_sie_inhibited(vcpu))
|
kvm_s390_vcpu_sie_inhibited(vcpu))
|
||||||
break;
|
break;
|
||||||
|
cond_resched();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rc == -EFAULT) {
|
if (rc == -EFAULT) {
|
||||||
|
Loading…
Reference in New Issue
Block a user