diff options
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r-- | drivers/kvm/svm.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index e3c6d891326b..cc674bfd31d9 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -1398,11 +1398,19 @@ again: | |||
1398 | if (unlikely(r)) | 1398 | if (unlikely(r)) |
1399 | return r; | 1399 | return r; |
1400 | 1400 | ||
1401 | clgi(); | ||
1402 | |||
1403 | if (signal_pending(current)) { | ||
1404 | stgi(); | ||
1405 | ++vcpu->stat.signal_exits; | ||
1406 | post_kvm_run_save(svm, kvm_run); | ||
1407 | kvm_run->exit_reason = KVM_EXIT_INTR; | ||
1408 | return -EINTR; | ||
1409 | } | ||
1410 | |||
1401 | if (!vcpu->mmio_read_completed) | 1411 | if (!vcpu->mmio_read_completed) |
1402 | do_interrupt_requests(svm, kvm_run); | 1412 | do_interrupt_requests(svm, kvm_run); |
1403 | 1413 | ||
1404 | clgi(); | ||
1405 | |||
1406 | vcpu->guest_mode = 1; | 1414 | vcpu->guest_mode = 1; |
1407 | if (vcpu->requests) | 1415 | if (vcpu->requests) |
1408 | if (test_and_clear_bit(KVM_TLB_FLUSH, &vcpu->requests)) | 1416 | if (test_and_clear_bit(KVM_TLB_FLUSH, &vcpu->requests)) |
@@ -1582,13 +1590,6 @@ again: | |||
1582 | 1590 | ||
1583 | r = handle_exit(svm, kvm_run); | 1591 | r = handle_exit(svm, kvm_run); |
1584 | if (r > 0) { | 1592 | if (r > 0) { |
1585 | if (signal_pending(current)) { | ||
1586 | ++vcpu->stat.signal_exits; | ||
1587 | post_kvm_run_save(svm, kvm_run); | ||
1588 | kvm_run->exit_reason = KVM_EXIT_INTR; | ||
1589 | return -EINTR; | ||
1590 | } | ||
1591 | |||
1592 | if (dm_request_for_irq_injection(svm, kvm_run)) { | 1593 | if (dm_request_for_irq_injection(svm, kvm_run)) { |
1593 | ++vcpu->stat.request_irq_exits; | 1594 | ++vcpu->stat.request_irq_exits; |
1594 | post_kvm_run_save(svm, kvm_run); | 1595 | post_kvm_run_save(svm, kvm_run); |