// guest_state->cr0 = 0x00000001; // PE
ctrl_area->guest_ASID = 1;
- ctrl_area->exceptions.de = 1;
- ctrl_area->exceptions.df = 1;
- ctrl_area->exceptions.pf = 1;
- ctrl_area->exceptions.ts = 1;
- ctrl_area->exceptions.ss = 1;
- ctrl_area->exceptions.ac = 1;
- ctrl_area->exceptions.mc = 1;
- ctrl_area->exceptions.gp = 1;
- ctrl_area->exceptions.ud = 1;
- ctrl_area->exceptions.np = 1;
- ctrl_area->exceptions.of = 1;
- ctrl_area->exceptions.nmi = 1;
+
+ /*
+ ctrl_area->exceptions.de = 1;
+ ctrl_area->exceptions.df = 1;
+
+ ctrl_area->exceptions.ts = 1;
+ ctrl_area->exceptions.ss = 1;
+ ctrl_area->exceptions.ac = 1;
+ ctrl_area->exceptions.mc = 1;
+ ctrl_area->exceptions.gp = 1;
+ ctrl_area->exceptions.ud = 1;
+ ctrl_area->exceptions.np = 1;
+ ctrl_area->exceptions.of = 1;
+
+ ctrl_area->exceptions.nmi = 1;
+ */
+ // Debug of boot on physical machines - 7/14/08
+ ctrl_area->instrs.NMI=1;
+ ctrl_area->instrs.SMI=1;
+ ctrl_area->instrs.INIT=1;
+ ctrl_area->instrs.PAUSE=1;
+ ctrl_area->instrs.shutdown_evts=1;
+
+
vm_info->vm_regs.rdx = 0x00000f00;
ctrl_area->instrs.INVLPG = 1;
ctrl_area->instrs.INVLPGA = 1;
+ ctrl_area->exceptions.pf = 1;
+
/* JRL: This is a performance killer, and a simplistic solution */
/* We need to fix this */
ctrl_area->TLB_CONTROL = 1;
static int start_svm_guest(struct guest_info *info) {
vmcb_saved_state_t * guest_state = GET_VMCB_SAVE_STATE_AREA((vmcb_t*)(info->vmm_data));
vmcb_ctrl_t * guest_ctrl = GET_VMCB_CTRL_AREA((vmcb_t*)(info->vmm_data));
+ uint_t num_exits = 0;
PrintDebug("Launching SVM VM (vmcb=%x)\n", info->vmm_data);
//PrintDebugVMCB((vmcb_t*)(info->vmm_data));
EnableInts();
CLGI();
- PrintDebug("SVM Entry to rip=%x...\n", info->rip);
+ // PrintDebug("SVM Entry to rip=%x...\n", info->rip);
rdtscll(info->time_state.cached_host_tsc);
guest_ctrl->TSC_OFFSET = info->time_state.guest_tsc - info->time_state.cached_host_tsc;
- PrintDebug("Launching\n");
safe_svm_launch((vmcb_t*)(info->vmm_data), &(info->vm_regs));
rdtscll(tmp_tsc);
v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc);
+ num_exits++;
STGI();
+ if ((num_exits % 25) == 0) {
+ PrintDebug("SVM Exit number %d\n", num_exits);
+ }
+
if (handle_svm_exit(info) != 0) {
PrintDebug("RIP Linear: %x\n", linear_addr);
- PrintV3Segments(&(info->segments));
- PrintV3CtrlRegs(&(info->ctrl_regs));
-
+ PrintV3Segments(info);
+ PrintV3CtrlRegs(info);
+ PrintV3GPRs(info);
if (info->mem_mode == PHYSICAL_MEM) {
guest_pa_to_host_pa(info, linear_addr, &host_addr);