summaryrefslogtreecommitdiffstats
path: root/sys/dev/hyperv/vmbus/hyperv_reg.h
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-06-23 08:09:44 +0000
committersephe <sephe@FreeBSD.org>2016-06-23 08:09:44 +0000
commit1f4fcbc0a6d459f94e02c6585a0e29fec02290bc (patch)
treea86b3aac9885edcb9d3984aa8ff05f6d020671b2 /sys/dev/hyperv/vmbus/hyperv_reg.h
parent58bbaee99bdca7ac8f1a11d585ece10c2c57cca9 (diff)
downloadFreeBSD-src-1f4fcbc0a6d459f94e02c6585a0e29fec02290bc.zip
FreeBSD-src-1f4fcbc0a6d459f94e02c6585a0e29fec02290bc.tar.gz
MFC 300654,300655,300708
300654 hyperv/vmbus: Rework SynIC setup and teardown - Avoid bit fields. - Fix SINT setup (preserve required bits). MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6529 300655 hyperv: Preserve required bits when disable Hypercall MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6530 300708 hyperv: Rework guest id settings according to Hyper-V spec MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6553
Diffstat (limited to 'sys/dev/hyperv/vmbus/hyperv_reg.h')
-rw-r--r--sys/dev/hyperv/vmbus/hyperv_reg.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/sys/dev/hyperv/vmbus/hyperv_reg.h b/sys/dev/hyperv/vmbus/hyperv_reg.h
index 7d1d509..83d2cf2 100644
--- a/sys/dev/hyperv/vmbus/hyperv_reg.h
+++ b/sys/dev/hyperv/vmbus/hyperv_reg.h
@@ -29,9 +29,48 @@
#ifndef _HYPERV_REG_H_
#define _HYPERV_REG_H_
+#define MSR_HV_GUEST_OS_ID 0x40000000
+#define MSR_HV_GUESTID_BUILD_MASK 0xffffULL
+#define MSR_HV_GUESTID_VERSION_MASK 0x0000ffffffff0000ULL
+#define MSR_HV_GUESTID_VERSION_SHIFT 16
+#define MSR_HV_GUESTID_OSID_MASK 0x00ff000000000000ULL
+#define MSR_HV_GUESTID_OSID_SHIFT 48
+#define MSR_HV_GUESTID_OSTYPE_MASK 0x7f00000000000000ULL
+#define MSR_HV_GUESTID_OSTYPE_SHIFT 56
+#define MSR_HV_GUESTID_OPENSRC 0x8000000000000000ULL
+#define MSR_HV_GUESTID_OSTYPE_LINUX \
+ ((0x01ULL << MSR_HV_GUESTID_OSTYPE_SHIFT) | MSR_HV_GUESTID_OPENSRC)
+#define MSR_HV_GUESTID_OSTYPE_FREEBSD \
+ ((0x02ULL << MSR_HV_GUESTID_OSTYPE_SHIFT) | MSR_HV_GUESTID_OPENSRC)
+
#define MSR_HV_HYPERCALL 0x40000001
#define MSR_HV_HYPERCALL_ENABLE 0x0001ULL
#define MSR_HV_HYPERCALL_RSVD_MASK 0x0ffeULL
#define MSR_HV_HYPERCALL_PGSHIFT 12
+#define MSR_HV_VP_INDEX 0x40000002
+
+#define MSR_HV_SCONTROL 0x40000080
+#define MSR_HV_SCTRL_ENABLE 0x0001ULL
+#define MSR_HV_SCTRL_RSVD_MASK 0xfffffffffffffffeULL
+
+#define MSR_HV_SIEFP 0x40000082
+#define MSR_HV_SIEFP_ENABLE 0x0001ULL
+#define MSR_HV_SIEFP_RSVD_MASK 0x0ffeULL
+#define MSR_HV_SIEFP_PGSHIFT 12
+
+#define MSR_HV_SIMP 0x40000083
+#define MSR_HV_SIMP_ENABLE 0x0001ULL
+#define MSR_HV_SIMP_RSVD_MASK 0x0ffeULL
+#define MSR_HV_SIMP_PGSHIFT 12
+
+#define MSR_HV_SINT0 0x40000090
+#define MSR_HV_SINT_VECTOR_MASK 0x00ffULL
+#define MSR_HV_SINT_RSVD1_MASK 0xff00ULL
+#define MSR_HV_SINT_MASKED 0x00010000ULL
+#define MSR_HV_SINT_AUTOEOI 0x00020000ULL
+#define MSR_HV_SINT_RSVD2_MASK 0xfffffffffffc0000ULL
+#define MSR_HV_SINT_RSVD_MASK (MSR_HV_SINT_RSVD1_MASK | \
+ MSR_HV_SINT_RSVD2_MASK)
+
#endif /* !_HYPERV_REG_H_ */
OpenPOWER on IntegriCloud