[PATCH 12/15] hyperv: move VMBus connection ids to uapi

From: Roman Kagan
Date: Tue Dec 20 2016 - 11:42:16 EST


Userspace will need them too.

Signed-off-by: Roman Kagan <rkagan@xxxxxxxxxxxxx>
---
arch/x86/include/uapi/asm/hyperv.h | 9 +++++++++
drivers/hv/hyperv_vmbus.h | 10 ----------
2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h
index e081615..5d6e525 100644
--- a/arch/x86/include/uapi/asm/hyperv.h
+++ b/arch/x86/include/uapi/asm/hyperv.h
@@ -419,4 +419,13 @@ struct hv_monitor_page {
__u8 rsvdz4[1984];
};

+/* VMBus expects pre-established communication with the following IDs */
+#define VMBUS_MESSAGE_CONNECTION_ID 1
+#define VMBUS_MESSAGE_PORT_ID 1
+#define VMBUS_EVENT_CONNECTION_ID 2
+#define VMBUS_EVENT_PORT_ID 2
+#define VMBUS_MONITOR_CONNECTION_ID 3
+#define VMBUS_MONITOR_PORT_ID 3
+#define VMBUS_MESSAGE_SINT 2
+
#endif
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 7f247f2..c0a65f7 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -114,16 +114,6 @@ enum hv_guest_os_microsoft_ids {
};


-enum {
- VMBUS_MESSAGE_CONNECTION_ID = 1,
- VMBUS_MESSAGE_PORT_ID = 1,
- VMBUS_EVENT_CONNECTION_ID = 2,
- VMBUS_EVENT_PORT_ID = 2,
- VMBUS_MONITOR_CONNECTION_ID = 3,
- VMBUS_MONITOR_PORT_ID = 3,
- VMBUS_MESSAGE_SINT = 2,
-};
-
/* #defines */

#define HV_PRESENT_BIT 0x80000000
--
2.9.3