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.


added ability to inject an env variable into guest user process
[palacios.git] / palacios / src / palacios / vm_guest.c
index 4ab0134..5281dd4 100644 (file)
 #include <palacios/vmm_xed.h>
 #include <palacios/vmm_direct_paging.h>
 
+#ifdef CONFIG_SYSCALL_HIJACK
+#include <palacios/vmm_syscall_hijack.h>
+#endif
+
 
 
 v3_cpu_mode_t v3_get_vm_cpu_mode(struct guest_info * info) {
@@ -678,6 +682,16 @@ int v3_init_core(struct guest_info * core) {
     v3_init_symbiotic_core(core);
 #endif
 
+/* KCH: Hook INT 80
+      not sure about this location though...*/
+#ifdef CONFIG_SYSCALL_HIJACK
+    v3_hook_swintr(core, 0x80, v3_syscall_handler, NULL);
+    /* hook a poll syscall */
+    //v3_hook_syscall(core, 5, v3_sysopen_handler, NULL);
+    //v3_hook_syscall(core, 21, v3_sysmount_handler, NULL);
+    v3_hook_syscall(core, 11, v3_sysexecve_handler, NULL);
+#endif  
+
     // init SVM/VMX