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.


small fixes
Jack Lange [Mon, 1 Dec 2008 23:28:49 +0000 (17:28 -0600)]
palacios/include/palacios/vmm.h
palacios/include/palacios/vmm_shadow_paging.h
palacios/include/palacios/vmm_socket.h
palacios/src/palacios/vmm_paging.c
palacios/src/palacios/vmm_shadow_paging.c

index 6f22cfa..b164213 100644 (file)
@@ -24,6 +24,7 @@
 #include <palacios/vm_guest.h>
 #include <palacios/vmm_mem.h>
 
+
 #ifdef __V3VEE__
 
 //#include <palacios/vmm_types.h>
index 962803d..bea54aa 100644 (file)
@@ -34,13 +34,16 @@ struct shadow_page_state {
   v3_reg_t guest_cr3;
   v3_reg_t guest_cr0;
 
-  // these two reflect the top-level page directory 
-  // of the shadow page table
-  // v3_reg_t                shadow_cr3;
 
 
-  // Hash table that ties a CR3 value to a hash table pointer for the PT entries
+
+  // Page table struct lookup table
+  struct hashtable * pt_cache;
+
+  // Guest CR3 to Shadow CR3 Lookup Table
   struct hashtable *  cr3_cache;
+
+  /* SOON TO BE DEPRECATED */
   // Hash table that contains a mapping of guest pte addresses to host pte addresses
   struct hashtable *  cached_ptes;
   addr_t cached_cr3;
index 5af1c69..bd88682 100644 (file)
@@ -42,7 +42,7 @@
       extern struct v3_socket_hooks * sock_hooks;      \
       V3_SOCK sock = 0;                                        \
       if ((sock_hooks) && (sock_hooks)->tcp_socket) {  \
-       sock = (sock_hooks)->tcp_socket(0,0);           \
+       sock = (sock_hooks)->tcp_socket(0,0,0);         \
       }                                                        \
       sock;                                            \
     })
     })
 
 
-#define V3_Accept_Socket() (-1)
-#define V3_Select_Socket() (-1)
+#define V3_Accept_Socket(sock, ip_ptr) ({                      \
+      extern struct v3_socket_hooks * sock_hooks;              \
+      int ret = -1;                                            \
+      if ((sock_hooks) && (sock_hooks)->accept) {              \
+       ret = (sock_hooks)->accept(sock, ip_ptr);               \
+      }                                                                \
+      ret;                                                     \
+    })
+
+
+#define V3_Select_Socket(rset,wset,eset,tv) ({                 \
+      extern struct v3_socket_hooks * sock_hooks;              \
+      int ret = -1;                                            \
+      if ((sock_hooks) && (sock_hooks)->select) {              \
+       ret = (sock_hooks)->select(rset, wset, eset, tv);       \
+      }                                                                \
+      ret;                                                     \
+    })
 
 
 
index 6f1bc14..a5ef2df 100644 (file)
@@ -414,11 +414,8 @@ int v3_check_guest_pt_64(struct guest_info * info, v3_reg_t guest_cr3, addr_t va
 /*
  * PAGE TABLE LOOKUP FUNCTIONS
  *
- *
  * The value of entry is a return type:
  * Page not present: *entry = 0
- * Large Page: *entry = translated physical address (byte granularity)
- * PTE entry: *entry is the address of the PTE Page
  */
 
 /**
index d58fed7..a427b13 100644 (file)
@@ -26,6 +26,8 @@
 #include <palacios/vmm_decoder.h>
 #include <palacios/vmm_ctrl_regs.h>
 
+#include <palacios/vmm_hashtable.h>
+
 #ifndef DEBUG_SHADOW_PAGING
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
  ***/
 
 
+struct guest_table {
+  addr_t cr3;
+  struct list_head link;
+};
+
+
+struct backptr {
+  addr_t ptr;
+  struct list_head link;
+};
+
+
+struct shadow_page_data {
+  addr_t ptr;
+  addr_t guest_addr; 
+
+  struct list_head backptrs;
+  struct list_head guest_tables;
+};
+