X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvm_guest_mem.c;h=105322e6301406fcbb826533aaf91568b01cf50a;hp=0fc0e40bacc495d7e90c32facfd75187e0b25788;hb=d4073a9dbe24ae160b8d6bd8fd5fd4ad8aa995a3;hpb=08a79dd2e3c75109539bdce50c049303b1fb0912 diff --git a/palacios/src/palacios/vm_guest_mem.c b/palacios/src/palacios/vm_guest_mem.c index 0fc0e40..105322e 100644 --- a/palacios/src/palacios/vm_guest_mem.c +++ b/palacios/src/palacios/vm_guest_mem.c @@ -115,15 +115,14 @@ int guest_pa_to_host_va(struct guest_info * guest_info, addr_t guest_pa, addr_t int guest_va_to_guest_pa(struct guest_info * guest_info, addr_t guest_va, addr_t * guest_pa) { - if (guest_info->shdw_pg_mode == SHADOW_PAGING) { - if (guest_info->mem_mode == PHYSICAL_MEM) { - // guest virtual address is the same as the physical - *guest_pa = guest_va; - return 0; - } - - + if (guest_info->mem_mode == PHYSICAL_MEM) { + // guest virtual address is the same as the physical + *guest_pa = guest_va; + return 0; + } + + if (guest_info->shdw_pg_mode == SHADOW_PAGING) { // Guest Is in Paged mode switch (guest_info->cpu_mode) { case PROTECTED: @@ -184,7 +183,7 @@ int guest_va_to_guest_pa(struct guest_info * guest_info, addr_t guest_va, addr_t } else if (guest_info->shdw_pg_mode == NESTED_PAGING) { // Fill in - + return -1; } else { return -1; }