Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7169956imu; Wed, 14 Nov 2018 12:52:52 -0800 (PST) X-Google-Smtp-Source: AJdET5fI6BemUsXe0l4RIh28hDWYoBEor5s5h6DgIGyjoP216euWNdHm1IPT5NoBUZiOh4hr3tD9 X-Received: by 2002:a17:902:7d89:: with SMTP id a9mr3452344plm.242.1542228772134; Wed, 14 Nov 2018 12:52:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542228772; cv=none; d=google.com; s=arc-20160816; b=V8HFBJxSAb1OSd51OhRUOL9+2tGBhALlGSjLbRfqMHWOhPtUk2KBep6SRZTmMaFr+a JYEorEHvybXZFUlGIelQpPC9GoSeOLLc+DojWME6/2wjn840TZ+tWkmlTsdpgPYiizwh Squ+7/WQdCwrue1I0BN4Dt6drAjgJs1Yp8teqlf5SDvCPciKENE5Z2FOFm2XuRwn59G3 JVtJcHcypwttDMXKLal6hZtdGN9iCDH1o7BS1s90Hcc4BnLu3l26GM4N6BDU9U15ARle pHc2zH3HORbamIjKPddArIVj4D/+Hv8kEokoCFyPJlnASQYUHXlN53qtZbaqf0i2v9mX AYOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:to:from:cc:dkim-signature; bh=xib4NitzybkP3rjUYlYl6iDicebK+KPB15Nn6BRC2qc=; b=m5H2oEV3mu04dHOeKIRit6MsFx6S+MypVHfKaJSSVa4PM/0Yv6BMJi/R+Yj0MtdQ2b ses60rHzloNrqE0vqzYOdfl+D0yj5CHipLPeb6kCprzLRYbGj3Gu7M6qBwvol7PnNBW5 Cl12Tm6OGIPhCm8RSeDCKVTBCyrKAhmqYcqkZ+0JEpKT2+J0C7L48CjX4xf8sdS6/D6A 85K6fnFTwn5cBNG1X0hiuqMv2/j/2DWCdUphz/vRR9OeSx+61I9asd2P2Vm3gRDPgwf1 ac9FaiVNzUguEYUOwUn1mnIz113PC26lurgf1P1NyvM4rEEWKp3U1N6zkTlD5WXqW5nC UDaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@dellteam.com header.s=smtpout header.b=Mhx9GORe; 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 63-v6si22414269plf.18.2018.11.14.12.52.36; Wed, 14 Nov 2018 12:52:52 -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; dkim=fail header.i=@dellteam.com header.s=smtpout header.b=Mhx9GORe; 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 S1727873AbeKOG5D (ORCPT + 99 others); Thu, 15 Nov 2018 01:57:03 -0500 Received: from esa7.dell-outbound.iphmx.com ([68.232.153.96]:33079 "EHLO esa7.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbeKOG5D (ORCPT ); Thu, 15 Nov 2018 01:57:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dellteam.com; i=@dellteam.com; q=dns/txt; s=smtpout; t=1542228731; x=1573764731; h=cc:from:to:subject:date:message-id:references: content-transfer-encoding:mime-version; bh=OK57INNTIDwKwcDqWEq68OIXp0NJI6SwNBEEbFIte+0=; b=Mhx9GORecmBubjEF7nBxjv+6soLhUx8EF3aLuVxi4z89+MfkICb5Ja4/ oaWbpCQ/eJ/GUXSRF8zXY95YjL8ILCpNkgiDG3YxMGXmi1GjKE0+wZ5BI jEnXuYoPP4u+n4C4NlnnF/24nyR2b2DErCbgVYCcfgnSvwSMY8Y7fUWZP w=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EXAABJiuxbhiWd50NiHAEBAQQBAQc?= =?us-ascii?q?EAQGBUQcBAQsBAYNqJwqMBl+LGoINlzaBegsBAYRsg0wiNA0NAQMBAQIBAQI?= =?us-ascii?q?BAQIQAQEBCgkLCCkvQgEQAYFiIoJjAQEBAQIBEhUTOAcFCwIBCBgeEFcCBBM?= =?us-ascii?q?IGoJ/gXoInkcCgRCJWAEBAYFqM4onjAWCFoERgxKEfk2FDgKLA5RbCQWRFSC?= =?us-ascii?q?JWocbgnWUZQIEAgQFAhSBRYIOcIM8gjUbjgpAATGCB4pggR8BAQ?= X-IPAS-Result: =?us-ascii?q?A2EXAABJiuxbhiWd50NiHAEBAQQBAQcEAQGBUQcBAQsBA?= =?us-ascii?q?YNqJwqMBl+LGoINlzaBegsBAYRsg0wiNA0NAQMBAQIBAQIBAQIQAQEBCgkLC?= =?us-ascii?q?CkvQgEQAYFiIoJjAQEBAQIBEhUTOAcFCwIBCBgeEFcCBBMIGoJ/gXoInkcCg?= =?us-ascii?q?RCJWAEBAYFqM4onjAWCFoERgxKEfk2FDgKLA5RbCQWRFSCJWocbgnWUZQIEA?= =?us-ascii?q?gQFAhSBRYIOcIM8gjUbjgpAATGCB4pggR8BAQ?= Received: from mx0b-00154901.pphosted.com ([67.231.157.37]) by esa7.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Nov 2018 14:52:10 -0600 Received: from pps.filterd (m0089483.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAEKlmj1021100; Wed, 14 Nov 2018 15:52:13 -0500 Received: from esa1.dell-outbound2.iphmx.com (esa1.dell-outbound2.iphmx.com [68.232.153.201]) by mx0b-00154901.pphosted.com with ESMTP id 2nrmxktch6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Nov 2018 15:52:13 -0500 Cc: , , , , , , , , , , , , Received: from ausc60pc101.us.dell.com ([143.166.85.206]) by esa1.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 15 Nov 2018 02:52:10 +0600 X-LoopCount0: from 10.166.134.87 X-IronPort-AV: E=Sophos;i="5.56,233,1539666000"; d="scan'208";a="1325421759" From: To: Subject: Re: [PATCH v2] PCI/MSI: Don't touch MSI bits when the PCI device is disconnected Thread-Topic: [PATCH v2] PCI/MSI: Don't touch MSI bits when the PCI device is disconnected Thread-Index: AQHUT50UQ290XPGvJEGnaSTTjbCF+g== Date: Wed, 14 Nov 2018 20:52:10 +0000 Message-ID: <644fd16cf02c4fe5b7e250c226c80f2e@ausx13mps321.AMER.DELL.COM> References: <20181108224255.GA20619@kroah.com> <20d68e586fff4dcca5616d5056f6fc21@ausx13mps321.AMER.DELL.COM> <20181108225109.GA3023@kroah.com> <16bf9d14bc5f4a90b2b88dd2eb165186@ausx13mps321.AMER.DELL.COM> <5da8d8aa9f3818af649b1ac547bc4e6062626ddf.camel@gmail.com> <20181113050240.GA182139@google.com> <19136f44cd5c45e79bbef7e78a6bf332@ausx13mps321.AMER.DELL.COM> <20181114055956.GA144931@google.com> <1eb0fa27924f426992715684f5e63346@ausx13mps321.AMER.DELL.COM> <20181114202333.GE11416@localhost.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.177.49.166] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-14_16:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811140185 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/14/2018 02:27 PM, Keith Busch wrote:=0A= > On Wed, Nov 14, 2018 at 07:22:04PM +0000, Alex_Gagniuc@Dellteam.com wrote= :=0A= >> On 11/14/2018 12:00 AM, Bjorn Helgaas wrote:=0A= >>> Just to make sure we're on the same page, can you point me to this=0A= >>> rule? I do see that OSPM must request control of AER using _OSC=0A= >>> before it touches the AER registers. What I don't see is the=0A= >>> connection between firmware-first and the AER registers.=0A= >>=0A= >> ACPI 6.2 - 6.2.11.3, Table 6-197:=0A= >>[...]=0A= >> Maybe Keith knows better why we're doing it this way. From ACPI text, it= =0A= >> doesn't seem that control of AER would be tied to HEST entries, although= =0A= >> in practice, it is.=0A= > =0A= > I'm not sure, that predates me. HEST does have a FIRMWARE_FIRST flag, bu= t=0A= > spec does not say anymore on relation to _OSC control or AER capability.= =0A= > Nothing in PCIe spec either.=0A= =0A= Speaking to one of the PCIe (and _HPX type 3) spec authors, ownership of = =0A= AER should be determined by _OSC. period. The result of _OSC applies to =0A= every device under the root port. This crap we do with checking HEST is =0A= crap.=0A= =0A= If I'm not stepping on anyone toes, and there's no known unintended =0A= consequences, I can look at patching this up. I'm not promising a patch, = =0A= though, but it's exactly the sort of thing I like to fix.=0A= =0A= > I also don't know why Linux disables the AER driver if only one=0A= > device has a FIRMWARE_FIRST HEST. Shouldn't that just be a per-device=0A= > decision?=0A= =0A= I think the logic is if one HEST entry has both FFS and GLOBAL flags =0A= set, then then disable AER services for all devices. It works in =0A= practice better than it works in theory. I think _OSC should be the =0A= determining factor here, not HEST.=0A= =0A= >>> The closest I can find is the "Enabled" field in the HEST PCIe=0A= >>> AER structures (ACPI v6.2, sec 18.3.2.4, .5, .6), where it says:=0A= >>> [...]=0A= >>> AFAICT, Linux completely ignores the Enabled field in these=0A= >>> structures.=0A= >>=0A= >> I don't think ignoring the field is a problem:=0A= >> * With FFS, OS should ignore it.=0A= >> * Without FFS, we have control, and we get to make the decisions anyw= ay.=0A= >> In the latter case we decide whether to use AER, independent of the crap= =0A= >> in ACPI. I'm not even sure why "Enabled" matters in native AER handling.= =0A= >> Probably one of the check-boxes in "Binary table designer's handbook"?= =0A= > =0A= > And why doesn't Linux do anything with _OSC response other than logging= =0A= > it? If OS control wasn't granted, shouldn't that take priority over HEST?= =0A= =0A= But it does in portdrv_core.c:=0A= =0A= if (dev->aer_cap && pci_aer_available() &&=0A= (pcie_ports_native || host->native_aer)) {=0A= services |=3D PCIE_PORT_SERVICE_AER;=0A= =0A= That flag later creates a pcie device that allows aerdrv to attach to.=0A= =0A= Alex=0A=