KVM: Add a special exit reason when exiting due to an interrupt
This is redundant, as we also return -EINTR from the ioctl, but it allows us to examine the exit_reason field on resume without seeing old data. Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
@ -1941,12 +1941,14 @@ again:
|
||||
if (signal_pending(current)) {
|
||||
++kvm_stat.signal_exits;
|
||||
post_kvm_run_save(vcpu, kvm_run);
|
||||
kvm_run->exit_reason = KVM_EXIT_INTR;
|
||||
return -EINTR;
|
||||
}
|
||||
|
||||
if (dm_request_for_irq_injection(vcpu, kvm_run)) {
|
||||
++kvm_stat.request_irq_exits;
|
||||
post_kvm_run_save(vcpu, kvm_run);
|
||||
kvm_run->exit_reason = KVM_EXIT_INTR;
|
||||
return -EINTR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user