Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp795954pxp; Wed, 9 Mar 2022 12:51:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKJi/lmnLug6P8m3fytPIv4LUYTj9agvgcwfS82K2I/VV6ylrY+ZClQ3hKGstqCV2ym/zU X-Received: by 2002:a17:90b:4ad2:b0:1bf:d47:8077 with SMTP id mh18-20020a17090b4ad200b001bf0d478077mr12172957pjb.85.1646859103059; Wed, 09 Mar 2022 12:51:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646859103; cv=none; d=google.com; s=arc-20160816; b=zeSAfP2vXLkFxvCSdeUJhSCIdlsLs++yLjfImRgRpRNFwGfi2dZszAzQf5Un4TfwuV WLKrky8mkOHl2jXxx4yy35eBQigcGApRwTV6yG5prYNGpf70NYEQy5LcPxgfv87UCA6U +N4lRs2bkhHUiAGsBZrvH0d0jFvYeb1NH2zGssMahj/dv1YxE5xAsB0tZRygU20wsija 3giCbdkVAzuxFfRjTLamJBKJaXSHv0jjNLBcJzuO1otf6wUhqaprjxThT+xCN+BCOe6K Xl4AX+bNMls9yuSoGJfgu+U+fRcSza1K0dWJPAfqVwbqRK7qpNSPLefW7i2YQbz66rt8 raIw== 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=NbclMBw5QgYO4EIbhlHNLwEU/FaXIJ/dtETOluRZQ/M=; b=XStwB1789KhMVhxYFFL4UFYy25rKrG960wJmUcZqfK04xaB0QOP56PvOwtSTd0tJOk HcNXRJCfHpoSCC+IpgPk1vZidlKIwh/slGf4o1ilnXOXEZZaron+Jkq/g1ADAl2CLrXO xNtKxfpr2qKCjvX7KalAGPIs1ZUbvZhHqww/vfCWQCLBVPTXaL6rvFtdNBbegnw6F42W uW/1UJzvnfolyUe7pGEoaD3amvBcK1Nv4JHh0dnPqOH+mL1W0QrDFp9jebV4wXhYMsuU B3cw82MRw4Du8ZxHgFlSMw9waWaFuGj9VecS9Kpc5BxdsWigJmbd/mDoK/vDkzecDSKO Q1yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=gqNRnZWW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e64-20020a636943000000b003803aed4955si2761856pgc.98.2022.03.09.12.51.26; Wed, 09 Mar 2022 12:51:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=gqNRnZWW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235958AbiCISic (ORCPT + 99 others); Wed, 9 Mar 2022 13:38:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbiCISib (ORCPT ); Wed, 9 Mar 2022 13:38:31 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF36727A; Wed, 9 Mar 2022 10:37:31 -0800 (PST) Received: from zn.tnic (p200300ea971938593bb3add11194ca93.dip0.t-ipconnect.de [IPv6:2003:ea:9719:3859:3bb3:add1:1194:ca93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 5D70D1EC0432; Wed, 9 Mar 2022 19:37:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1646851046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=NbclMBw5QgYO4EIbhlHNLwEU/FaXIJ/dtETOluRZQ/M=; b=gqNRnZWWGiT4Cf+H0DruhMlPYfLR35Jsxy0TL4mC84aSeoG5fDpmSFUiZAkMJ+wmB8PXN2 FuCgUJa4Cx6hkh9LApMb7gniYNGbzOzoz0d8/12NOvQ6GgZ/v8uzTHULSfXVgc79GkPui1 3d2VxB1S9LTTkmpL+pxkSVVxJrQ0emA= Date: Wed, 9 Mar 2022 19:37:33 +0100 From: Borislav Petkov To: Carlos Bilbao Cc: tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, yazen.ghannam@amd.com, linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, bilbao@vt.edu Subject: Re: [PATCH] x86/mce: Cover grading of AMD machine error checks Message-ID: References: <20220309174107.6113-1-carlos.bilbao@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220309174107.6113-1-carlos.bilbao@amd.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Definitely a step in the right direction. Now... On Wed, Mar 09, 2022 at 11:41:07AM -0600, Carlos Bilbao wrote: > AMD's severity grading covers very few machine errors. In the graded cases > there are no user-readable messages, complicating debugging of critical > hardware errors. That's too generic. What is the actual use case here you're spending all this time for? > Fix the above issues extending the current grading logic for AMD with cases > not previously considered and their corresponding messages. > > Signed-off-by: Carlos Bilbao > --- > arch/x86/include/asm/mce.h | 6 + > arch/x86/kernel/cpu/mce/severity.c | 232 +++++++++++++++++++++++++---- > 2 files changed, 205 insertions(+), 33 deletions(-) Now, looking at the whole thing, AFAICT all you're interested in is getting some strings out from those error types. But but, we already have something like that. That's even mentioned in the patch: > + * Default return values. The poll handler catches these and passes > + * responsibility of decoding them to EDAC So there's a big fat module mce_amd.c which does convert MCEs to strings. So why can't that be used and extended instead of adding more strings to more places in the kernel? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette