Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6347736rdb; Thu, 14 Dec 2023 16:09:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwe364co3b7uoSuPWz5nZPAs2s9WoiLdYU7kfdqb9FKu6UQr78P9I5whq4w3nuD4fzDXgu X-Received: by 2002:a05:6e02:1785:b0:35f:6607:28b0 with SMTP id y5-20020a056e02178500b0035f660728b0mr6873846ilu.17.1702598949248; Thu, 14 Dec 2023 16:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702598949; cv=none; d=google.com; s=arc-20160816; b=a3/nePTcKb8JlqrBwLAGvz7BFZLgDkJcYhK9UBsUfh/NcfETtgAFqpXknJcFjyFQsq lOCMHSAWToJwamVuaru5vXB+je9tE0UhDZArnl+Uwo28wlve0zMfM2IjfVIukphCYHNq Pu/ffGh1jXADqI7aUfJ1G3VtV5aPInLCV/3jlKx8dSvEZDHmvbZphPC830iZHGgEAWjd SgmBn40rT1xK1d9jvIijXEy/zF+l0pYQaYMbOwqG3spmyOoNqfWyAS6my0qdikWT5Qf3 GjaDadunIhFhPQmxFix4k8ez5KewI53QZTlTZgTrL9CHjXnuJJCW0r77eT5oC6BkJTfW cTPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CRyA3kt/MINT0pQrhYvKMWzWXjiH97CfyNBCklL4uuM=; fh=Fk+ZeaeYIMablUNw/IJq1x//kY2J//ljMarpGYAeIRM=; b=IOaAh0kfS5Eb0AbIgBLu85l8Ncudi1YVEYeymk2MHqNESEZrlBc5pS/k+lk4IN1p7r Gsfky894lf6IXops4pKO8WAuK8D/sKmd6pz6tlN2gg1XjgNU/ToJ5zbRqMeVpF2vpcro x8COUeNRhoL+Hd9YreOoz/KDG5MqpNfe1zEss3sLIjF7p+fXUpvwGjG2KbjsDWcMWNJF W8E5SOyZFpPg55qqTTsbNxGWwcoca8QTwb5ibiIyRaZg2w8EGh44qX63qkkoV4DXFltw IegvCxLOhj4HLs5fHHv7nl3G2ExDpLcxL35zRkw3qa7qGsg8aazyZohCxLkcJuYp19SV srlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=dFbgypeJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id u2-20020a63df02000000b005c661efffcbsi11806419pgg.78.2023.12.14.16.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 16:09:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=dFbgypeJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id AED09836B4F3; Thu, 14 Dec 2023 08:59:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229543AbjLNQ67 (ORCPT + 99 others); Thu, 14 Dec 2023 11:58:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjLNQ66 (ORCPT ); Thu, 14 Dec 2023 11:58:58 -0500 Received: from mail.alien8.de (mail.alien8.de [IPv6:2a01:4f9:3051:3f93::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BEFAB7; Thu, 14 Dec 2023 08:59:04 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 4511140E014B; Thu, 14 Dec 2023 16:59:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XaqjZfZWziAL; Thu, 14 Dec 2023 16:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1702573139; bh=CRyA3kt/MINT0pQrhYvKMWzWXjiH97CfyNBCklL4uuM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dFbgypeJeubtWY1fTt8gDNOF+r3uoa1KG/GZnxSe3a9Y723iEJogp94cSIrFGVeD8 Dggv0EUFpL/UkFDpT/t0sZrPS5Er00xWFGqnUZw67xh/dZHJv21s9L76po+FumIudf I3/IApGn/+07anBqY09HVxLdyMltDh+uWjUgC5m4dfuTHo7mC3sfAI1x7+psYXPbns K4HkXy3VeEPDq8PJrYwgKPBqaHDkePt9Yyf5aOOmnLqWzKRjYRaICVrGBmh0NK2eHP dnlbBBLNtTuYpK+YId+8AQPDWNEVEN0s+/f1+oNYIyWSbureRQ1sJGftxduSII1efr Slfk8Caw1/zwVr6BmpNcqm02/ZMg4+bBjKogxWqZSQlMS0f8zpv3qeqdoJjkWh4H8f kt+vJNd7uDCLigefgz8X1rvP/yvL8VcQWAxPgGHMssgey0JsII7/YmX6fN41ruairK futeoT+wWP7/ArNa3FizB5gl2Nx9EeE7qgDeQ73xMCMtzJrMFFJ2cvkVvdbH51CLLO 1FVVp/RKuqCjXT3NxoUJ4F5fvNJZhBeeMF+pFht9stUkSlwrM3ay3b0V1pIsMQK+XE 5+RWvVRT9IdfSmMVuND1Erged0kJF/RN+GXcWkmXNNUgaMvI1MiX1/5G/5gxsJZwuZ g/S60tySQoi0NVWfBam5h82o= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id A6E9440E00CB; Thu, 14 Dec 2023 16:58:51 +0000 (UTC) Date: Thu, 14 Dec 2023 17:58:46 +0100 From: Borislav Petkov To: Tony Luck Cc: Yazen Ghannam , Smita.KoralahalliChannabasappa@amd.com, dave.hansen@linux.intel.com, x86@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v9 2/3] x86/mce: Add per-bank CMCI storm mitigation Message-ID: <20231214165846.GOZXs0RqkbpovdQWKH@fat_crate.local> References: <20231004183623.17067-1-tony.luck@intel.com> <20231004183623.17067-3-tony.luck@intel.com> <20231019151211.GHZTFHS3osBIL1IJbF@fat_crate.local> <20231114192324.GAZVPJLGZmfJBS181/@fat_crate.local> <20231121115448.GCZVyaiNkNvb4t2NxB@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 14 Dec 2023 08:59:12 -0800 (PST) On Mon, Nov 27, 2023 at 04:42:02PM -0800, Tony Luck wrote: > On Mon, Nov 27, 2023 at 12:14:28PM -0800, Tony Luck wrote: > > On Mon, Nov 27, 2023 at 11:50:26AM -0800, Tony Luck wrote: > > > On Tue, Nov 21, 2023 at 12:54:48PM +0100, Borislav Petkov wrote: > > > > On Tue, Nov 14, 2023 at 02:04:46PM -0800, Tony Luck wrote: > > > But it isn't doing the same thing. The timer calls: > > > > > > machine_check_poll(0, this_cpu_ptr(&mce_poll_banks)); > > > > > > and cmci_mc_poll_banks() calls: > > > > > > machine_check_poll(0, this_cpu_ptr(&mce_poll_banks)); > > machine_check_poll(0, this_cpu_ptr(&mce_banks_owned)); Hmm, so I applied your v10 and this call with mce_banks_owned is done in cmci_recheck() only. Which is on some init path. The thresholding interrupt calls it too. The timer ends up calling mc_poll_banks_default() which does machine_check_poll(0, this_cpu_ptr(&mce_poll_banks)); I presume we don't do: if (!cmci_supported(&banks)) { mc_poll_banks = cmci_mc_poll_banks; return; } usually on Intel. And even if we did, cmci_mc_poll_banks() calls machine_check_poll(0, this_cpu_ptr(&mce_poll_banks)); too. So regardless what machine you have, you do call the mc_poll_banks pointer which in both cases does machine_check_poll(0, this_cpu_ptr(&mce_poll_banks)); The *thresholding* interrupt does machine_check_poll(0, this_cpu_ptr(&mce_banks_owned)); and you're saying mce_poll_banks and mce_banks_owned are disjoint. That's what you mean, right? Because if so, yes, that makes sense. If the sets of MCA banks polled and handled in the thresholding interrupt are disjoint, we should be ok. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette