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.


added emulator
[palacios.git] / palacios / src / palacios / vmm_ctrl_regs.c
index 2e566ef..152a7c0 100644 (file)
@@ -45,11 +45,13 @@ int handle_cr0_write(struct guest_info * info) {
     ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr);
   }
 
-  if (ret != 15) {
+  /* The IFetch will already have faulted in the necessary bytes for the full instruction
+    if (ret != 15) {
     // I think we should inject a GPF into the guest
     PrintError("Could not read instruction (ret=%d)\n", ret);
     return -1;
-  }
+    }
+  */
 
   if (v3_decode(info, (addr_t)instr, &dec_instr) == -1) {
     PrintError("Could not decode instruction\n");
@@ -157,11 +159,13 @@ int handle_cr0_read(struct guest_info * info) {
     ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr);
   }
 
-  if (ret != 15) {
-    // I think we should inject a GPF into the guest
-    PrintError("Could not read instruction (ret=%d)\n", ret);
-    return -1;
-  }
+  /* The IFetch will already have faulted in the necessary bytes for the full instruction
+     if (ret != 15) {
+     // I think we should inject a GPF into the guest
+     PrintError("Could not read instruction (ret=%d)\n", ret);
+     return -1;
+     }
+  */
 
   if (v3_decode(info, (addr_t)instr, &dec_instr) == -1) {
     PrintError("Could not decode instruction\n");
@@ -220,11 +224,13 @@ int handle_cr3_write(struct guest_info * info) {
     ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr);
   }
 
-  if (ret != 15) {
-    // I think we should inject a GPF into the guest
-    PrintError("Could not read instruction (ret=%d)\n", ret);
-    return -1;
-  }
+  /* The IFetch will already have faulted in the necessary bytes for the full instruction
+     if (ret != 15) {
+     // I think we should inject a GPF into the guest
+     PrintError("Could not read instruction (ret=%d)\n", ret);
+     return -1;
+     }
+  */
 
   if (v3_decode(info, (addr_t)instr, &dec_instr) == -1) {
     PrintError("Could not decode instruction\n");
@@ -297,11 +303,13 @@ int handle_cr3_read(struct guest_info * info) {
     ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr);
   }
 
-  if (ret != 15) {
-    // I think we should inject a GPF into the guest
-    PrintError("Could not read instruction (ret=%d)\n", ret);
-    return -1;
-  }
+  /* The IFetch will already have faulted in the necessary bytes for the full instruction
+     if (ret != 15) {
+     // I think we should inject a GPF into the guest
+     PrintError("Could not read instruction (ret=%d)\n", ret);
+     return -1;
+     }
+  */
 
   if (v3_decode(info, (addr_t)instr, &dec_instr) == -1) {
     PrintError("Could not decode instruction\n");