Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1120449lqj; Mon, 3 Jun 2024 10:39:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUY0oFUOOWpJPfPTl52BJ2nEpH54451zxNkuSgRKqivIQbGKNpNBHtCibzc11hzS3PRWizJ4wMifazNezlKLgAEPNxop+jW2YGiEP16qQ== X-Google-Smtp-Source: AGHT+IHUL8wfBv9Hl+gt5twD+y4LGyN4jntrEbk/8Lq71ot91KYbOFNaUfdYY1rHZW2BVr8bDfA6 X-Received: by 2002:a05:6a21:8195:b0:1b2:53c5:9e6a with SMTP id adf61e73a8af0-1b26f296bd0mr10065917637.59.1717436383348; Mon, 03 Jun 2024 10:39:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717436383; cv=pass; d=google.com; s=arc-20160816; b=OGeT1/5gpP9y3KmQqfQOXBHUMGR+qLtfqf6aruc98G2TpoA0fmMeKitAYDWabhngQ4 hW14mzMyzpgvlq/6JA4ofgvJHylXAYtgS/efJ6V/uoR5TUydfyQkUZTBeWanj99Er1Bd AJqHoX9QOzjLeBe/i72d/LlMjTZKmZZKlRmvzK8+L/9McWqgY/1hgRp/NSt2ZBNBsUrh OnExjZKqLs8H2Rm3+Gx+n1wGTFMclxWdqYZ39GuYhZCQQNkcshLGCDNe0kb+l7/LGCtt 27eHXgKkJ2b30dcwErQIy6N/BWeCc8Om2kc9hWoUNl5v6ZNZTniyFGtrm4l4v+lkY3wz Cp9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hpYIA2DA+gPQxWdwquhJ9GCmfI5W+kioR5xvfct83vg=; fh=Mp0b4qa5Z7QxcMtwelWAtSX1vWdglDM0K+IjPukbHXo=; b=dLU0xoAOkqS1obUe1wFSSulsT/E9ANP+w4fXCpStdwGuIl74sAVcsRlfHkuNCkBc+A XJXrRsSlEzHJmaRoaagQLaee3oTMAdHAXQQeo1Gh1tPfDyPtG0bBqEvn9uHn34+90iJt 4utTVD89FnaQXUoIds2prAF4p4Wd1sCh/RzEfPFyKlxYABVxBZVbE+cVqN8wfV01/ztK 15gPjk6hoKS0tnpaIsdmG6aEA/Kz9rGJ2Rq9O4zdyRCTraLhHTOJiMiU5KMpq1T8BeQW VYwlc8qVK1pp/k7BeazsIrBM0bjJaJpfl5nFszVukZNj2JOmsEj0Pa91wbeP5S1mF9ay 0DTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=W1d4dOyI; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-199522-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-70259d52a3csi4336748b3a.124.2024.06.03.10.39.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 10:39:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199522-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=W1d4dOyI; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-199522-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0094C286E01 for ; Mon, 3 Jun 2024 17:37:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45A16137904; Mon, 3 Jun 2024 17:37:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="W1d4dOyI" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39F0328382; Mon, 3 Jun 2024 17:37:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717436268; cv=none; b=lOjPIIelohdHKdjdwVWJWae9Fp/eQ+VOyxu/55Huf7J72ZXnI12cKxKBUSPfAAOxVwnnsZl2mDKI+FlnGl/S5oHQkX2zjEa4nkxefxxxaK5Pm6L4zK2Dk6c/zyTc4DYbp/Zmm4eJjNeCk6Ox3Eya5/I0Xkmaza+0OJ7Aehykf6I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717436268; c=relaxed/simple; bh=jVYpDKFsAQoVl6zoNLBDteeJmjYcmSe5lrpmSH4vu1Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WT2xOflguyOo6NATrGmU46r8vgbTM3QEeCFd7UDCoswBS/Nb1Mo5+R6wSeDlvkoCHn88iw0rgvtpGIKQbK2EdElEPGJ37Wt9OAX0ek4pWbTI6klsTre6iIiif/2ZObts2Lm/uYsFnlNVQMwoM/XYebhHgLYPCNEt2OyBtkFv77w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=W1d4dOyI; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 15BC440E016A; Mon, 3 Jun 2024 17:37:44 +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 G0wd4BSyBX0M; Mon, 3 Jun 2024 17:37:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1717436260; bh=hpYIA2DA+gPQxWdwquhJ9GCmfI5W+kioR5xvfct83vg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W1d4dOyIVmtZOVL7jYc/a+ptiZvBitggW6+IGai6I05/WZLTltDl/cdFieQN4iX0k Kk2Rq66y7bPwGYBpq70+nb6kPGyyM68RmoRK0aD/a8IRjAnMoVkpZvsnU9uGH2RqJE PZc3mvJUjRaNVgbohpZJsdkGjFbfVRHoU3aFZN+8rZnnqUWMm0NUIakC90O0rl/f1H q/AatCU9/JcAANx4/uOOVknU7MRqKOlqt8D921ucdX5j6u0AINuqHB2xVBMwFo9OOV 68WPKPZ42x4PQAcz3l4F2L/PTPPsW9mc1G3sTF9p1spb0gi4hBJYp7d4LxDXpX9Gpe bHoRmHy/F03+mC7sjK5/S5sJMswXbWVKUquHYtg583DvHwSVBEGSsuuEq4BCs2q4ST l8j6VOIe/Qsie/YIfbqzZZ/45p1qKCL4QoLpuRxpwrXjGW8v7vdO+xc3sGpqoFHGUU O4f+5Hm5JOls3u7SYHw1R1iOrzPN8rHtkb88n/CcucQTK918WZZQhk2xB4hUl09OQI ICbR1Pu2jmAUt9lVR3hDJHfNpdTzjHrmCLSgr8hzYbdU31lG7iNE8G2OL3ZBjt+ncX B2mHAKVxLEShK6WaHm4jwfA2zxtMIkpWy8pXrhPXfvzcw1XRrablua7mTtRaFladGR c5Fs0W3EGsvffxG2kWIum5o0= Received: from zn.tnic (p5de8ee85.dip0.t-ipconnect.de [93.232.238.133]) (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 480E340E016C; Mon, 3 Jun 2024 17:37:33 +0000 (UTC) Date: Mon, 3 Jun 2024 19:37:27 +0200 From: Borislav Petkov To: Yazen Ghannam Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, tony.luck@intel.com, x86@kernel.org, avadhut.naik@amd.com, john.allen@amd.com Subject: Re: [PATCH 4/9] x86/mce: Move machine_check_poll() status checks to helper functions Message-ID: <20240603173727.GOZl3_V9eVbm0184Wi@fat_crate.local> References: <20240523155641.2805411-1-yazen.ghannam@amd.com> <20240523155641.2805411-5-yazen.ghannam@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240523155641.2805411-5-yazen.ghannam@amd.com> On Thu, May 23, 2024 at 10:56:36AM -0500, Yazen Ghannam wrote: > @@ -709,48 +747,9 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b) > if (!mca_cfg.cmci_disabled) > mce_track_storm(&m); > > - /* If this entry is not valid, ignore it */ > - if (!(m.status & MCI_STATUS_VAL)) > + if (!log_poll_error(flags, &m)) > continue; > > - /* > - * If we are logging everything (at CPU online) or this > - * is a corrected error, then we must log it. > - */ > - if ((flags & MCP_UC) || !(m.status & MCI_STATUS_UC)) > - goto log_it; > - > - /* > - * Newer Intel systems that support software error > - * recovery need to make additional checks. Other > - * CPUs should skip over uncorrected errors, but log > - * everything else. > - */ You lost that comment. > - if (!mca_cfg.ser) { > - if (m.status & MCI_STATUS_UC) > - continue; > - goto log_it; > - } > - > - /* Log "not enabled" (speculative) errors */ > - if (!(m.status & MCI_STATUS_EN)) > - goto log_it; > - > - /* > - * Log UCNA (SDM: 15.6.3 "UCR Error Classification") > - * UC == 1 && PCC == 0 && S == 0 > - */ > - if (!(m.status & MCI_STATUS_PCC) && !(m.status & MCI_STATUS_S)) > - goto log_it; > - > - /* > - * Skip anything else. Presumption is that our read of this > - * bank is racing with a machine check. Leave the log alone > - * for do_machine_check() to deal with it. > - */ > - continue; > - > -log_it: > if (flags & MCP_DONTLOG) > goto clear_it; Btw, the code looks really weird now: if (!log_poll_error(flags, &m)) continue; if (flags & MCP_DONTLOG) goto clear_it; i.e., 1. Should I log it? 2. Should I not log it? Oh well, it was like that before logically so... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette