Received: by 10.223.185.116 with SMTP id b49csp4830361wrg; Tue, 27 Feb 2018 03:25:57 -0800 (PST) X-Google-Smtp-Source: AH8x225k9CDYWsSKxbBLYSjQ7gAd7V+OXC8Y2rJzKPyRKwgxq8qRFJACE3FTm27n6TaDpmCEQXVz X-Received: by 10.101.90.140 with SMTP id c12mr9871043pgt.56.1519730757336; Tue, 27 Feb 2018 03:25:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519730757; cv=none; d=google.com; s=arc-20160816; b=cL7j9hH7gFN/rJ8fEkx1h+vnPlhIyRQwrmV976t5CT682lID6cdCgCGv1ezEIDr+E9 FvRtEcB8jhlDZlDJGcjvw7xLUK4OcnL93QIhvQ2m/v1dTCW4QNB7XC8LjojOk93XCZ5b JuWTV3Mil7PofiH5YvxwVEpDM4i91gL/WLPo6F5yjqksGMXUUZsN2gtdTUpAI2qGb6tz YY15bJW919lSR3JyJb928s7s6ZREGJQTUHzzf7Nu6UHA2aj+r4nmLpo6UXvFJGipjGUr GZ/I7uNGsVB1lki/OIPyjFsqd2cd7+gLYtHhAVBTSCj1P0yqFC3G8PKDWSQ10SyRlA7p EW+w== 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=BAjZHqH62d781/xso35K8CdrukGkeGaEwH3qyjlIVws=; b=GQMng5x0+Jr77WlyP3Vz4Lk8M5Vw1Px/dzL/qA91JDDwbXxrSlW+zdFR3Kzqc9ww8b Eu2TNfQaWs8gOuCC9hJ47tQvwCBXWIHWM44uExnKpV1lM9kke+h/0f6gZU/hJXZAUDER NvqdlGfQNrKSRxO5gXWnDZClj3FEmMbNpKVdur97pvMNorv/MTcGrDnzPgOmTc1tDtpY OCbAeRqL58jLnrZ1PyIGvhB4QHm/XSU+tKWcQqicwspy1nOFbZlM7y88KJhYsediam/k DPKiTUDVDPvqq4IHQ35uhFZYj7rzWFTNrsLFnVUO/j9yHfq1nA0T3Jqc1DZ6jWM5Hje5 DK/A== 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 k14si6742958pgt.32.2018.02.27.03.25.42; Tue, 27 Feb 2018 03:25:57 -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 S1752815AbeB0LW7 (ORCPT + 99 others); Tue, 27 Feb 2018 06:22:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:44051 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbeB0LW5 (ORCPT ); Tue, 27 Feb 2018 06:22:57 -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 6E5E3AB37; Tue, 27 Feb 2018 11:22:56 +0000 (UTC) Date: Tue, 27 Feb 2018 12:22:34 +0100 From: Borislav Petkov To: Yazen Ghannam Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, ard.biesheuvel@linaro.org, x86@kernel.org Subject: Re: [PATCH v2 2/8] efi: Decode IA32/X64 Processor Error Section Message-ID: <20180227112234.GE26382@pd.tnic> References: <20180226193904.20532-1-Yazen.Ghannam@amd.com> <20180226193904.20532-3-Yazen.Ghannam@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180226193904.20532-3-Yazen.Ghannam@amd.com> 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 Mon, Feb 26, 2018 at 01:38:58PM -0600, Yazen Ghannam wrote: > + * We don't need a "CPER_IA" prefix since these are all locally defined. > + * This will save us a lot of line space. > + */ > +#define VALID_LAPIC_ID BIT_ULL(0) > +#define VALID_CPUID_INFO BIT_ULL(1) > + > +void cper_print_proc_ia(const char *pfx, const struct cper_sec_proc_ia *proc) > +{ > + printk("%sValidation Bits: 0x%016llx\n", pfx, proc->validation_bits); Ok, so this... > + > + if (proc->validation_bits & VALID_LAPIC_ID) > + printk("%sLocal APIC_ID: 0x%llx\n", pfx, proc->lapic_id); > + > + if (proc->validation_bits & VALID_CPUID_INFO) { > + printk("%sCPUID Info:\n", pfx); > + print_hex_dump(pfx, "", DUMP_PREFIX_OFFSET, 16, 4, proc->cpuid, > + sizeof(proc->cpuid), 0); ... and this are semi-decoded information bits which I'd have to go open the spec and continue decoding. Can we please change the whole approach of not simply dumping such fields but decode them fully. We want that error information to be helpful to the user and she should be able to immediately understand what type of error it is. Validation Bits and a CPUID hexdump simply makes you go look at the spec again and such dumps are only useful as a debugging aid but nothing more. The APIC ID dump is how this should be done - properly and fully decoded error info which can be used immediately for diagnosing the error. Thx. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --