-/* $OpenBSD: vmmvar.h,v 1.48 2017/11/17 04:44:14 mlarkin Exp $ */
+/* $OpenBSD: vmmvar.h,v 1.49 2017/11/29 00:32:52 mlarkin Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
uint8_t vei_string; /* string variety? */
uint8_t vei_encoding; /* operand encoding */
uint16_t vei_port; /* port */
- uint32_t vei_data; /* data (for IN insns) */
+ uint32_t vei_data; /* data */
};
+/*
+ * union vm_exit
+ *
+ * Contains VM exit information communicated to vmd(8). This information is
+ * gathered by vmm(4) from the CPU on each exit that requires help from vmd.
+ */
union vm_exit {
struct vm_exit_inout vei; /* IN/OUT exit */
};
/*
- * struct vcpu_segment_info describes a segment + selector set, used
- * in constructing the initial vcpu register content
+ * struct vcpu_segment_info
+ *
+ * Describes a segment + selector set, used in constructing the initial vcpu
+ * register content
*/
struct vcpu_segment_info {
uint16_t vsi_sel;
VM_RWREGS_MSRS)
struct vm_rwregs_params {
+ /*
+ * Input/output parameters to VMM_IOC_READREGS /
+ * VMM_IOC_WRITEREGS
+ */
uint32_t vrwp_vm_id;
uint32_t vrwp_vcpu_id;
uint64_t vrwp_mask;
#define VMM_IOC_TERM _IOW('V', 4, struct vm_terminate_params) /* Terminate VM */
#define VMM_IOC_RESETCPU _IOW('V', 5, struct vm_resetcpu_params) /* Reset */
#define VMM_IOC_INTR _IOW('V', 6, struct vm_intr_params) /* Intr pending */
-#define VMM_IOC_READREGS _IOWR('V', 7, struct vm_rwregs_params) /* Get registers */
-#define VMM_IOC_WRITEREGS _IOW('V', 8, struct vm_rwregs_params) /* Set registers */
+#define VMM_IOC_READREGS _IOWR('V', 7, struct vm_rwregs_params) /* Get regs */
+#define VMM_IOC_WRITEREGS _IOW('V', 8, struct vm_rwregs_params) /* Set regs */
/* CPUID masks */