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.


Convert shadow paging to use 32 PAE (Core)
[palacios.git] / palacios / src / palacios / vm_guest.c
index 48f0d8a..5c98848 100644 (file)
 v3_cpu_mode_t v3_get_vm_cpu_mode(struct guest_info * info) {
     struct cr0_32 * cr0;
     struct efer_64 * efer;
-    struct cr4_32 * cr4 = (struct cr4_32 *)&(info->ctrl_regs.cr4);
     struct v3_segment * cs = &(info->segments.cs);
-
+    struct cr4_32 * cr4;
 
     if (info->shdw_pg_mode == SHADOW_PAGING) {
        cr0 = (struct cr0_32 *)&(info->shdw_pg_state.guest_cr0);
        efer = (struct efer_64 *)&(info->shdw_pg_state.guest_efer);
+        cr4 = (struct cr4_32 *)&(info->shdw_pg_state.guest_cr4);
     } else if (info->shdw_pg_mode == NESTED_PAGING) {
        cr0 = (struct cr0_32 *)&(info->ctrl_regs.cr0);
        efer = (struct efer_64 *)&(info->ctrl_regs.efer);
+        cr4 = (struct cr4_32 *)&(info->ctrl_regs.cr4);
     } else {
         PrintError(info->vm_info, info, "Invalid Paging Mode...\n");
        V3_ASSERT(info->vm_info, info, 0);
@@ -354,6 +355,8 @@ int v3_free_vm_internal(struct v3_vm_info * vm) {
 
     v3_deinit_events(vm);
 
+    v3_fw_cfg_deinit(vm);
+
 
     return 0;
 }