diff options
author | David Hildenbrand <david@redhat.com> | 2020-04-03 18:30:49 +0300 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2020-04-20 12:33:31 +0300 |
commit | d075fc3154be9de3b00b7bba2fb6009fe8ab611a (patch) | |
tree | a60f0ff002dccb4310a8fb50e525a2b2a5139601 /arch/s390/kvm | |
parent | 2a173ec993baa6a97e7b0fb89240200a88d90746 (diff) | |
download | linux-d075fc3154be9de3b00b7bba2fb6009fe8ab611a.tar.xz |
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>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/vsie.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index 4f6c22d72072..ef05b4e167fb 100644 --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -1000,8 +1000,6 @@ static int do_vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) handle_last_fault(vcpu, vsie_page); - if (need_resched()) - schedule(); if (test_cpu_flag(CIF_MCCK_PENDING)) 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_sie_inhibited(vcpu)) break; + cond_resched(); } if (rc == -EFAULT) { |