Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938664AbcLTTMp (ORCPT ); Tue, 20 Dec 2016 14:12:45 -0500 Received: from mail-eopbgr10104.outbound.protection.outlook.com ([40.107.1.104]:14991 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S938634AbcLTTMi (ORCPT ); Tue, 20 Dec 2016 14:12:38 -0500 X-Greylist: delayed 11715 seconds by postgrey-1.27 at vger.kernel.org; Tue, 20 Dec 2016 14:12:14 EST Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; From: Roman Kagan To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , "K. Y. Srinivasan" , Vitaly Kuznetsov CC: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , , Haiyang Zhang , , , , "Denis V . Lunev" , Roman Kagan Subject: [PATCH 11/15] hyperv: uapi-fy monitored notification structures Date: Tue, 20 Dec 2016 18:55:58 +0300 Message-ID: <20161220155602.6298-12-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161220155602.6298-1-rkagan@virtuozzo.com> References: <20161220155602.6298-1-rkagan@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: AM4PR01CA0030.eurprd01.prod.exchangelabs.com (10.164.74.168) To VI1PR0802MB2478.eurprd08.prod.outlook.com (10.175.26.21) X-MS-Office365-Filtering-Correlation-Id: b598e68a-b898-4d1f-4791-08d428f0d20f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:VI1PR0802MB2478; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2478;3:WXQ79gbbu3jFbKGhfDJbnHOoW2BHZKBubm5wSYLzXnGoBwBWA8Qga+pp2XOR95sm3T7okqTROJPOHm06TA8i3dnTqktDVMHU49G1OEd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8BRRklnnEMK/U663p5xQj7gU3Xs83+JdIhY+g53pV228DDt6EkXObPLX31WFyoC6T+9UFKa25aivGldAV3iVxazfyCRaSAhsggCnIzZn14e5K9rd7fX3U22C4QblsKl X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(190756311086443)(211171220733660); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123558021)(20161123562025)(6072148);SRVR:VI1PR0802MB2478;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0802MB2478; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2478;4:EsX/1c3ckCM3EkXA8+cIwheI3V1KrGB9f6N1CzoktslxvxKM0Vp0TsX1FpZh1kBXyOLzF4TQsKjPl05E69It104Es6MLYOVaLJWVxYzJSMyqvf6UWjNWKXDcCFCFDFh4SbtQTlt3VJOOBm2PvpWdJ3Mn66SSYB7NOpe9ZkFXNETEf8SVNK3iepDS+XfjyMsX/ZyjVAEhYyDKNJhWbmpofqblqUA+Hs66ADqchQ3qldEoelKzBiBflOtXH3ymbbqjLZCmSla43PTsaiJ20I3whLNzv2oT+6Keoi/jm/VbHFFj6F7MH6vK0DClMfddxtcunLRuDMsIewuR0BH0DmKqeHgpjFPUBC83Lf2n3yYu63GCV5KTz+SkZeUotk04zosUJht2bY1e9e9EdNeBy8RO/5bM79IBRXc3B6sNYTjSAdeVsKi8S3x4b+rIWXISdMj6Vb/KsZNEek7v+S+KfNYxk9pgfT2yZBXiH22Z5yCJDvTOfP7NcKEFQuw20FiuyCicGMojKz0E84Mwl8lV8WvfAbP0mGh4y9S6/Z2sMPQcPqIo/EG8boaSFA/e1Z6W6q8I5S8y9HdudhrLyK+YtsqXu3vQsO0OXgriFJvHQvBj98XrAlzy8bmmM2RCIl4oJTTvujhNwl2tgCn/KzPqTaFwGLaza/MXTQGXE3zGc8t1lRFKf0tjGxZD+Qgl6/lCX2RS X-Forefront-PRVS: 0162ACCC24 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(39450400003)(199003)(189002)(97736004)(189998001)(101416001)(5001770100001)(4001430100002)(5003940100001)(36756003)(81166006)(47776003)(50986999)(66066001)(1511001)(2950100002)(50466002)(76176999)(5660300001)(81156014)(2906002)(8666005)(15650500001)(305945005)(69596002)(48376002)(7736002)(92566002)(7416002)(106356001)(53416004)(25786008)(6116002)(105586002)(6486002)(2421001)(6506006)(1076002)(3846002)(86362001)(4326007)(68736007)(8676002)(50226002)(42186005)(107886002)(2561002)(38730400001)(6512006)(33646002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0802MB2478;H:rkaganb.sw.ru;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR0802MB2478;23:AyHVwMVnsCisRsuP8ynhtv8hp6oG8So9/F+QCSV?= =?us-ascii?Q?0T3P0UnQbGxg+fu/sPI1kQXEEG6sOiByrRgt7FQN1YPybiJj5JI3TBGDE0/z?= =?us-ascii?Q?ByxPTWAcS0eD/krQnUINggetf49RIEl3uIpmEt2Z5+DWxLRK/aKEOz3pvO77?= =?us-ascii?Q?zWdIkqL0h80ZMOxWsM0fEYRyNJMYv7jWcmydkhaK5di4dnzkRtmmNG+1Np5B?= =?us-ascii?Q?p3ee/jaOFvt2TYPL1SwR3BswNZ+XvkCYafvx/iXvtQymrmLhIjXDDT+i8nRn?= =?us-ascii?Q?FAkI3mMpTak0Wc2JtTtlWFLM6qk+EfE9ZkIlEfF840tpw6/qYL6J+hEcS5n/?= =?us-ascii?Q?aV4bBPBGJN4r0aOPkxiDpym7Qzm+tJC9O7wCytmjuzp/kFBpFErc5TAihRQ8?= =?us-ascii?Q?SDEzfVK6ST5jYQ1K9L0ylPB2dcKYadZoXFrR3NbaghpIwYbCI93NjaFkDidr?=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O/arXasbzp1a/Nld79W2sXBEOjuDJn8nGrgRYGGRyQ251y+sgbHYdmvZuarcxsykqo3wgWC9bntnnailHYO+W8tDvP2HIAHvmazCQtGsUPM13+ZpfhS/o+Q9hiXOYul9NkcGyoUR3Kz0zjTmi/HLgvD8ksyPO1GUzxcO/UMqvFdl+I6T5DhAPptvRJfUVjHkrKHGbGmDSlRi351FeTAng==;20:oMpny0rrksc/OZ6Xr7AEp+phK1Dwjcq/Rlo+EffIS7lhdD9l+gSEqH4fz1Xjr6h/SLnDBtLlMwnpfS+3pdMBJ/Xon2HEmLnleWlrLuwyIVi3iU2SnvPmQLpcMI4aZYLhnGzkKRnzqFPdfpHypa9A6woTxLU09EQmimbS0jV2M3o=;23:7SOq46Vn0XK8i36TGr/qk73wZHw7jOgmhJ2DjhaKIF2aFgA2X1lI4qUoO7t8F7HOPz3U8WLHml21+fR+HxBL4cbNhTRV8SgwFzL6rj1bTevOKnRvkj0eEGsB7J44ubGhnpKUIplVlLSiOvmUiuhnKQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2016 15:56:53.7332 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2478 X-OriginatorOrg: virtuozzo.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3391 Lines: 116 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 --- 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