summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/sys
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2022-04-26 22:17:57 +0000
committerPatrick Mooney <pmooney@oxide.computer>2022-05-02 21:35:55 +0000
commit3466010b6f73e5cbeb612e538494c9d42c6d4a68 (patch)
treef8e7fc9ec946d74e49c8f6938bd8728918d6489e /usr/src/uts/intel/sys
parent2a22bccab8733d6de38ab1e1fbe8c810122a4427 (diff)
downloadillumos-gate-3466010b6f73e5cbeb612e538494c9d42c6d4a68.tar.gz
14660 expose bhyve kernel interface version
Reviewed by: Andy Fiddaman <andy@omnios.org> Reviewed by: Toomas Soome <tsoome@me.com> 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.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/usr/src/uts/intel/sys/vmm_dev.h b/usr/src/uts/intel/sys/vmm_dev.h
index 027a7da214..0e883f21bb 100644
--- a/usr/src/uts/intel/sys/vmm_dev.h
+++ b/usr/src/uts/intel/sys/vmm_dev.h
@@ -350,6 +350,24 @@ struct vmm_dirty_tracker {
void *vdt_pfns; /* bit vector of dirty bits */
};
+/*
+ * VMM Interface Version
+ *
+ * Despite the fact that the kernel interface to bhyve is explicitly considered
+ * Private, there are out-of-gate consumers which utilize it. While they assume
+ * the risk of any breakage incurred by changes to bhyve, we can at least try to
+ * make it easier to detect changes by exposing a "version" of the interface.
+ * It can also be used by the in-gate userland to detect if packaging updates
+ * somehow result in the userland and kernel falling out of sync.
+ *
+ * There are no established criteria for the magnitude of change which requires
+ * this version to be incremented, and maintenance of it is considered a
+ * 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 1
+
+
#define VMMCTL_IOC_BASE (('V' << 16) | ('M' << 8))
#define VMM_IOC_BASE (('v' << 16) | ('m' << 8))
#define VMM_LOCK_IOC_BASE (('v' << 16) | ('l' << 8))
@@ -359,6 +377,7 @@ struct vmm_dirty_tracker {
#define VMM_CREATE_VM (VMMCTL_IOC_BASE | 0x01)
#define VMM_DESTROY_VM (VMMCTL_IOC_BASE | 0x02)
#define VMM_VM_SUPPORTED (VMMCTL_IOC_BASE | 0x03)
+#define VMM_INTERFACE_VERSION (VMMCTL_IOC_BASE | 0x04)
#define VMM_RESV_QUERY (VMMCTL_IOC_BASE | 0x10)
#define VMM_RESV_ADD (VMMCTL_IOC_BASE | 0x11)