Received: by 10.223.176.46 with SMTP id f43csp3938068wra; Tue, 23 Jan 2018 01:25:21 -0800 (PST) X-Google-Smtp-Source: AH8x224/RvGp+Zs58g8/6cUp894KHKtK4g1Oinbc/uot/uG3uijQEqBE1Utw3OSwGbpecyerEcFn X-Received: by 10.99.1.151 with SMTP id 145mr8595070pgb.229.1516699521148; Tue, 23 Jan 2018 01:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516699521; cv=none; d=google.com; s=arc-20160816; b=cAkU+EmE/3JRpIYSwdYdhiF/3R9YLfhW0tcn9CAIeKzC6Mq8VJSd34eZAQtRwo0rXu XUODINrENUPQObg/MG6M8BcYpzQHYT8HhuOhzLcvUIveR3tnpJR+I9dwlbuT3Yg1RGak dIn38ecQ3tB+FK2k+R281hvBJP5e+UnHHrhgYfEjak0f8p60/WQ7GkGBBYj9twclaqkX wuSlXeyTZQZ3N9bUYuNX20Fw++ivzExjlvAkCjCVcT4i6uWgcK9M7QcLtGpnuuQ49Y1F 7njQPHuECiIR/4cKNqRnAAwe7VrbowOXEaERO4CnmWhElq01gIDk8KCS7SnfILjNKpPA Io1g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=goHHY4jxOAjO/KwFJm9uAbdVX0gb9bgJeZFShoy/xKA=; b=Dg92hFucevVnQQt8CMpke6EdrJ/WpYW+tRbkgVFBcNiJgZ7XHvwiO2ImsX0h3O317T f2uxH0v1shBhNcD8IDrfds+DzQTooK7BWg6QKttN+2rnkQCMXYd4EWbbuyJCyynIn0uI 6iUugf1a0MCsxwIAbb+u0AyWbJNCM3oRUHrE08VkcMKBuJCKAhdfx1QpvUwaTBOXQsGV Gu5eHXUilu2b0jjaXm7mOck+DraxBGym+n/hRqtZJgXKqanY7X7AJRuIJIMpcTRYU7OF spU03BuUyRqCAxaejpIsTTjcf69zJvD8G2qb6e9Sgz81+6z5+BwOPnzR9uCMdWVFrduC rKhw== 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 a68-v6si4480701pli.788.2018.01.23.01.25.07; Tue, 23 Jan 2018 01:25:21 -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 S1751263AbeAWJYg (ORCPT + 99 others); Tue, 23 Jan 2018 04:24:36 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:4675 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751154AbeAWJYe (ORCPT ); Tue, 23 Jan 2018 04:24:34 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id ECA981BFB95E2; Tue, 23 Jan 2018 17:24:19 +0800 (CST) Received: from [127.0.0.1] (10.142.68.147) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.361.1; Tue, 23 Jan 2018 17:24:11 +0800 Subject: Re: [PATCH v9 3/7] acpi: apei: Add SEI notification type support for ARMv8 To: James Morse CC: , , , , , , , , , , , , , , , , References: <1515254577-6460-1-git-send-email-gengdongjiu@huawei.com> <1515254577-6460-4-git-send-email-gengdongjiu@huawei.com> <5A663DEC.8080804@arm.com> From: gengdongjiu Message-ID: <168c3f61-0d11-13a4-c383-1f6a97d0ef37@huawei.com> Date: Tue, 23 Jan 2018 17:23:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <5A663DEC.8080804@arm.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.68.147] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, On 2018/1/23 3:39, James Morse wrote: > Hi Dongjiu Geng, > > (versions of patches 1,2 and 4 have been queued by Catalin) > > (Nit 'ACPI / APEI:' is the normal subject prefix for ghes.c, this helps the > maintainers know which patches they need to pay attention to when you are > touching multiple trees) > > On 06/01/18 16:02, Dongjiu Geng wrote: >> ARMv8.2 requires implementation of the RAS extension. > >> In >> this extension, it adds SEI(SError Interrupt) notification >> type, this patch adds new GHES error source SEI handling >> functions. > > This reads as if this patch is handling SError RAS notifications generated by a > CPU with the RAS extensions. These are about CPU->Software notifications. APEI > and GHES are a firmware first mechanism which is Software->Software. > Reading the v8.2 documents won't help anyone with the APEI/GHES code. > > Please describe this from the ACPI view, "ACPI 6.x adds support for NOTIFY_SEI > as a GHES notification mechanism... ", its up to the arch code to spot a v8.2 > RAS Error based on the cpu caps.Ok, I will modify it. > > >> This error source parsing and handling method >> is similar with the SEA. > > There are problems with doing this: > > Oct. 18, 2017, 10:26 a.m. James Morse wrote: > | How do SEA and SEI interact? > | > | As far as I can see they can both interrupt each other, which isn't something > | the single in_nmi() path in APEI can handle. I thinks we should fix this > | first. > > [..] > > | SEA gets away with a lot of things because its synchronous. SEI isn't. Xie > | XiuQi pointed to the memory_failure_queue() code. We can use this directly > | from SEA, but not SEI. (what happens if an SError arrives while we are > | queueing memory_failure work from an IRQ). > | > | The one that scares me is the trace-point reporting stuff. What happens if an > | SError arrives while we are enabling a trace point? (these are static-keys > | right?) > | > | I don't think we can just plumb SEI in like this and be done with it. > | (I'm looking at teasing out the estatus cache code from being x86:NMI only. > | This way we solve the same 'cant do this from NMI context' with the same > | code'.) > > > I will post what I've got for this estatus-cache thing as an RFC, its not ready > to be considered yet.Yes, I know you are dong that. Your serial's patch will consider all above things, right? If your patch can be consider that, this patch can based on your patchset. thanks. > > >> Expose API ghes_notify_sei() to external users. External >> modules can call this exposed API to parse APEI table and >> handle the SEI notification. > > external modules? You mean called by the arch code when it gets this NOTIFY_SEI? yes, called by kernel ARCH code, such as below, I remember I have discussed with you. asmlinkage void do_serror(struct pt_regs *regs, unsigned int esr) { nmi_enter(); if (!ghes_notify_sei()) return; /* non-RAS errors are not containable */ if (!arm64_is_ras_serror(esr) || arm64_is_fatal_ras_serror(regs, esr)) arm64_serror_panic(regs, esr); nmi_exit(); } > > > Thanks, > > James > > . >