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.


add more permission checks to shadow paging
Jack Lange [Sat, 15 May 2010 00:29:18 +0000 (19:29 -0500)]
palacios/src/palacios/mmu/vmm_shdw_pg_swapbypass_32.h
palacios/src/palacios/mmu/vmm_shdw_pg_swapbypass_64.h
palacios/src/palacios/mmu/vmm_shdw_pg_tlb_32.h
palacios/src/palacios/mmu/vmm_shdw_pg_tlb_64.h

index c0ce265..6eca4d5 100644 (file)
@@ -389,7 +389,7 @@ static int handle_pte_shadow_pagefault_32(struct guest_info * info, addr_t fault
                PrintError("Special Page fault handler returned error for address: %p\n",  (void *)fault_addr);
                return -1;
            }
-       } else {
+       } else if (shdw_reg->flags.write == 1) {
            PrintDebug("Shadow PTE Write Error\n");
            shadow_pte->writable = guest_pte->writable;
        }
index c3d2964..287b14c 100644 (file)
@@ -500,7 +500,7 @@ static int handle_pte_shadow_pagefault_64(struct guest_info * info, addr_t fault
                PrintError("Special Page fault handler returned error for address: %p\n",  (void *)fault_addr);
                return -1;
            }
-       } else {
+       } else if (shdw_reg->flags.write == 1) {
            PrintDebug("Shadow PTE Write Error\n");
            shadow_pte->writable = guest_pte->writable;
        }
index 91ae34e..30acc7a 100644 (file)
@@ -274,8 +274,6 @@ static int handle_pte_shadow_pagefault_32(struct guest_info * info, addr_t fault
            }
 
 
-
-           // Write hooks trump all, and are set Read Only
            if (shdw_reg->flags.write == 0) {
                shadow_pte->writable = 0;
            }
@@ -296,7 +294,7 @@ static int handle_pte_shadow_pagefault_32(struct guest_info * info, addr_t fault
                PrintError("Special Page fault handler returned error for address: %p\n",  (void *)fault_addr);
                return -1;
            }
-       } else {
+       } else if (shdw_reg->flags.write == 1) {
            PrintDebug("Shadow PTE Write Error\n");
            shadow_pte->writable = guest_pte->writable;
        }
index cdbb580..df44714 100644 (file)
@@ -500,7 +500,7 @@ static int handle_pte_shadow_pagefault_64(struct guest_info * info, addr_t fault
                PrintError("Special Page fault handler returned error for address: %p\n",  (void *)fault_addr);
                return -1;
            }
-       } else {
+       } else if (shdw_reg->flags.write == 1) {
            PrintDebug("Shadow PTE Write Error\n");
            shadow_pte->writable = guest_pte->writable;
        }