X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm.c;h=7a1c73755324c696a242e034af1c9018e10eddef;hb=cd012ba87f57c1c694038f1a17f249f90f9a2be8;hp=7ba76ebe2746c6a7ffad858a5db5d863b82fe495;hpb=c06413341bf1dca02f22c0502fa5c2d1c2c11eab;p=palacios.git diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index 7ba76eb..7a1c737 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -42,6 +42,7 @@ #include #include +#include // This is a global pointer to the host's VMCB @@ -90,14 +91,13 @@ static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info *vm_info) { ctrl_area->svm_instrs.CLGI = 1; ctrl_area->svm_instrs.SKINIT = 1; ctrl_area->svm_instrs.RDTSCP = 1; - ctrl_area->svm_instrs.CPUID = 1; ctrl_area->svm_instrs.ICEBP = 1; ctrl_area->svm_instrs.WBINVD = 1; ctrl_area->svm_instrs.MONITOR = 1; ctrl_area->svm_instrs.MWAIT_always = 1; ctrl_area->svm_instrs.MWAIT_if_armed = 1; ctrl_area->instrs.INVLPGA = 1; - + ctrl_area->instrs.CPUID = 1; ctrl_area->instrs.HLT = 1; // guest_state->cr0 = 0x00000001; // PE @@ -326,7 +326,7 @@ static int start_svm_guest(struct guest_info *info) { vmcb_ctrl_t * guest_ctrl = GET_VMCB_CTRL_AREA((vmcb_t*)(info->vmm_data)); addr_t host_addr; addr_t linear_addr = 0; - + info->run_state = VM_ERROR; PrintDebug("SVM ERROR!!\n"); @@ -354,6 +354,10 @@ static int start_svm_guest(struct guest_info *info) { PrintDebug("Instr (15 bytes) at %p:\n", (void *)host_addr); v3_dump_mem((uint8_t *)host_addr, 15); + + v3_print_stack(info); + + break; } } @@ -367,7 +371,6 @@ static int start_svm_guest(struct guest_info *info) { /* Checks machine SVM capability */ /* Implemented from: AMD Arch Manual 3, sect 15.4 */ int v3_is_svm_capable() { - // Dinda uint_t vm_cr_low = 0, vm_cr_high = 0; uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;