Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
Avi Kivity 2007-04-30 16:15:58 +03:00
Родитель e6adf28365
Коммит 05e0c8c344
1 изменённых файлов: 27 добавлений и 27 удалений

Просмотреть файл

@ -1998,39 +1998,39 @@ again:
asm ("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS)); asm ("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS));
if (fail) { if (unlikely(fail)) {
kvm_run->exit_reason = KVM_EXIT_FAIL_ENTRY; kvm_run->exit_reason = KVM_EXIT_FAIL_ENTRY;
kvm_run->fail_entry.hardware_entry_failure_reason kvm_run->fail_entry.hardware_entry_failure_reason
= vmcs_read32(VM_INSTRUCTION_ERROR); = vmcs_read32(VM_INSTRUCTION_ERROR);
r = 0; r = 0;
} else { goto out;
/* }
* Profile KVM exit RIPs: /*
*/ * Profile KVM exit RIPs:
if (unlikely(prof_on == KVM_PROFILING)) */
profile_hit(KVM_PROFILING, (void *)vmcs_readl(GUEST_RIP)); if (unlikely(prof_on == KVM_PROFILING))
profile_hit(KVM_PROFILING, (void *)vmcs_readl(GUEST_RIP));
vcpu->launched = 1; vcpu->launched = 1;
r = kvm_handle_exit(kvm_run, vcpu); r = kvm_handle_exit(kvm_run, vcpu);
if (r > 0) { if (r > 0) {
/* Give scheduler a change to reschedule. */ /* Give scheduler a change to reschedule. */
if (signal_pending(current)) { if (signal_pending(current)) {
r = -EINTR; r = -EINTR;
kvm_run->exit_reason = KVM_EXIT_INTR; kvm_run->exit_reason = KVM_EXIT_INTR;
++vcpu->stat.signal_exits; ++vcpu->stat.signal_exits;
goto out; goto out;
} }
if (dm_request_for_irq_injection(vcpu, kvm_run)) { if (dm_request_for_irq_injection(vcpu, kvm_run)) {
r = -EINTR; r = -EINTR;
kvm_run->exit_reason = KVM_EXIT_INTR; kvm_run->exit_reason = KVM_EXIT_INTR;
++vcpu->stat.request_irq_exits; ++vcpu->stat.request_irq_exits;
goto out; goto out;
} }
if (!need_resched()) { if (!need_resched()) {
++vcpu->stat.light_exits; ++vcpu->stat.light_exits;
goto again; goto again;
}
} }
} }