KVM: s390: Do not yield when target is already running
If the target is already running we do not need to yield. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
8474e5cac0
commit
c7b7de6312
|
@ -168,6 +168,10 @@ static int __diag_time_slice_end_directed(struct kvm_vcpu *vcpu)
|
|||
if (!tcpu)
|
||||
goto no_yield;
|
||||
|
||||
/* target already running */
|
||||
if (READ_ONCE(tcpu->cpu) >= 0)
|
||||
goto no_yield;
|
||||
|
||||
if (kvm_vcpu_yield_to(tcpu) <= 0)
|
||||
goto no_yield;
|
||||
|
||||
|
|
Loading…
Reference in New Issue