X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmx.c;h=f45ffa3f2017c743ef5dca444bf85f114d4414b8;hb=4e43946f01f687361197dc9571b7df02ae20de30;hp=80a52a3fef20ba637995d8a8cbdd0856bbb8237b;hpb=d775bbfa668ce9968bacc0e4257cf86e5ab88e90;p=palacios.git diff --git a/palacios/src/palacios/vmx.c b/palacios/src/palacios/vmx.c index 80a52a3..f45ffa3 100644 --- a/palacios/src/palacios/vmx.c +++ b/palacios/src/palacios/vmx.c @@ -994,6 +994,10 @@ int v3_vmx_enter(struct guest_info * info) { v3_mem_track_entry(info); #endif +#ifdef V3_CONFIG_HVM + v3_handle_hvm_entry(info); +#endif + // Update timer devices late after being in the VM so that as much // of the time in the VM is accounted for as possible. Also do it before // updating IRQ entry state so that any interrupts the timers raise get @@ -1196,6 +1200,10 @@ int v3_vmx_enter(struct guest_info * info) { v3_handle_timeouts(info, guest_cycles); } +#ifdef V3_CONFIG_HVM + v3_handle_hvm_exit(info); +#endif + #ifdef V3_CONFIG_MEM_TRACK v3_mem_track_exit(info); #endif @@ -1306,9 +1314,15 @@ int v3_start_vmx_guest(struct guest_info * info) { linear_addr = get_addr_linear(info, info->rip, &(info->segments.cs)); if (info->mem_mode == PHYSICAL_MEM) { - v3_gpa_to_hva(info, linear_addr, &host_addr); + if (v3_gpa_to_hva(info, linear_addr, &host_addr)) { + PrintError(info->vm_info, info, "Cannot translate address\n"); + return -1; + } } else if (info->mem_mode == VIRTUAL_MEM) { - v3_gva_to_hva(info, linear_addr, &host_addr); + if (v3_gva_to_hva(info, linear_addr, &host_addr)) { + PrintError(info->vm_info, info, "Cannot translate address\n"); + return -1; + } } V3_Print(info->vm_info, info, "VMX core %u: Host Address of rip = 0x%p\n", info->vcpu_id, (void *)host_addr);