Received: by 10.223.185.116 with SMTP id b49csp7336264wrg; Thu, 1 Mar 2018 04:01:38 -0800 (PST) X-Google-Smtp-Source: AG47ELtPsMCsjpclZFqvjTX1+dwYt0Dg35L9cgpO1L+0Km6mtGnZHsxZVPFLblr7P+DU55XRzRLf X-Received: by 2002:a17:902:7045:: with SMTP id h5-v6mr1723356plt.217.1519905698574; Thu, 01 Mar 2018 04:01:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519905698; cv=none; d=google.com; s=arc-20160816; b=sednN1uhfe5uliC1OjwAfJCJt3kzk7nbGZLM1ntuxSwxVBXeAtnN8XtbLNretpC7N1 hrL8OPUyXWIA1rMC6MAHFGpo/NAyMGHD85/lcOErP0tgHRO9Xcf61hHtjEUatuiPq5wN YKt1OCHwdLswvILDhAdFGIZgW8t+jIM201erOWvCsQMmtCiDkght9Z1WQDxBmTIWzAwo YiohadiU2+0hN74ryCvAY7DPeKl60ixr1c9GqNwgtLzNG2/0OWnMVnHt/2yooJoa1+7Z E7EkgNFmjY6kmInVOt/+85IQtOZNy8/fKDprXxEVuaDUDp8SU8iatv8tNRl9XlR7C7ja yyoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=rp8UV0vu5Da7a+uyAxaXbnrRRLhsyUUGOyZZ/VaCeBE=; b=G4QCeKsf3WYS9XVEBwhuh99fD0kHg3oNwqboB3hPwZ/6wv6akGwzjho6PyCwsSyW38 r+SFDPhqj4qL93aJXuV3O2rxFrA2qEG0Vo0O1hPYk/k0ehw5HYSWgRPT3rE+zwuZrYnp CUEdlyUGH57BXHZZim1wmG5Cc7jvyIqjfvxvTxsuqFNVDmuMvR9QDvitOh8QPVVS/1RS j/eJcgNTNSC5Y9fwGk5luokoI1m60Zg7OPsU7tpLC97LytTqis9TuxeMuTO1dLOK4Oam NQ/kuzlqLy1KeVEaY0d+ygX15STgyaTKa/tu3pa1iHJQXn8Q5SXt1bt0Oqi3jQawhD2i 6kAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p125si2329849pga.97.2018.03.01.04.01.19; Thu, 01 Mar 2018 04:01:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967905AbeCAMAB (ORCPT + 99 others); Thu, 1 Mar 2018 07:00:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:49722 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967818AbeCAMAA (ORCPT ); Thu, 1 Mar 2018 07:00:00 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A3685ABC8; Thu, 1 Mar 2018 11:59:58 +0000 (UTC) Date: Thu, 1 Mar 2018 12:59:53 +0100 From: Borislav Petkov To: "Ghannam, Yazen" Cc: Tony Luck , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ard.biesheuvel@linaro.org" , "x86@kernel.org" Subject: Re: [PATCH v2 0/8] Decode IA32/X64 CPER Message-ID: <20180301115953.GA5040@pd.tnic> References: <20180226193904.20532-1-Yazen.Ghannam@amd.com> <20180228084321.GA2969@pd.tnic> <20180228163539.GC2969@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 28, 2018 at 08:58:15PM +0000, Ghannam, Yazen wrote: > 1) We keep this set mostly as-is. This would be our fallback if we don't have > anything better. Yes, sounds good. We try to decode it as MCE and if we cannot, we dump the raw CPER record. > 2) I add the MCA decoding to this set. I was thinking to do this in a separate > set but maybe it's better to do it all together. I'm fine if you do it separately, as long as you do it so that we have user-friendly decoding in the end. > Number 2 would mean we do a quick check on the CPER to see if it contains > MCA info. There's no spec-defined way to do this, but we can make a good > guess by seeing if we have an "MSR register" context and that context has > an "MSR address" that is an MCA register. Yap. > If we think we have MCA info, then we pull as much out of the CPER as we > can and put it in a struct mce which we then pass to the notifier chain. > > If we don't think we have MCA info, then we fallback to number 1. Ack. > At the moment, it seems we'll be using x86 CPER to represent MCA errors > in BERT since there's no other option in BERT. So I think having number 2 > would catch most, if not all, errors reported with x86 CPER. Yeah, if you think about it, CPER is a clumsy and totally useless indirection layer between MCA and the OS. And if the error is of different type (AER, PCI, whatever), then it wraps around it too with some dumb table. And that doesn't bring anything - just the need for more support added to the OS and tools around it. Basically what you're doing now. I don't mind the aspect of firmware seeing the errors first and even attempting to fix them as the firmware knows the platform intimately but doing everything in firmware just because some misguided souls think this gives added value but in reality ends up becoming a worse problem, is simply the wrong wrong thing to do. Thx. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --