diff options
author | Patrick Mooney <pmooney@pfmooney.com> | 2022-06-10 23:05:32 +0000 |
---|---|---|
committer | Patrick Mooney <pmooney@oxide.computer> | 2022-06-27 23:20:35 +0000 |
commit | 54cf5b63effe805271443d5dd7afd37ec184fbab (patch) | |
tree | c2da22ed12b56879537c652b894932f257462d7b /usr/src/uts/intel/sys | |
parent | ea962d11118b10579c946c4ac15559148ddf3cf8 (diff) | |
download | illumos-joyent-54cf5b63effe805271443d5dd7afd37ec184fbab.tar.gz |
14635 bhyve should expose additional vcpu state
Reviewed by: Luqman Aden <luqman@oxide.computer>
Reviewed by: Jordan Paige Hendricks <jordan@oxidecomputer.com>
Approved by: Robert Mustacchi <rm@fingolfin.org>
Diffstat (limited to 'usr/src/uts/intel/sys')
-rw-r--r-- | usr/src/uts/intel/sys/vmm.h | 1 | ||||
-rw-r--r-- | usr/src/uts/intel/sys/vmm_data.h | 42 | ||||
-rw-r--r-- | usr/src/uts/intel/sys/vmm_dev.h | 3 |
3 files changed, 32 insertions, 14 deletions
diff --git a/usr/src/uts/intel/sys/vmm.h b/usr/src/uts/intel/sys/vmm.h index 268b2e82ce..50d76ab17c 100644 --- a/usr/src/uts/intel/sys/vmm.h +++ b/usr/src/uts/intel/sys/vmm.h @@ -103,6 +103,7 @@ enum vm_reg_name { VM_REG_GUEST_DR3, VM_REG_GUEST_DR6, VM_REG_GUEST_ENTRY_INST_LENGTH, + VM_REG_GUEST_XCR0, VM_REG_LAST }; diff --git a/usr/src/uts/intel/sys/vmm_data.h b/usr/src/uts/intel/sys/vmm_data.h index 1b8614543c..9ba385c5d6 100644 --- a/usr/src/uts/intel/sys/vmm_data.h +++ b/usr/src/uts/intel/sys/vmm_data.h @@ -18,7 +18,6 @@ #define _VMM_DATA_H_ /* VMM Data Classes */ -#define VDC_META 0 /* Meta information about data system */ #define VDC_VERSION 1 /* Version information for each data class */ /* Classes bearing per-CPU data */ @@ -42,21 +41,27 @@ /* VMM Data Identifiers */ - -/* - * VDC_REGISTER: - */ - /* - * VDC_MSR: + * Generic field encoding for 64-bit (or smaller) data which are identified by a + * 32-bit (or smaller) name. * - * Use MSR identifiers directly + * Used by the following classes/version: + * - VDC_REGISTER v1: `vm_reg_name` identifiers + * - VDC_MSR v1: MSR identifiers + * - VDC_VMM_ARCH v1: Identifiers described below */ - -struct vdi_msr_entry_v1 { - uint32_t vme_msr; +struct vdi_field_entry_v1 { + uint32_t vfe_ident; uint32_t _pad; - uint64_t vme_value; + uint64_t vfe_value; +}; + +/* VDC_VERSION */ +struct vdi_version_entry_v1 { + uint16_t vve_class; + uint16_t vve_version; + uint16_t vve_len_expect; + uint16_t vve_len_per_item; }; /* @@ -98,11 +103,22 @@ struct vdi_lapic_v1 { uint32_t vl_esr_pending; }; - /* * VDC_VMM_ARCH: */ +/* + * Version 1 identifiers: + */ + +/* Offset of guest TSC from system at time of boot */ +#define VAI_TSC_BOOT_OFFSET 1 +/* Time that guest (nominally) booted, as hrtime */ +#define VAI_BOOT_HRTIME 2 +/* Guest TSC frequency measured by hrtime (not effected by wall clock adj.) */ +#define VAI_TSC_FREQ 3 + + /* VDC_IOAPIC: */ struct vdi_ioapic_v1 { diff --git a/usr/src/uts/intel/sys/vmm_dev.h b/usr/src/uts/intel/sys/vmm_dev.h index fc8ccf406e..8d1b2713dd 100644 --- a/usr/src/uts/intel/sys/vmm_dev.h +++ b/usr/src/uts/intel/sys/vmm_dev.h @@ -366,6 +366,7 @@ struct vm_data_xfer { uint16_t vdx_version; uint32_t vdx_flags; uint32_t vdx_len; + uint32_t vdx_result_len; void *vdx_data; }; @@ -384,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 2 +#define VMM_CURRENT_INTERFACE_VERSION 3 #define VMMCTL_IOC_BASE (('V' << 16) | ('M' << 8)) |