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.


moved guest_efer from top level guest_info to the shadow page state
[palacios.git] / palacios / src / palacios / vm_guest.c
index 0d7418a..c846415 100644 (file)
@@ -26,7 +26,7 @@
 #include <palacios/vmcb.h>
 
 
-v3_cpu_mode_t v3_get_cpu_mode(struct guest_info * info) {
+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);
@@ -35,7 +35,7 @@ v3_cpu_mode_t v3_get_cpu_mode(struct guest_info * info) {
 
     if (info->shdw_pg_mode == SHADOW_PAGING) {
        cr0 = (struct cr0_32 *)&(info->shdw_pg_state.guest_cr0);
-       efer = (struct efer_64 *)&(info->guest_efer);
+       efer = (struct efer_64 *)&(info->shdw_pg_state.guest_efer);
     } else if (info->shdw_pg_mode == NESTED_PAGING) {
        cr0 = (struct cr0_32 *)&(info->ctrl_regs.cr0);
        efer = (struct efer_64 *)&(guest_state->efer);
@@ -69,7 +69,7 @@ uint_t v3_get_addr_width(struct guest_info * info) {
 
     if (info->shdw_pg_mode == SHADOW_PAGING) {
        cr0 = (struct cr0_32 *)&(info->shdw_pg_state.guest_cr0);
-       efer = (struct efer_64 *)&(info->guest_efer);
+       efer = (struct efer_64 *)&(info->shdw_pg_state.guest_efer);
     } else if (info->shdw_pg_mode == NESTED_PAGING) {
        cr0 = (struct cr0_32 *)&(info->ctrl_regs.cr0);
        efer = (struct efer_64 *)&(guest_state->efer);
@@ -120,7 +120,7 @@ const uchar_t * v3_cpu_mode_to_str(v3_cpu_mode_t mode) {
     }
 }
 
-v3_mem_mode_t v3_get_mem_mode(struct guest_info * info) {
+v3_mem_mode_t v3_get_vm_mem_mode(struct guest_info * info) {
     struct cr0_32 * cr0;
 
     if (info->shdw_pg_mode == SHADOW_PAGING) {