#include <palacios/vmm_decoder.h>
#include <palacios/vmm_ctrl_regs.h>
#include <palacios/svm_io.h>
+#include <palacios/svm_halt.h>
#include <palacios/vmm_intr.h>
} else if (exit_code == VMEXIT_HLT) {
PrintDebug("Guest halted\n");
- return -1;
+ if (handle_svm_halt(info) == -1) {
+ return -1;
+ }
} else {
addr_t rip_addr;
char buf[15];
if (info->intr_state.excp_error_code) {
guest_ctrl->EVENTINJ.error_code = info->intr_state.excp_error_code;
guest_ctrl->EVENTINJ.ev = 1;
+ PrintDebug("Injecting error code %x\n", guest_ctrl->EVENTINJ.error_code);
}
guest_ctrl->EVENTINJ.vector = excp;
+ guest_ctrl->EVENTINJ.valid = 1;
PrintDebug("Injecting Interrupt %d (EIP=%x)\n", guest_ctrl->EVENTINJ.vector, info->rip);
injecting_intr(info, excp, EXCEPTION);
break;