[PATCH 11/15] hyperv: uapi-fy monitored notification structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move structures for monitored notifications to the uapi header for
userspace to be able to consume.  Also observe that hv_monitor_parameter
is by definition the same as hv_input_signal_event so use the latter and
nuke the former.

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

diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h
index eb8d42a..e081615 100644
--- a/arch/x86/include/uapi/asm/hyperv.h
+++ b/arch/x86/include/uapi/asm/hyperv.h
@@ -396,4 +396,27 @@ struct hv_input_signal_event {
 	__u16 rsvdz;
 } __attribute__((aligned(HV_HYPERCALL_PARAM_ALIGN)));
 
+/* Definitions for the monitored notification facility */
+struct hv_monitor_trigger_group {
+	__u32 pending;
+	__u32 armed;
+};
+
+struct hv_monitor_page {
+	__u32 trigger_state;
+	__u32 rsvdz1;
+
+	struct hv_monitor_trigger_group trigger_group[4];
+	__u64 rsvdz2[3];
+
+	__s32 next_checktime[4][32];
+
+	__u16 latency[4][32];
+	__u64 rsvdz3[32];
+
+	struct hv_input_signal_event parameter[4][32];
+
+	__u8 rsvdz4[1984];
+};
+
 #endif
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index a96f021..7f247f2 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -94,66 +94,6 @@ struct hv_connection_info {
 	};
 };
 
-/* Definitions for the monitored notification facility */
-union hv_monitor_trigger_group {
-	u64 as_uint64;
-	struct {
-		u32 pending;
-		u32 armed;
-	};
-};
-
-struct hv_monitor_parameter {
-	u32 connectionid;
-	u16 flagnumber;
-	u16 rsvdz;
-};
-
-union hv_monitor_trigger_state {
-	u32 asu32;
-
-	struct {
-		u32 group_enable:4;
-		u32 rsvdz:28;
-	};
-};
-
-/* struct hv_monitor_page Layout */
-/* ------------------------------------------------------ */
-/* | 0   | TriggerState (4 bytes) | Rsvd1 (4 bytes)     | */
-/* | 8   | TriggerGroup[0]                              | */
-/* | 10  | TriggerGroup[1]                              | */
-/* | 18  | TriggerGroup[2]                              | */
-/* | 20  | TriggerGroup[3]                              | */
-/* | 28  | Rsvd2[0]                                     | */
-/* | 30  | Rsvd2[1]                                     | */
-/* | 38  | Rsvd2[2]                                     | */
-/* | 40  | NextCheckTime[0][0]    | NextCheckTime[0][1] | */
-/* | ...                                                | */
-/* | 240 | Latency[0][0..3]                             | */
-/* | 340 | Rsvz3[0]                                     | */
-/* | 440 | Parameter[0][0]                              | */
-/* | 448 | Parameter[0][1]                              | */
-/* | ...                                                | */
-/* | 840 | Rsvd4[0]                                     | */
-/* ------------------------------------------------------ */
-struct hv_monitor_page {
-	union hv_monitor_trigger_state trigger_state;
-	u32 rsvdz1;
-
-	union hv_monitor_trigger_group trigger_group[4];
-	u64 rsvdz2[3];
-
-	s32 next_checktime[4][32];
-
-	u16 latency[4][32];
-	u64 rsvdz3[32];
-
-	struct hv_monitor_parameter parameter[4][32];
-
-	u8 rsvdz4[1984];
-};
-
 /*
  * Versioning definitions used for guests reporting themselves to the
  * hypervisor, and visa versa.
-- 
2.9.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux