Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup and sanity-checking of endianness, dead code, unchecked returns (Coverity...
[palacios.git] / palacios / src / palacios / vmx.c
index 80a52a3..2984de8 100644 (file)
@@ -1306,9 +1306,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);