From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBB12C4320A for ; Fri, 23 Jul 2021 05:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A5E3E60EB2 for ; Fri, 23 Jul 2021 05:24:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231484AbhGWEoL (ORCPT ); Fri, 23 Jul 2021 00:44:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231134AbhGWEoK (ORCPT ); Fri, 23 Jul 2021 00:44:10 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79D10C061575; Thu, 22 Jul 2021 22:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Xptyi13HccZ4R8P+AijEDP2b7CXavc6mEvvmsOqoBkY=; b=DJcUAYLk0+dpd/8f5g9HghlA3p EeZr7LTFHZmDPgmsgccuMllN8saglU98K+LzeI94X0be9lqlsEPVr/7iAdl5BonTxc0zCc4mQCaU/ 0XS+8rP7eJINp0fVuc4beaxfm32S8rHcaj8NPOZvGL08pLLZQv1cTZgC80Ly2DfcuRWJXGFoiIABb VsygBF0zhSBU1IUbpYEnbCV1lbWyvuZiq5uM8z0aocWQeLQIBRN3HYYObC/sX1W3TDAZCehN+t/xD l8WwHz5ZdXguLSoAcOt6tdlh3NGabF9wtFkidWDFN08ja2VULxLzDcnQJdYtbuO8u1wcZ8V0Zc6G1 og1TAruw==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6nfa-00B1E8-GY; Fri, 23 Jul 2021 05:24:27 +0000 Date: Fri, 23 Jul 2021 06:24:22 +0100 From: Christoph Hellwig To: Bjorn Helgaas Cc: Kai-Heng Feng , Joerg Roedel , "open list:PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC" , "open list:PCI SUBSYSTEM" , open list , Lalithambika Krishnakumar , Alex Williamson , Oliver O'Halloran , Bjorn Helgaas , Mika Westerberg , Lu Baolu Subject: Re: [PATCH 1/2] PCI/AER: Disable AER interrupt during suspend Message-ID: References: <20210722222351.GA354095@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210722222351.GA354095@bjorn-Precision-5520> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 05:23:51PM -0500, Bjorn Helgaas wrote: > Marking both of these as "not applicable" for now because I don't > think we really understand what's going on. > > Apparently a DMA occurs during suspend or resume and triggers an ACS > violation. I don't think think such a DMA should occur in the first > place. > > Or maybe, since you say the problem happens right after ACS is enabled > during resume, we're doing the ACS enable incorrectly? Although I > would think we should not be doing DMA at the same time we're enabling > ACS, either. > > If this really is a system firmware issue, both HP and Dell should > have the knowledge and equipment to figure out what's going on. DMA on resume sounds really odd. OTOH the below mentioned case of a DMA during suspend seems very like in some setup. NVMe has the concept of a host memory buffer (HMB) that allows the PCIe device to use arbitrary host memory for internal purposes. Combine this with the "Storage D3" misfeature in modern x86 platforms that force a slot into d3cold without consulting the driver first and you'd see symptoms like this. Another case would be the NVMe equivalent of the AER which could lead to a completion without host activity. We now have quirks in the ACPI layer and NVMe to fully shut down the NVMe controllers on these messed up systems with the "Storage D3" misfeature which should avoid such "spurious" DMAs at the cost of wearning out the device much faster.