aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2008-05-21 07:37:37 -0400
committerAvi Kivity <avi@qumranet.com>2008-06-06 14:08:26 -0400
commit0ff318674503ce3787ef62d84f4d948db204b268 (patch)
tree7e3f964df1961aa858bbaf28aa2d455d156cdcc9 /arch
parent71cde5879f10b639506bc0b9f29a89f58b42a17e (diff)
KVM: s390: fix interrupt delivery
The current code delivers pending interrupts before it checks for need_resched. On a busy host, this can lead to a longer interrupt latency if the interrupt is injected while the process is scheduled away. This patch moves delivering the interrupt _after_ schedule(), which makes more sense. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kvm/kvm-s390.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 40e4f2de7320..ded27c7777cc 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -435,6 +435,8 @@ static void __vcpu_run(struct kvm_vcpu *vcpu)
435 if (test_thread_flag(TIF_MCCK_PENDING)) 435 if (test_thread_flag(TIF_MCCK_PENDING))
436 s390_handle_mcck(); 436 s390_handle_mcck();
437 437
438 kvm_s390_deliver_pending_interrupts(vcpu);
439
438 vcpu->arch.sie_block->icptcode = 0; 440 vcpu->arch.sie_block->icptcode = 0;
439 local_irq_disable(); 441 local_irq_disable();
440 kvm_guest_enter(); 442 kvm_guest_enter();
@@ -480,7 +482,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
480 might_sleep(); 482 might_sleep();
481 483
482 do { 484 do {
483 kvm_s390_deliver_pending_interrupts(vcpu);
484 __vcpu_run(vcpu); 485 __vcpu_run(vcpu);
485 rc = kvm_handle_sie_intercept(vcpu); 486 rc = kvm_handle_sie_intercept(vcpu);
486 } while (!signal_pending(current) && !rc); 487 } while (!signal_pending(current) && !rc);