Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1358783pxb; Sat, 29 Jan 2022 03:58:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgOto0MXsU5TqyjaosJCTj+4SJHfT0F5nO87TiUVc6SprYEsE4BZMgNHjV20lekZJGWDWg X-Received: by 2002:a63:da0b:: with SMTP id c11mr9910376pgh.436.1643457523736; Sat, 29 Jan 2022 03:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643457523; cv=none; d=google.com; s=arc-20160816; b=E/dojncMehR7YWak1/yB+9pRyfh8z/DohxQpJRbICTNh8wkIltRG3WoS6qpyichXcB cEkRRmrpwCUqe6As0M/cBTVd8zwXZbbsFlXcqV/dSxnjVdZE7L7r6a4mTT7oWPiHS2A6 ymJJM9LGScUF7sNSk7C/wThdEM0cmlOQsN69bpJvDhXvHDdzCT/q2yFntmlYVZsbyT74 ZVVUGsMfLttoJXPxmnAhQ8e/2H26EbEjBb9hEpXKyT1Rp+ZtZ677ZnKy/+r9tztf8XXa 7bbJFNATStjz/jBvpGTEzp6WPgYqi0hqr0vZmV48vUegMLMPZvh0wOFaY/wRQMBDELdY b+sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:cc:dkim-signature; bh=x9HvmBzNDHVU8hRVqzBZ2poXZJYpCO/70h9LCUjJoXg=; b=ibXI/x9XSyVaQlHz8XcakqrG6aLRC3s9XCmRCYQ9WEPwQ5li4mZQFOl8vjU+Ov2Xm1 15/8SwyoXJGcd/G5QCo5k9VpzW9eoJjUYgPOwYbC8gA+pk+jDBFquUq0Q8EkrjsePD3Z z4Ft95B8FdLeiCYQqid7g5rktGNxkRymsMlMlYpY48xzff5rh4F3L0br9LJ00pCCxoFQ 6wNVOBnNSi85jYf5P9X+FjLe+gb/TD4aLlThdiQHjN3awEukVD0r13FNKeIZe9g/YMhG keyV5bXeF/gmf3S9QPCbozgOQM+1ONRaCfI+8rvgP62dHAECx89Xg1sH14l2M19TEhV4 TEfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ehMl2PUR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si8075365pgm.853.2022.01.29.03.58.32; Sat, 29 Jan 2022 03:58:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ehMl2PUR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233736AbiA1C5C (ORCPT + 99 others); Thu, 27 Jan 2022 21:57:02 -0500 Received: from mga17.intel.com ([192.55.52.151]:38587 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbiA1C5B (ORCPT ); Thu, 27 Jan 2022 21:57:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643338621; x=1674874621; h=cc:subject:to:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=lQzpVBgtczAn5sAewXENYJpIAUiWWZKcbyftWJFiTnk=; b=ehMl2PURoXyAUIkUlgHTDB9BfqLsE4sspvkPQVACKG3fMoT1qSWUKllw 2CjWsx9+Rpb/sGPje+6nsSQOjezlC7QUoVik6ZsK9Nva+NxDPFoB8Liyj ZFtJsuBfCIbmv8OZ1AaLXYS+MwUKNBXxfxvA0fcQ3PaWbPYxMbv8mX3hz qf5Alo7q3jUg415JJtnPD6g6weBww45mXJwG/kGFXNYETs2BoJGiukWrJ Tv3GAK5BrdXHbwfJjZcHkGNAceX3ztWz1KdFa7dnTD+fw1zS59zBeNvi9 UNB+x8HPkTCXo3Ddd5F5ByVfqnEgBm2FkLqcpt+UdA8zETFZedAREtipE A==; X-IronPort-AV: E=McAfee;i="6200,9189,10240"; a="227699932" X-IronPort-AV: E=Sophos;i="5.88,322,1635231600"; d="scan'208";a="227699932" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2022 18:54:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,322,1635231600"; d="scan'208";a="535953637" Received: from allen-box.sh.intel.com (HELO [10.239.159.118]) ([10.239.159.118]) by orsmga008.jf.intel.com with ESMTP; 27 Jan 2022 18:54:10 -0800 Cc: baolu.lu@linux.intel.com, bhelgaas@google.com, mika.westerberg@linux.intel.com, koba.ko@canonical.com, Russell Currey , Oliver O'Halloran , Lalithambika Krishnakumar , Joerg Roedel , linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] PCI/AER: Disable AER service when link is in L2/L3 ready, L2 and L3 state To: Kai-Heng Feng References: <20220127025418.1989642-1-kai.heng.feng@canonical.com> <0259955f-8bbb-1778-f234-398f1356db8b@linux.intel.com> From: Lu Baolu Message-ID: <11891652-40c6-f111-46b7-e96d1729815e@linux.intel.com> Date: Fri, 28 Jan 2022 10:53:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/27/22 7:14 PM, Kai-Heng Feng wrote: > On Thu, Jan 27, 2022 at 3:01 PM Lu Baolu wrote: >> >> On 2022/1/27 10:54, Kai-Heng Feng wrote: >>> Commit 50310600ebda ("iommu/vt-d: Enable PCI ACS for platform opt in >>> hint") enables ACS, and some platforms lose its NVMe after resume from >>> S3: >>> [ 50.947816] pcieport 0000:00:1b.0: DPC: containment event, status:0x1f01 source:0x0000 >>> [ 50.947817] pcieport 0000:00:1b.0: DPC: unmasked uncorrectable error detected >>> [ 50.947829] pcieport 0000:00:1b.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Receiver ID) >>> [ 50.947830] pcieport 0000:00:1b.0: device [8086:06ac] error status/mask=00200000/00010000 >>> [ 50.947831] pcieport 0000:00:1b.0: [21] ACSViol (First) >>> [ 50.947841] pcieport 0000:00:1b.0: AER: broadcast error_detected message >>> [ 50.947843] nvme nvme0: frozen state error detected, reset controller >>> >>> It happens right after ACS gets enabled during resume. >>> >>> There's another case, when Thunderbolt reaches D3cold: >>> [ 30.100211] pcieport 0000:00:1d.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:1d.0 >>> [ 30.100251] pcieport 0000:00:1d.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID) >>> [ 30.100256] pcieport 0000:00:1d.0: device [8086:7ab0] error status/mask=00100000/00004000 >>> [ 30.100262] pcieport 0000:00:1d.0: [20] UnsupReq (First) >>> [ 30.100267] pcieport 0000:00:1d.0: AER: TLP Header: 34000000 08000052 00000000 00000000 >>> [ 30.100372] thunderbolt 0000:0a:00.0: AER: can't recover (no error_detected callback) >>> [ 30.100401] xhci_hcd 0000:3e:00.0: AER: can't recover (no error_detected callback) >>> [ 30.100427] pcieport 0000:00:1d.0: AER: device recovery failed >>> >>> So disable AER service to avoid the noises from turning power rails >>> on/off when the device is in low power states (D3hot and D3cold), as >>> PCIe spec "5.2 Link State Power Management" states that TLP and DLLP >>> transmission is disabled for a Link in L2/L3 Ready (D3hot), L2 (D3cold >>> with aux power) and L3 (D3cold). >>> >>> Bugzilla:https://bugzilla.kernel.org/show_bug.cgi?id=209149 >>> Bugzilla:https://bugzilla.kernel.org/show_bug.cgi?id=215453 >>> Fixes: 50310600ebda ("iommu/vt-d: Enable PCI ACS for platform opt in hint") >> >> I don't know what this fix has to do with the commit 50310600ebda. > > Commit 50310600ebda only exposed the underlying issue. Do you think > "Fixes:" tag should change to other commits? > >> Commit 50310600ebda only makes sure that PCI ACS is enabled whenever >> Intel IOMMU is on. Before this commit, PCI ACS could also be enabled >> and result in the same problem. Or anything I missed? > > The system in question didn't enable ACS before commit 50310600ebda. This commit exposed the issue on your configuration doesn't mean the fix should be back ported as far as that commit. I believe if you add intel-iommu=on in the kernel parameter, the issue still exists even you revert commit 50310600ebda or checkout a tag before it. Best regards, baolu