lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Dec 2016 18:55:58 +0300
From:   Roman Kagan <rkagan@...tuozzo.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>
CC:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, <x86@...nel.org>,
        Haiyang Zhang <haiyangz@...rosoft.com>, <kvm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <devel@...uxdriverproject.org>,
        "Denis V . Lunev" <den@...nvz.org>,
        Roman Kagan <rkagan@...tuozzo.com>
Subject: [PATCH 11/15] hyperv: uapi-fy monitored notification structures

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@...tuozzo.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ