From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46E40C433DF for ; Thu, 20 Aug 2020 19:58:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 210DA2076E for ; Thu, 20 Aug 2020 19:58:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725852AbgHTT6M (ORCPT ); Thu, 20 Aug 2020 15:58:12 -0400 Received: from mga04.intel.com ([192.55.52.120]:59267 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbgHTT6M (ORCPT ); Thu, 20 Aug 2020 15:58:12 -0400 IronPort-SDR: FsrGtP93efUMa9jhdiFWhFrUVwLTzFpCy7rFlGZ5Y6p2ECj/P6uSoLGFSnHZX0llEalwooJGbk pDiMjTC8Sn5A== X-IronPort-AV: E=McAfee;i="6000,8403,9718"; a="152810177" X-IronPort-AV: E=Sophos;i="5.76,334,1592895600"; d="scan'208";a="152810177" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2020 12:58:12 -0700 IronPort-SDR: 7ff5AW1OqJFyIq9w0Y0w/6okfpx2Z6o8s+b+Kgv9kt9JBCuS0bhUtg2F5m17yH+1gocNNLuzQ4 me8rXcGpPHGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,334,1592895600"; d="scan'208";a="497741219" Received: from otc-nc-03.jf.intel.com (HELO otc-nc-03) ([10.54.39.36]) by fmsmga006.fm.intel.com with ESMTP; 20 Aug 2020 12:58:11 -0700 Date: Thu, 20 Aug 2020 12:58:11 -0700 From: "Raj, Ashok" To: Evan Green Cc: LKML , Thomas Gleixner , Sukumar Ghorai , Srikanth Nandamuri , Mathias Nyman , Bjorn Helgaas , stable@vger.kernel.org, Ashok Raj Subject: Re: [PATCH] x86/hotplug: Silence APIC only after all irq's are migrated Message-ID: <20200820195811.GA22799@otc-nc-03> References: <20200814213842.31151-1-ashok.raj@intel.com> <20200817183322.GA11486@araj-mobl1.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Aug 20, 2020 at 11:21:24AM -0700, Evan Green wrote: > > > > > > I'm slightly unclear about whether interrupts are disabled at the core > > > by this point or not. I followed native_cpu_disable() up to > > > __cpu_disable(), up to take_cpu_down(). This is passed into a call to > > > stop_machine_cpuslocked(), where interrupts get disabled at the core. > > > So unless there's another path, it seems like interrupts are always > > > disabled at the core by this point. > > > > local_irq_disable() just does cli() which allows interrupts to trickle > > in to the IRR bits, and once you do sti() things would flow back for > > normal interrupt processing. > > > > > > > > > > If interrupts are always disabled, then the comment above is a little > > > > Disable interrupts is different from disabling LAPIC. Once you do the > > apic_soft_disable(), there is nothing flowing into the LAPIC except > > for INIT, NMI, SMI and SIPI messages. > > > > This turns off the pipe for all other interrupts to enter LAPIC. Which > > is different from doing a cli(). > > I understand the distinction. I was mostly musing on the difference in > behavior your change causes if this function is entered with > interrupts enabled at the core (ie sti()). But I think it never is, so > that thought is moot. > > I could never repro the issue reliably on comet lake after Thomas' > original fix. But I can still repro it easily on jasper lake. And this > patch fixes the issue for me on that platform. Thanks for the fix. > > Reviewed-by: Evan Green > Tested-by: Evan Green Thanks Evan for testing. I'll wait for thomas if he finds anything else that needs to be fixed and send a final v2 after fixing the typos and others identified by Randy. Cheers, Ashok