Modify device to take a binary struct.
[akaros.git] / kern / include / ros / vmm.h
index 309e9f8..1bf2bd0 100644 (file)
 #define        VMM_VMCALL_PRINTF       0x1     /* Enable VMCALL output console hack */
 
 #define VMM_ALL_FLAGS  (VMM_VMCALL_PRINTF)
+
+enum {
+       RESUME,
+       REG_RSP_RIP_CR3,
+       REG_RIP,
+       REG_ALL,
+};
+
+/* eventually, this is a system call. For now, it's #c/vmctl.
+ * You fill in the blanks, and write the struct to #c/vmctl.
+ * On return, i.e. vmexit, it's updated with the new values.
+ */
+struct vmctl {
+       uint64_t command;
+       uint64_t cr3;
+       struct hw_trapframe regs;
+};
+
 #endif /* ROS_INC_VMM_H */