Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756597AbdIHRP2 (ORCPT ); Fri, 8 Sep 2017 13:15:28 -0400 Received: from mail-bn3nam01on0094.outbound.protection.outlook.com ([104.47.33.94]:59754 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756436AbdIHRP1 (ORCPT ); Fri, 8 Sep 2017 13:15:27 -0400 From: KY Srinivasan To: Thomas Gleixner , Stephen Hemminger CC: LKML , Stephen Hemminger , Simon Xiao , Haiyang Zhang , Steven Rostedt , "Peter Zijlstra" , Linus Torvalds , Josh Poimboeuf , "H. Peter Anvin" , Denys Vlasenko , "Brian Gerst" , Borislav Petkov , Andy Lutomirski Subject: RE: [PATCH] x86/idt: Unbreak MS HyperV hypercall vector install Thread-Topic: [PATCH] x86/idt: Unbreak MS HyperV hypercall vector install Thread-Index: AQHTKHtFXfDH8db8l0e0OykNUQ4OdaKrNiEAgAADUQCAAABAkA== Date: Fri, 8 Sep 2017 17:15:22 +0000 Message-ID: References: <20170908095726.35b82463@xeon-e3> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=kys@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-09-08T10:15:19.8170479-07:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [2001:4898:80e8:4::344] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR21MB0763;6:aPQj57svHWlIC6HGuvaNL3QJM7+0x2Ok650WNzAh8VN6n8B9RXwbE6fXJlWtbgowvIAcnKpbNWUzlbbBTDdufZHmIHVHgs8kZ44S9FQdMDcnFR97/umLMHITHaRoLLKVgOy3qvr5M1y3osEf8eeyW6Uk6Z/BHS9pB8OO9vavhR0evsAdZovfHZSpxEm4sevQgIxauyNNiP1IYdwHKtlzoNR/2utg+V6nl9bt93Da9VsUfU/kR46VRpzFBfJDKYfxphZf85jytlUsegkk+96omVrdkBmIhtY7vwpuwbk5I7HeD1vLR8bB9Yd05rAB8Ply69O1mUVmysEbPo4s1JBp+A==;5:cZAomzGLgtFInqB+P51StY0Ib01OArHbwMW9xdIngKwAZxTGO/pzuvMRxP8Wc+Sw8t1bPSSCd+ZzV4ocir4kB9zMpFJANFXI5a4HrkIVG61OZ1GBkiGOF3uhuNVB8g3XFiK/5XOV0Bjs9PNYzMYmJhSxuH/zZRQnW0Slh8POjbw=;24:e8ZIFx+qHoytVDY++NFFteeADgTXyD/xSntIAuW5YCgVyZxFDgqcyTOC7/uPatlI3F2HA4OojExWJ94EhfRaWeDGHhYYZCydHwJun8SnfRM=;7:EQgo938MDjUbMJQZEWiUDJA5WhCuSRA9u08iqPuVecqwCVvUAgAY6IGVm1UZzRUDyKUUYa1s8Q7hTg1geCRcyzOQ1vZhZ4m8+eFY07ONK0ZMeN+SRjCg7YxNlMk91TL6kFgTTv6hieGnCRg4V1B7TJLLjkDxVtbIvai2RlPoPzZF8v+l5XW4pfxqei6BtpddYf65AQ+gs6HMN91lfPbpwGa1paG7CDnfDQFBI7QJ7xY= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(377454003)(13464003)(24454002)(189002)(199003)(6116002)(102836003)(54906002)(86612001)(10090500001)(99286003)(9686003)(55016002)(10290500003)(97736004)(22452003)(3280700002)(3660700001)(2906002)(229853002)(74316002)(7696004)(7416002)(2950100002)(39060400002)(4326008)(5660300001)(86362001)(189998001)(53936002)(105586002)(106356001)(6246003)(33656002)(76176999)(54356999)(101416001)(6436002)(6506006)(25786009)(478600001)(7736002)(14454004)(77096006)(305945005)(8990500004)(50986999)(2900100001)(8936002)(81156014)(68736007)(53546010)(81166006)(8676002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR21MB0763;H:DM5PR21MB0476.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 6fad6bb6-0c5b-40da-cf77-08d4f6dd305e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM5PR21MB0763; x-ms-traffictypediagnostic: DM5PR21MB0763: authentication-results: spf=none (sender IP is ) smtp.mailfrom=kys@microsoft.com; x-exchange-antispam-report-test: UriScan:(89211679590171)(9452136761055); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(61426038)(61427038)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM5PR21MB0763;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM5PR21MB0763; x-forefront-prvs: 04244E0DC5 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2017 17:15:22.5182 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR21MB0763 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v88HFY9m026582 Content-Length: 2095 Lines: 56 > -----Original Message----- > From: Thomas Gleixner [mailto:tglx@linutronix.de] > Sent: Friday, September 8, 2017 10:09 AM > To: Stephen Hemminger > Cc: LKML ; Stephen Hemminger > ; Simon Xiao ; KY > Srinivasan ; Haiyang Zhang > ; Steven Rostedt ; Peter > Zijlstra ; Linus Torvalds foundation.org>; Josh Poimboeuf ; H. Peter Anvin > ; Denys Vlasenko ; Brian Gerst > ; Borislav Petkov ; Andy Lutomirski > > Subject: Re: [PATCH] x86/idt: Unbreak MS HyperV hypercall vector install > > On Fri, 8 Sep 2017, Stephen Hemminger wrote: > > On Fri, 8 Sep 2017 01:19:52 -0700 > > "Thomas Gleixner" wrote: > > > > > The rework of the IDT setup changed the way how unused system gates > are > > > accounted. At the end of the gate initialization all unused gates in the > > > system vector area are set to the spurios handler and marked as used for > > > consistency reasons. > > > > > > Marking them as used breaks MS HyperV because it installs its hypercall > > > vector after that point and the installation is guarded by the bit in the > > > used_vectors map. So the hyperv vector stays directed to the spurious > > > interrupt handler. > > > > > > Leave them marked as unused again and unbreak HyperV that way. > > > > > > Fixes: dc20b2d52653 ("x86/idt: Move interrupt gate initialization to IDT > > > code") > > > Reported-by: Stephen Hemminger > > > Signed-off-by: Thomas Gleixner > > > > This fixes it, thanks. > > > > Tested-by: Stephen Hemminger > > What's the reason that the vector is not set up early in the boot process? No specific reason other than that was the way I had coded it up initially. I will send in a patch to fix that. Regards, K. Y > > Thanks, > > tglx >