summaryrefslogtreecommitdiffstats
path: root/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/hyperv/vmbus/hv_vmbus_priv.h')
-rw-r--r--sys/dev/hyperv/vmbus/hv_vmbus_priv.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/sys/dev/hyperv/vmbus/hv_vmbus_priv.h b/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
index 1a0ed04..8410494 100644
--- a/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
+++ b/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
@@ -208,10 +208,10 @@ typedef struct {
struct taskqueue *hv_msg_tq[MAXCPU];
struct task hv_msg_task[MAXCPU];
/*
- * Host use this vector to intrrupt guest for vmbus channel
+ * Host use this vector to interrupt guest for vmbus channel
* event and msg.
*/
- unsigned int hv_cb_vector;
+ int hv_cb_vector;
} hv_vmbus_context;
/*
@@ -471,10 +471,28 @@ typedef enum {
HV_CPU_ID_FUNCTION_MS_HV_VERSION = 0x40000002,
HV_CPU_ID_FUNCTION_MS_HV_FEATURES = 0x40000003,
HV_CPU_ID_FUNCTION_MS_HV_ENLIGHTENMENT_INFORMATION = 0x40000004,
- HV_CPU_ID_FUNCTION_MS_HV_IMPLEMENTATION_LIMITS = 0x40000005
-
+ HV_CPU_ID_FUNCTION_MS_HV_IMPLEMENTATION_LIMITS = 0x40000005,
+ HV_CPU_ID_FUNCTION_MS_HV_HARDWARE_FEATURE = 0x40000006
} hv_vmbus_cpuid_function;
+#define HV_FEATURE_MSR_TIME_REFCNT 0x0002 /* MSR_TIME_REF_COUNT */
+#define HV_FEATURE_MSR_SYNIC 0x0004 /* MSRs for SynIC */
+#define HV_FEATURE_MSR_SYNTIMER 0x0008 /* MSRs for SynTimer */
+#define HV_FEATURE_MSR_APIC 0x0010 /* MSR_{EOI,ICR,TPR} */
+#define HV_FEATURE_MSR_HYPERCALL 0x0020 /* MSR_{GUEST_OS_ID,HYPERCALL} */
+#define HV_FEATURE_MSR_GUEST_IDLE 0x0400 /* MSR_GUEST_IDLE */
+
+#define HV_PM_FEATURE_CSTATE_MASK 0x000f
+#define HV_PM_FEATURE_C3_HPET 0x0010 /* C3 requires HPET */
+#define HV_PM_FEATURE_CSTATE(f) ((f) & HV_PM_FEATURE_CSTATE_MASK)
+
+#define HV_FEATURE3_MWAIT 0x0001 /* MWAIT */
+#define HV_FEATURE3_XMM_HYPERCALL 0x0010 /* hypercall input through XMM regs */
+#define HV_FEATURE3_GUEST_IDLE 0x0020 /* guest idle support */
+#define HV_FEATURE3_NUMA 0x0080 /* NUMA distance query support */
+#define HV_FEATURE3_TIME_FREQ 0x0100 /* timer frequency query (TSC, LAPIC) */
+#define HV_FEATURE3_MSR_CRASH 0x0400 /* MSRs for guest crash */
+
/*
* Define the format of the SIMP register
*/
@@ -628,6 +646,9 @@ typedef enum {
extern hv_vmbus_context hv_vmbus_g_context;
extern hv_vmbus_connection hv_vmbus_g_connection;
+extern u_int hyperv_features;
+extern u_int hyperv_recommends;
+
typedef void (*vmbus_msg_handler)(hv_vmbus_channel_msg_header *msg);
typedef struct hv_vmbus_channel_msg_table_entry {
@@ -704,7 +725,6 @@ uint16_t hv_vmbus_post_msg_via_msg_ipc(
uint16_t hv_vmbus_signal_event(void *con_id);
void hv_vmbus_synic_init(void *irq_arg);
void hv_vmbus_synic_cleanup(void *arg);
-int hv_vmbus_query_hypervisor_presence(void);
struct hv_device* hv_vmbus_child_device_create(
hv_guid device_type,
OpenPOWER on IntegriCloud