Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965022AbcLTTOm (ORCPT ); Tue, 20 Dec 2016 14:14:42 -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 S936113AbcLTTMS (ORCPT ); Tue, 20 Dec 2016 14:12:18 -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 08/15] hyperv: dedup crash msr related definitions Date: Tue, 20 Dec 2016 18:55:55 +0300 Message-ID: <20161220155602.6298-9-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: 7ffa4ffe-b3cc-444f-2f03-08d428f0cf78 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:VI1PR0802MB2478; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2478;3:ZEd6o0z6p83gcdcZ2upoebrO87iq+/BlW5yHahYh2yzjXy4T6oZQ8GrI7mX6GZr+3P8/7sDZexrYf9xHs5eNi5sECCNAX6Eb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lzfc6UM2cCKWcrfmpQBteA9pPRGdOSsSLmdxM9cyenqFYDYKhaO7VjxkR4XNmZkzrt2eeP0QAWnkn2zgGTI5UW1mcee6lX7LKyFm8cFFSql5GXSHGyGtwEkPk6SQKNZ1YivpwNDyMjNWIqyRh5wjYtas1w6x3lbmJ8hDVNUNuPJvOIwlKmfFKclEQAeDqeyha0bYY5Xg+qb8yIew3XDivu1X9RZ/9HgjXyAPpZdbja2sQpNkQ53KLed6LYdzvTNk+7/qKhO2AZYInrBc/w1Dxo=;20:zrWIStw9X+sYK7XYuPMxNUV+CtU45/h2LkIiZBK964sdBq1/aJIUWCYjMhoxd+bVAzyphInfoevy0FYmzEi1cx9sJF0FoOROaQ2N/sh8ZUBAZ9Twgc9zyo76ETggU/qFiyxqs1GMQV8zOQKamcQz4TjaeVQ9fgMtXoebStSYXF3GiWOQ3x4frYq+JtJBVWLWd/S9jeBMW8LmxVrI0kThSBTJgwMD09NsA7zJLfQRCzyROuUvLD4GUD+ZEXosJ+j4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; 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:cX3m+/+U/tl9v2x7RqPJXWHQGmL04MeGyZK/JoG77U23GMsAQeqBPy2Z2wZcPXDr58YmxMKdWo3/eXWAu7vGAao+cJtmVdq6waeGvRnDcrZJZIRtlwVvyGeD7ZvZY3yCr1MFIylWGpFHd3JNPeUmb3WLIFNxi98x8ofvh0Yep8yAT5x4j8nd5KrbhwGqhNJBa0jCl02x/F8YD5FgW03HU1euHfU9g9fh759ISOXKMHUl2bwf21G5fgOnvx388LoOGaUX1zR1gni40upM2hQW3khPGUnspvChbof/KM9HA/5cwabNiPgncZTD6BHW9R2GMK/UyA9I9g+qi82nKG2y6dNR6UWTMvb5jRx4BbJsANZaD+YKoE80UpaShMGGchnNFgD4KIfvlz7pMY+5pfHAWC48+uzVRX5COPOym1yIeiToSnobVFEyVQvukQw9k0QUmItyIQZ75afJTw5hTHWf4LLMK7nY08BzR6unrsSeSExiboCXUk/aMRdIjifdQ81z+pNRpndgzoPbd3VWYVW8xj3Ehx3D0tZ6l2qxq1zt7r5bR99uhMTMumUlxaoHbXKGs7w+NXIryylA4g7S3cFT/G85eDU8g0fMVpxujX0MDXA= X-Forefront-PRVS: 0162ACCC24 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(39450400003)(199003)(189002)(6666003)(97736004)(189998001)(101416001)(5001770100001)(4001430100002)(5003940100001)(36756003)(81166006)(47776003)(50986999)(66066001)(1511001)(2950100002)(50466002)(76176999)(5660300001)(81156014)(2906002)(8666005)(305945005)(69596002)(48376002)(7736002)(92566002)(7416002)(106356001)(53416004)(25786008)(6116002)(105586002)(6486002)(2421001)(6506006)(1076002)(3846002)(575784001)(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:ffqo7vDwbVClWDjZ/UuGCbTQ7DHSa8GWpgLzT8N?= =?us-ascii?Q?y3CwBHaPNvF5Ga05cxTt4YxJN6oA95ufrWwdu3GLbvM8I+UL4QxAC8Zfg5Wa?= =?us-ascii?Q?r8ba6r1c2sCDcCJ34sLVgH6r9GaMiidIIdizta+5L7JIygANnezrdEFYO3Dp?= =?us-ascii?Q?og+uKsrG3LLlFtGmYPdh0g0O7f4bPV3YTZrPWy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pamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2478;7:u72udDlHWR8u7FNVqf/MTgKwB2gAVx76oMfmAe0t0zTfh7AYhR8emgqVuBCcDIS3Ax5nA7aDWBbU8HAAJC8rYnzRup31Hdj6R4hk5Bhybx5IT47p2kKc5HJZyT850b4JTQnS32AoTW/+YIsdxqFvJfw7ETGVnij910jfqhvKiKxM8OQJ3zfXv+CzAGz9DCgx+8adjMLbyXOFZ18PxqEiC3QtLRkYK/a7PPfDBRmcYqhbucJen6V+04XWcdkeKDCQxGVoYaYWcg8+NoG4RuKI+n7TqhTGvjp35pNzltZICjmuU8S1WkfiFDjFp7f55bsq6ALiYVTmI6R6n3q5iAMCtBnzmpRnlKB9wRdhM/9hRX8VZTXIz4tv1SVOew8FqsQNjlUiX99fXQ4VnQp/6dG/5p/wJo7T/yH/tJ+haSM2g1P5XSuW6fkko6DzDWwpn3UJ5jl5zcYGkVByiWr58WF5Bg==;20:Fe0eeZJQS4j/wcYav0RexZ6ifw0C1IHCEKh2kMfSIykrISYMxCDbODK7MFQ2mML73ppRgb+EUh4ZNNPMHaOuocetGjjmDLUkOPqwsipnmpPL4xKlJQlRgU2IGcgNzIDAlhaxMOa2qdLTXT3PkLNz+Lf90khdQg2YLYlxtZDQ1vc=;23:Z9Md7xtwKaIfJAxxvROFaXU1CcZWOBfc187ZhMierV92YEolq7DCFHXdyFxaD4nav4X6gwtJrf6j4H478T244oW9y85f2slWFnpJWl7Ye71ybAyOppT2hzvctHesNym0AuJ/L+PEKRCvncGb+Mv/wQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2016 15:56:49.3936 (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: 2267 Lines: 64 Use the definitions already present in the uapi header throughout the guest driver, too. Signed-off-by: Roman Kagan --- drivers/hv/hyperv_vmbus.h | 11 ----------- drivers/hv/vmbus_drv.c | 6 +++--- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 9b0f1c9..7bf1b10 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -39,17 +39,6 @@ */ #define HV_UTIL_NEGO_TIMEOUT 55 -#define HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE 0x400 - -#define HV_X64_MSR_CRASH_P0 0x40000100 -#define HV_X64_MSR_CRASH_P1 0x40000101 -#define HV_X64_MSR_CRASH_P2 0x40000102 -#define HV_X64_MSR_CRASH_P3 0x40000103 -#define HV_X64_MSR_CRASH_P4 0x40000104 -#define HV_X64_MSR_CRASH_CTL 0x40000105 - -#define HV_CRASH_CTL_CRASH_NOTIFY (1ULL << 63) - /* Define version of the synthetic interrupt controller. */ #define HV_SYNIC_VERSION (1) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 13dd210..7564a7b 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -77,7 +77,7 @@ static void hyperv_report_panic(struct pt_regs *regs) /* * Let Hyper-V know there is crash data available */ - wrmsrl(HV_X64_MSR_CRASH_CTL, HV_CRASH_CTL_CRASH_NOTIFY); + wrmsrl(HV_X64_MSR_CRASH_CTL, HV_X64_MSR_CRASH_CTL_NOTIFY); } static int hyperv_panic_event(struct notifier_block *nb, unsigned long val, @@ -993,7 +993,7 @@ static int vmbus_bus_init(void) /* * Only register if the crash MSRs are available */ - if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { + if (ms_hyperv.misc_features & HV_X64_GUEST_CRASH_MSR_AVAILABLE) { register_die_notifier(&hyperv_die_block); atomic_notifier_chain_register(&panic_notifier_list, &hyperv_panic_block); @@ -1535,7 +1535,7 @@ static void __exit vmbus_exit(void) for_each_online_cpu(cpu) tasklet_kill(hv_context.msg_dpc[cpu]); vmbus_free_channels(); - if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { + if (ms_hyperv.misc_features & HV_X64_GUEST_CRASH_MSR_AVAILABLE) { unregister_die_notifier(&hyperv_die_block); atomic_notifier_chain_unregister(&panic_notifier_list, &hyperv_panic_block); -- 2.9.3