| * Commonwealth Scientific and Industrial Research Organisation (CSIRO) |
| * This software may be distributed and modified according to the terms of |
| * the GNU General Public License version 2. Note that NO WARRANTY is provided. |
| * See "LICENSE_GPLv2.txt" for details. |
| /*vm exits related with hlt'ing*/ |
| /* Handling halt instruction VMExit Events. */ |
| int vmm_hlt_handler(vmm_vcpu_t *vcpu) { |
| if (!(vmm_guest_state_get_rflags(&vcpu->guest_state, vcpu->guest_vcpu) & BIT(9))) { |
| printf("vcpu %d is halted forever :(\n", vcpu->vcpu_id); |
| if (vmm_apic_has_interrupt(vcpu) == -1) { |
| /* Halted, don't reply until we get an interrupt */ |
| vcpu->guest_state.virt.interrupt_halt = 1; |
| vmm_guest_exit_next_instruction(&vcpu->guest_state, vcpu->guest_vcpu); |