X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm.c;fp=palacios%2Fsrc%2Fpalacios%2Fsvm.c;h=b9f4a9f6f41a77f183c6f035d0dd2d7930304bcf;hb=a1e2f463ccac3d46ae9410156ae0679bbeb1ce09;hp=4913513a55b5b1465c31df6a5b2b04222ce16a0e;hpb=a6abc36ea941eb0f63783eb077d4073c8773719d;p=palacios.git diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index 4913513..b9f4a9f 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -307,44 +307,22 @@ static int start_svm_guest(struct guest_info *info) { v3_enable_ints(); v3_clgi(); - { - - v3_get_msr(0xc0000101, &vm_cr_high, &vm_cr_low); - - PrintDebug("GS.Base: %x:%x\n", vm_cr_high, vm_cr_low); - /* - v3_get_msr(0xc0000102, &vm_cr_high, &vm_cr_low); - - PrintDebug("KernelGSBase: %x:%x\n", vm_cr_high, vm_cr_low); - */ - - } PrintDebug("SVM Entry to rip=%x...\n", info->rip); + v3_get_msr(0xc0000101, &vm_cr_high, &vm_cr_low); + rdtscll(info->time_state.cached_host_tsc); + guest_ctrl->TSC_OFFSET = info->time_state.guest_tsc - info->time_state.cached_host_tsc; v3_svm_launch((vmcb_t*)V3_PAddr(info->vmm_data), &(info->vm_regs)); - rdtscll(tmp_tsc); - PrintDebug("SVM Returned\n"); - - - { - - v3_set_msr(0xc0000101, vm_cr_high, vm_cr_low); - PrintDebug("GS.Base: %x:%x\n", vm_cr_high, vm_cr_low); - - /* - v3_get_msr(0xc0000102, &vm_cr_high, &vm_cr_low); + v3_set_msr(0xc0000101, vm_cr_high, vm_cr_low); + PrintDebug("SVM Returned\n"); - PrintDebug("KernelGSBase: %x:%x\n", vm_cr_high, vm_cr_low); - */ - } - { uint_t x = 0; PrintDebug("RSP=%p\n", &x);