}
+
#ifdef V3_CONFIG_TELEMETRY
if (info->vm_info->enable_telemetry) {
v3_telemetry_start_exit(info);
PrintError("Page fault in unimplemented paging mode\n");
return -1;
}
+ } else if ((uint8_t)exit_info->int_info == 2) {
+ // NMI. Don't do anything
+ V3_Print("NMI Exception Received\n");
} else {
PrintError("Unknown exception: 0x%x\n", (uint8_t)exit_info->int_info);
v3_print_GPRs(info);
return -1;
}
break;
+ case 4:
+ //PrintDebug("Handling CR4 Access\n");
+ if (v3_vmx_handle_cr4_access(info, cr_qual) == -1) {
+ PrintError("Error in CR4 access handler\n");
+ return -1;
+ }
+ break;
default:
PrintError("Unhandled CR access: %d\n", cr_qual->cr_id);
return -1;
}
- info->rip += exit_info->instr_len;
+ // TODO: move RIP increment into all of the above individual CR
+ // handlers, not just v3_vmx_handle_cr4_access()
+ if (cr_qual->cr_id != 4)
+ info->rip += exit_info->instr_len;
break;
}
// This is handled in the atomic part of the vmx code,
// not in the generic (interruptable) vmx handler
break;
-
+ case VMEXIT_EXPIRED_PREEMPT_TIMER:
+ V3_Print("VMX Preempt Timer Expired.\n");
+ // This just forces an exit and is handled outside the switch
+ break;
default:
PrintError("Unhandled VMEXIT: %s (%u), %lu (0x%lx)\n",