Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2103334pxj; Sat, 19 Jun 2021 03:03:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEes0F5AIHBC8w1v6COhSKzCH8NLJy6oUpFjPZQOySm9SI4pJso988Gd8DMEa6ifGpQUrX X-Received: by 2002:a92:c7a7:: with SMTP id f7mr1220841ilk.154.1624097009862; Sat, 19 Jun 2021 03:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624097009; cv=none; d=google.com; s=arc-20160816; b=zAUJJ4cvIcVmjgIZz46LLT58N1Mh2IVwwYofA0B+LiXneIVhJ/0JtCpJLy/BrlCp6A Vl3PkT3YvFn0OzDgqI8wRdYRTzjIq49sipbSrBsQLu/OEac+g0b0D1fxOS9ng9zXEZaq CZXrVsVwJhcThGvCpL/76pniz0zglSUiTpKPb2gpVD2BiyuC22zsUR2XZl4GrCF8v0Ml OpZGIbMywG9kGBOcugTl0tvfdB9DQtKm5c+Hnl57ttZSfomED25rE7aSq99bNhUQHw1H S+uedcStc3uqVlHOEov5Z1nV8Jg+zlCIaOSYEroI/tXg6hqBeLXpsC1JWQT+PWM2Dfn8 DQgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HyMb9zfVPpzW8ExUzx1ZaOTSw1nA/MVgvmQ53MfbDO8=; b=DV34eqQFJhWSGxpM+18jiiHBBKNcqww+kHVz+h4rh7YsEPjVDFe4qHAePt+LaAjHGr Z79TYN1rsWuAccxMBAge05Vr/pRQ9P/3H4bOGh8tqX8R4JgOTBsLhGcawltdV1wMfXcA 0MmclhVkWB9X9drN6BanJEp4VJISvfTN0eNxNzFGS2mF1YGBqmZV0FMwKMDfnXAlj2kV 6e9rfJyPGx51DWgbmfsW8CCjV3OW65IJudFtQJHSg/vCdtaTBuyIpxuQFsUvGtN89FR9 jZA1IRBV9f+7lsZ4vpwy2UcXfqL9r9ABBoXU43GgXYws2epwjJtio5c7HYx3nYYyXXt5 dvAg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f6si10415487iox.103.2021.06.19.03.03.17; Sat, 19 Jun 2021 03:03:29 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233722AbhFSH4L (ORCPT + 99 others); Sat, 19 Jun 2021 03:56:11 -0400 Received: from bmailout2.hostsharing.net ([83.223.78.240]:47017 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229466AbhFSH4K (ORCPT ); Sat, 19 Jun 2021 03:56:10 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 2AD5D2800B3C2; Sat, 19 Jun 2021 09:53:58 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 103183BD009; Sat, 19 Jun 2021 09:53:58 +0200 (CEST) Date: Sat, 19 Jun 2021 09:53:58 +0200 From: Lukas Wunner To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: David Laight , Greg KH , "linux-usb@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Marek =?iso-8859-1?Q?Beh=FAn?= Subject: Re: xhci_pci & PCIe hotplug crash Message-ID: <20210619075358.GA31639@wunner.de> References: <20210505120117.4wpmo6fhvzznf3wv@pali> <20210505123346.kxfpumww5i4qmhnk@pali> <20210505124402.GB29101@wunner.de> <20210505130240.lmryb26xffzkg4pl@pali> <20210505153942.mntbkmphw3ik3pdg@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210505153942.mntbkmphw3ik3pdg@pali> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 05, 2021 at 05:39:42PM +0200, Pali Roh?r wrote: > On Wednesday 05 May 2021 15:20:11 David Laight wrote: > > From: Pali Roh?r > > Sent: 05 May 2021 14:03 > > > So seems that PCIe controller HW triggers these external aborts when > > > device on PCIe bus is not accessible anymore. > > > > > > If this issue is really caused by MMIO access from xhci driver when > > > device is not accessible on the bus anymore, can we do something to > > > prevent this kernel crash? Somehow mask that external abort in kernel > > > for a time during MMIO access? > > > > If it is a cycle abort then the interrupted address is probably > > that of the MMIO instruction. > > So you need to catch the abort, emulate the instruction and > > then return to the next one. > > Has kernel API & infrastructure for catching these aborts and executing > own driver handler when abort happens? Yes, see here for an example: https://lore.kernel.org/linux-pci/20210615191405.21878-4-jim2101024@gmail.com/