#include <palacios/vm_guest_mem.h>
#include <palacios/vmm_lowlevel.h>
#include <palacios/vmm_sprintf.h>
-#include <palacios/vmm_muxer.h>
#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) {
int v3_init_vm(struct v3_vm_info * vm) {
v3_cpu_arch_t cpu_type = v3_get_cpu_type(V3_Get_CPU());
- if (v3_get_foreground_vm() == NULL) {
- v3_set_foreground_vm(vm);
- }
-
#ifdef CONFIG_TELEMETRY
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