X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm.c;h=752e2490866760f0e1e22eb0c632f68fb275f378;hb=8300df0450154d7a2db08a7afbd2aca32ce38f70;hp=c11b4844cc2abe5e0fb7089f4262dbc13b537f05;hpb=655b4ebc21a3dc379539dc603d5524e31ab7b031;p=palacios.releases.git diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index c11b484..752e249 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -286,6 +286,9 @@ int v3_init_svm_vmcb(struct guest_info * info, v3_vm_class_t vm_class) { static int update_irq_exit_state(struct guest_info * info) { vmcb_ctrl_t * guest_ctrl = GET_VMCB_CTRL_AREA((vmcb_t*)(info->vmm_data)); + // Fix for QEMU bug using EVENTINJ as an internal cache + guest_ctrl->EVENTINJ.valid = 0; + if ((info->intr_core_state.irq_pending == 1) && (guest_ctrl->guest_ctrl.V_IRQ == 0)) { #ifdef CONFIG_DEBUG_INTERRUPTS @@ -468,11 +471,7 @@ int v3_svm_enter(struct guest_info * info) { rdtscll(tmp_tsc); - if (tmp_tsc < info->time_state.cached_host_tsc) { - PrintError("Time has gone backwards, panicing!\n"); - return -1; - } - v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc); + v3_update_time(info, (tmp_tsc - info->time_state.cached_host_tsc)); rdtscll(info->time_state.cached_host_tsc); // guest_ctrl->TSC_OFFSET = info->time_state.guest_tsc - info->time_state.cached_host_tsc; @@ -587,9 +586,9 @@ int v3_start_svm_guest(struct guest_info *info) { linear_addr = get_addr_linear(info, info->rip, &(info->segments.cs)); if (info->mem_mode == PHYSICAL_MEM) { - guest_pa_to_host_va(info, linear_addr, &host_addr); + v3_gpa_to_hva(info, linear_addr, &host_addr); } else if (info->mem_mode == VIRTUAL_MEM) { - guest_va_to_host_va(info, linear_addr, &host_addr); + v3_gva_to_hva(info, linear_addr, &host_addr); } V3_Print("Host Address of rip = 0x%p\n", (void *)host_addr);