Skip to content

Commit

Permalink
KVM: s390: Optimize ucontrol path
Browse files Browse the repository at this point in the history
Since commit 7c47053
(s390/kvm: avoid automatic sie reentry) we will run through the C code
of KVM on host interrupts instead of just reentering the guest. This
will result in additional ucontrol exits (at least HZ per second). Let
handle a 0 intercept in the kernel and dont return to userspace,
even if in ucontrol mode.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
CC: stable@vger.kernel.org
  • Loading branch information
Christian Borntraeger committed Mar 17, 2014
1 parent fed495d commit 2955c83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,8 @@ static int vcpu_post_run(struct kvm_vcpu *vcpu, int exit_reason)

if (rc == 0) {
if (kvm_is_ucontrol(vcpu->kvm))
rc = -EOPNOTSUPP;
/* Don't exit for host interrupts. */
rc = vcpu->arch.sie_block->icptcode ? -EOPNOTSUPP : 0;
else
rc = kvm_handle_sie_intercept(vcpu);
}
Expand Down

0 comments on commit 2955c83

Please sign in to comment.