From patchwork Thu Jun 6 12:36:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 165978 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp8733436ili; Thu, 6 Jun 2019 05:37:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9wb2wAAM5BF2r4NxjMF3/fp4T0RmbTDmxwUAAA3UnDm5tJ5jxJBjdOck3eaq5E9Gd/khU X-Received: by 2002:a63:a055:: with SMTP id u21mr3173155pgn.5.1559824643961; Thu, 06 Jun 2019 05:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559824643; cv=none; d=google.com; s=arc-20160816; b=XyzNcznw9Op4k0AClgC3YWitJLMhA292Aed+xEUxGspxWCoTlf4l+uhAU64jq0oP0f Kt8RVNM34QnrjdgV3ch/dKPvjinLCmFr9KCpHNvpKgKeLmgGB9Pl0/s5Pr3ozLgPN8jl nuSlyyO/GMGK5z2OSeXjkJK1ejaSH0gl0cO6WAaY20GhfMEmKgwT1QZA5ErsMXteiWEW BRmE7YBU9Zm2dsRcNj3cKwIs8cQnCNEfo6hWFKeRO/CixO8Uk0RyyMaT03ErtqtcqhJ/ XKSNy/ywCZb5cAyO4/HrzqAKSpZm2yzhUe2g5f7PDEpgXs1QCSGcBIcJGSu6gjTNU8xa KpxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=OoFxeT2DbVSLbqdHeVoOgdkwhk96UKUlmsZRLCm7UKg=; b=tg1wx6qmF4Uw+UEzB4YdFOm65Jn7D76VPJOm/1YvWTVTcUTBd64wqn5HAenZAqUrAD dpVqV/tQ+UhbRh3BSrsyPHl5Xk4cNaJIECBr30cy3PscNh5nF7MsMjNmyk+YAnQ0PGVJ b1FIU/65VoMgmNC92MVNRTobm6rmAm/5ai380nby2dOagbxIPq0XQYg/CJWQDXGyNo1e tHo3dN6mG8hLV1wek6OehO8QV+jWFpxd7+wfvx6qnvxXh4hwiVTRHTlzkXLaPClQizp9 cUH+G7SlFw4HW10h9+Nu3yJ/0bo3cpprlwcJ3CLQDt0A2x4Ulz8RZzk2wPcDUO3g5ZXk QLuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-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 cl13si1784278plb.97.2019.06.06.05.37.23; Thu, 06 Jun 2019 05:37:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727218AbfFFMhX (ORCPT + 3 others); Thu, 6 Jun 2019 08:37:23 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:18107 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726877AbfFFMhX (ORCPT ); Thu, 6 Jun 2019 08:37:23 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CD0E381C6E43ED1BC2B1; Thu, 6 Jun 2019 20:37:17 +0800 (CST) Received: from lhrphicprd00229.huawei.com (10.123.41.22) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Thu, 6 Jun 2019 20:37:08 +0800 From: Jonathan Cameron To: , , CC: , , , , , , , Jonathan Cameron Subject: [RFC PATCH 0/6] CCIX Protocol Error reporting Date: Thu, 6 Jun 2019 20:36:48 +0800 Message-ID: <20190606123654.78973-1-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-CFilter-Loop: Reflected Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org UEFI 2.8 defines a new CPER record Appendix N for CCIX Protocol Error Records (PER). www.uefi.org These include Protocol Error Record logs which are defined in the CCIX 1.0 Base Specification www.ccixconsortium.com. Handling of coherency protocol errors is complex and how Linux does this will take some time to evolve. For now, fatal errors are handled via the usual means and everything else is reported. There are 6 types of error defined, covering: * Memory errors * Cache errors * Address translation unit errors * CCIX port errors * CCIX link errors * Agent internal errors. The set includes tracepoints to report the errors to RAS Daemon and a patch set for RAS Daemon will follow shortly. There are several open questions for this RFC. 1. Reporting of vendor data. We have little choice but to do this via a dynamic array as these blocks can take arbitrary size. I had hoped no one would actually use these given the odd mismatch between a standard error structure and non standard element, but there are already designs out there that do use it. 2. The trade off between explicit tracepoint fields, on which we might want to filter, and the simplicity of a blob. I have gone for having the whole of the block specific to the PER error type in an opaque blob. Perhaps this is not the right balance? 3. Whether defining 6 new tracepoints is sensible. I think it is: * They are all defined by the CCIX specification as independant error classes. * Many of them can only be generated by particular types of agent. * The handling required will vary widely depending on types. In the kernel some map cleanly onto existing handling. Keeping the whole flow separate will aide this. They vary by a similar amount in scope to the RAS errors found on an existing system which have independent tracepoints. * Separating them out allows for filtering on the tracepoints by elements that are not shared between them. * Muxing the lot into one record type can lead to ugly code both in kernel and in userspace. Rasdaemon patches will follow shortly. This patch is being distributed by the CCIX Consortium, Inc. (CCIX) to you and other parties that are paticipating (the "participants") in the Linux kernel with the understanding that the participants will use CCIX's name and trademark only when this patch is used in association with the Linux kernel and associated user space. CCIX is also distributing this patch to these participants with the understanding that if any portion of the CCIX specification will be used or referenced in the Linux kernel, the participants will not modify the cited portion of the CCIX specification and will give CCIX propery copyright attribution by including the following copyright notice with the cited part of the CCIX specification: "© 2019 CCIX CONSORTIUM, INC. ALL RIGHTS RESERVED." Jonathan Cameron (6): efi / ras: CCIX Memory error reporting efi / ras: CCIX Cache error reporting efi / ras: CCIX Address Translation Cache error reporting efi / ras: CCIX Port error reporting efi / ras: CCIX Link error reporting efi / ras: CCIX Agent internal error reporting drivers/acpi/apei/Kconfig | 8 + drivers/acpi/apei/ghes.c | 59 ++ drivers/firmware/efi/Kconfig | 5 + drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/cper-ccix.c | 916 +++++++++++++++++++++++++++++++ drivers/firmware/efi/cper.c | 6 + include/linux/cper.h | 333 +++++++++++ include/ras/ras_event.h | 405 ++++++++++++++ 8 files changed, 1733 insertions(+) create mode 100644 drivers/firmware/efi/cper-ccix.c -- 2.20.1