summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/sys
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2022-07-27 19:30:06 +0000
committerPatrick Mooney <pmooney@oxide.computer>2022-08-02 20:56:48 +0000
commitaa39f6d0fd4e491afca04b12f49a18ce955efc79 (patch)
tree9a8973e25c4115abf2ef267225998abc52331a84 /usr/src/uts/intel/sys
parentfed77ffd89ea4501fe7b7103197dc7541246e3bb (diff)
downloadillumos-gate-aa39f6d0fd4e491afca04b12f49a18ce955efc79.tar.gz
14817 bhyve VMs should be capable of auto-destruct
14864 want device for testing vmm_drv interface Reviewed by: Greg Colombo <greg@oxidecomputer.com> Reviewed by: Andy Fiddaman <andy@omnios.org> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/uts/intel/sys')
-rw-r--r--usr/src/uts/intel/sys/vmm_dev.h4
-rw-r--r--usr/src/uts/intel/sys/vmm_drv_test.h25
2 files changed, 28 insertions, 1 deletions
diff --git a/usr/src/uts/intel/sys/vmm_dev.h b/usr/src/uts/intel/sys/vmm_dev.h
index 8d1b2713dd..b8c87217b4 100644
--- a/usr/src/uts/intel/sys/vmm_dev.h
+++ b/usr/src/uts/intel/sys/vmm_dev.h
@@ -385,7 +385,7 @@ struct vm_data_xfer {
* best-effort activity. Nothing is to be inferred about the magnitude of a
* change when the version is modified. It follows no rules like semver.
*/
-#define VMM_CURRENT_INTERFACE_VERSION 3
+#define VMM_CURRENT_INTERFACE_VERSION 4
#define VMMCTL_IOC_BASE (('V' << 16) | ('M' << 8))
@@ -494,6 +494,8 @@ struct vm_data_xfer {
#define VM_DATA_READ (VMM_IOC_BASE | 0x22)
#define VM_DATA_WRITE (VMM_IOC_BASE | 0x23)
+#define VM_SET_AUTODESTRUCT (VMM_IOC_BASE | 0x24)
+
#define VM_DEVMEM_GETOFFSET (VMM_IOC_BASE | 0xff)
#define VMM_CTL_DEV "/dev/vmmctl"
diff --git a/usr/src/uts/intel/sys/vmm_drv_test.h b/usr/src/uts/intel/sys/vmm_drv_test.h
new file mode 100644
index 0000000000..1cf26dd51a
--- /dev/null
+++ b/usr/src/uts/intel/sys/vmm_drv_test.h
@@ -0,0 +1,25 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+/* This file is dual-licensed; see usr/src/contrib/bhyve/LICENSE */
+
+/*
+ * Copyright 2022 Oxide Computer Company
+ */
+
+#ifndef _VMM_DRV_TEST_H_
+#define _VMM_DRV_TEST_H_
+
+#define VDT_IOC_BASE (('V' << 16) | ('D' << 8))
+
+#define VDT_IOC_HOLD (VDT_IOC_BASE | 0x01)
+#define VDT_IOC_RELE (VDT_IOC_BASE | 0x02)
+
+#endif /* _VMM_DRV_TEST_H_ */