Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp945032pxp; Wed, 16 Mar 2022 22:11:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsrzkmqxkmsFd5LqUHPlWRMTB9dTDtwEsiS+hXEhHBoAyQCeW/NtlLfj21GKQQZV9tXRAx X-Received: by 2002:a63:1847:0:b0:381:8214:3a7d with SMTP id 7-20020a631847000000b0038182143a7dmr2333605pgy.134.1647493882352; Wed, 16 Mar 2022 22:11:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647493882; cv=none; d=google.com; s=arc-20160816; b=z4K4mOLE7hbhpKsK7BepJplbxJuHGwp/E/M76wR38ddmMwbP76HCA9xS7ba6ZqTh6G +Pg1rusUM8fm97uc2XeFPBhI7TYrMCRGh/r86xpFb2AHCvwcUsGEZBCn8XeXC30zQfII PFhMCeHUvO81s5ylsrgeCNRtXF3s4PWZKtNoTfin3NFDfvTs3WYLQpV7NAW0yktRwZMS VHTI2VNwHqobPGP5zQCcGyLGKmYetQmTX8Z4wPFWPQ9crtibdpDSI2NGWNItgWMyKWU3 8UixC89DJlK1AXN5yFHPTVzw30XmYb+G9P6CRqMe5SH9vQU41uAXgkiCUtBc7KpdKQdA V1Yg== 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=Q0Z/mKLEzNMGFhUbWMgWDYenOVpB+Pa0RFNSj7m6Lq0=; b=OuxFyYhTyUzm4F1d5NfY/bQdBoKj6QB06gbckD6bbGlYVHWido/q3wtTHpnwS51xB+ O13z/kZPsTx2sKXvOc/HhxwXiqsmhHf2ajwgXZ1d4lfgDl1qDFNBic0dGZD4Bsc0/x/p 8hAumA4ulhts2/afrvpC2C1poWjHPD93PJ40TjLK7L57Ysa0PAH4nU4xYO9uu75RS0gM s7jyzRrIrx1nNNS1NmJ4gSwlIKM6VDgpVLh0Xmdgw78pyBV4y/GRwrhb9eD5SxlepLtI VIBFerr+Efm7Y/D2kqElDw/6T6A5eDqDLYIDl7JNQULyB9bGf/OJsNlT4z7SRxJl7Mmq 9pWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@purestorage.com header.s=google header.b=DdjagM6i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a2-20020a630b42000000b003820b4fb922si217244pgl.56.2022.03.16.22.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:11:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@purestorage.com header.s=google header.b=DdjagM6i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B0BE41CAF3E; Wed, 16 Mar 2022 21:21:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351479AbiCOTyN (ORCPT + 99 others); Tue, 15 Mar 2022 15:54:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235514AbiCOTyM (ORCPT ); Tue, 15 Mar 2022 15:54:12 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36AF0286C6 for ; Tue, 15 Mar 2022 12:52:59 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id m11-20020a17090a7f8b00b001beef6143a8so414537pjl.4 for ; Tue, 15 Mar 2022 12:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Q0Z/mKLEzNMGFhUbWMgWDYenOVpB+Pa0RFNSj7m6Lq0=; b=DdjagM6iLgCzTKKLhzNMMpzAvoMKa5fc95CsnEsQKICrPW80MBMPSL8FQwe5uHgRne RXt4V1BllKjKmpk354xuyBEOLu/sckjJQ1RvERNexLsSTJjBPfadOsH2xg5KFK6Aj5vN mZQUoj8QOCqRNk5BhjoQvb21U3wZRO5bpYjQc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Q0Z/mKLEzNMGFhUbWMgWDYenOVpB+Pa0RFNSj7m6Lq0=; b=u9lXRhiNnvAcUSoSRfKCYMhcnAXJ8h7leDa/wu1B2V4/hrnnFCKaVtRFnCYafrsCNb KVZoR0bBWRH/18+wQmie0NfZxaAmu+n9QyAS4/QluL9SeH3x5j+o/jjf0s4S6EdfK5S3 jVz8NCfJ10tQ/GeSDxLvFQC2/ThOs0PrAC3hdM/gk8XbHpLEo34tZuDU0LqBLHUEtKm7 y0AbTmCMUIBuTsXBNa+SweFz0N/XoC+VOugbKi9xYI8PyP2ydViGZkI0fDjDeYeY/MAT PafvVeVa0AQKrl1QkSnqgv3WNAb6MFy9u/xvgg5kAyRM7qYqKxOq2VBctO7TXEb0NQMc kh1g== X-Gm-Message-State: AOAM531miotbyYWs4edVU8R3+x1QPhOeyT/OrsjAMnACeW/f5ViWexFe 5xekBdjPeozG2TG5xnGlxZkaNhYYje8jtg== X-Received: by 2002:a17:902:da89:b0:153:349c:d240 with SMTP id j9-20020a170902da8900b00153349cd240mr23369729plx.73.1647373978733; Tue, 15 Mar 2022 12:52:58 -0700 (PDT) Received: from ebps (cpe-75-80-179-40.san.res.rr.com. [75.80.179.40]) by smtp.gmail.com with ESMTPSA id z12-20020aa7888c000000b004f3fc6d95casm25503039pfe.20.2022.03.15.12.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Mar 2022 12:52:58 -0700 (PDT) Date: Tue, 15 Mar 2022 12:52:55 -0700 From: Eric Badger To: Sathyanarayanan Kuppuswamy Cc: Bjorn Helgaas , Russell Currey , Oliver OHalloran , linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, ebadger@purestorage.com Subject: Re: [PATCH v2] PCI/AER: Handle Multi UnCorrectable/Correctable errors properly Message-ID: <20220315195255.GA1523195@ebps> References: <20220315050842.120063-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220315171425.GA1521135@ebps> <2d4e8811-dce6-c891-e92d-e3746434685e@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2d4e8811-dce6-c891-e92d-e3746434685e@linux.intel.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Tue, Mar 15, 2022 at 10:26:46AM -0700, Sathyanarayanan Kuppuswamy wrote: > On 3/15/22 10:14 AM, Eric Badger wrote: > > > # Prep injection data for a correctable error. > > > $ cd /sys/kernel/debug/apei/einj > > > $ echo 0x00000040 > error_type > > > $ echo 0x4 > flags > > > $ echo 0x891000 > param4 > > > > > > # Root Error Status is initially clear > > > $ setpci -s ECAP0001+0x30.w > > > 0000 > > > > > > # Inject one error > > > $ echo 1 > error_inject > > > > > > # Interrupt received > > > pcieport : AER: Root Error Status 0001 > > > > > > # Inject another error (within 5 seconds) > > > $ echo 1 > error_inject > > > > > > # No interrupt received, but "multiple ERR_COR" is now set > > > $ setpci -s ECAP0001+0x30.w > > > 0003 > > > > > > # Wait for a while, then clear ERR_COR. A new interrupt immediately > > > fires. > > > $ setpci -s ECAP0001+0x30.w=0x1 > > > pcieport : AER: Root Error Status 0002 > > > > > > Currently, the above issue has been only reproduced in the ICL server > > > platform. > > > > > > [Eric: proposed reproducing steps] > > Hmm, this differs from the procedure I described on v1, and I don't > > think will work as described here. > > I have attempted to modify the steps to reproduce it without returning > IRQ_NONE for all cases (which will break the functionality). But I > think I did not correct the last few steps. Well, the thinking in always returning IRQ_NONE was so that only setpci modified the register and we could clearly see how writes to the register affect interrupt generation. > How about replacing the last 3 steps with following? > > # Inject another error (within 5 seconds) > $ echo 1 > error_inject > > # You will get a new IRQ with only multiple ERR_COR bit set > pcieport : AER: Root Error Status 0002 This seems accurate. Though it does muddy a detail that I think was clearer in the original procedure: was the second interrupt triggered by the second error, or by the write of 0x1 to Root Error Status? Also, in terms of practically running the test, I find the mdelay() can block other interrupts and can make running the test sort of confusing ("is it not printing because the interrupt didn't fire, or because it's spinning and blocking my NIC driver?" :). Cheers, Eric