Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1578968pxf; Fri, 12 Mar 2021 13:12:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyKLO7imf62clGvY+s+bxEJlhZr4zloAQ7veUVpXI2/3jnBS/NPkxthdZUnbbj2SgOMt2Jq X-Received: by 2002:aa7:df14:: with SMTP id c20mr16482976edy.197.1615583559668; Fri, 12 Mar 2021 13:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615583559; cv=none; d=google.com; s=arc-20160816; b=AvNcG1hSPbZzGQEKvCXNGVt9rZ4mCojTC67NPVG93LRnt0049//EXU/wq+K0rIRuv9 5htzUXXsxgSxF/8kpqCBRRKDRspkTHCaClnnn1va0K+Z7IrFx+m4THAsjamfrxGFUKK6 ijk2tUVAvKs9Y/+F+s/g5YsH74wDwAlVHAuJEYmnxzirG5esJ/Y1lP5ukO+xKH4GjqeA PQgBHkZzsPVxaYof8LFWpLE1pT/x1Nb341bx9+qWDSVylB2Vds5ROdKr0jU5H7ojlf5N BUaj42iBS2wiwdTeRhZWZ2BIc1uLFZf+slMTW/+0ENgOl11xwQKZRkUIcIqk5cwzBequ z8bA== 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-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=XDBj0fXwAxi9qmQ9NekFUm1NfwJ7cblkvAB5aj1vo4g=; b=KV0upZlNACScSMPk9zwuNPw+1Jq+1SGMSjXfsRKORAgrUwU1SLFAV1uZ7MZQgNRHp1 T++ZeKKmaMS1PfyuCWpCznCBOx1DZp5uJn4EEtTKpYoPpcSjnDwBsvpQDvO7+cbE9Wk0 ePsAW9Pwee0J56tQLBHv6K/Ow55SPIJM8IhPiDVCI2lg5MJ3OjDohd1jyZBoNjP1Nc9T d8xcqDeWlKRkaWbg+/dXtLzfWushuBDvTwl/J9NdNAMo7NXZDdDZ+K0AC21nwMLuCUJH 9C4y0wqfEyq3G8Pr6+7tEJ9v6js4a9aSVb/F3KUJb3Hf+tv7XBjHEa45DIwXvhE0bclc dFTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kYCX8BFC; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y10si5215357edv.94.2021.03.12.13.12.16; Fri, 12 Mar 2021 13:12:39 -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=@kernel.org header.s=k20201202 header.b=kYCX8BFC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235127AbhCLVJt (ORCPT + 99 others); Fri, 12 Mar 2021 16:09:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:41328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235126AbhCLVJT (ORCPT ); Fri, 12 Mar 2021 16:09:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EA06264EF2; Fri, 12 Mar 2021 21:09:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615583359; bh=2N2ztC788SQbCuYFCkp/J92j6XWqG+f7aPQnOJz6HRI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=kYCX8BFCWc0ElvYGsar6D0FWraDj7ShI/F7iOE2Fibe1ZawhE9OKCO3pWvVf952ls HDWgBXW2knX459ELgJ8G04RcsviPo/bzvOQJo5Y0VtyzCS0Q1wFHU5QR5o9azg8oXj J+OuKE68FD/FhYoSZoTmj/9ECqBjPbPxfh/O0sq/3WCFNSCSMHaM4TwJpb324Ab7aS V6+nU0Za7SiThxxECORekb04lVcQv7WrG/9S63k9ihrfSIwDl90atM7y4gDzrkYzN7 cAz4t4wY13XDSnzFPX93qkS7Zo1y/ej+8cCzNI6j+qTYegGuHB1wB286O/Q2odX738 ihtdL9+VXVnJQ== Date: Fri, 12 Mar 2021 15:09:17 -0600 From: Bjorn Helgaas To: Antti =?iso-8859-1?Q?J=E4rvinen?= Cc: kw@linux.com, alex.williamson@redhat.com, bhelgaas@google.com, kishon@ti.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, m-karicheri2@ti.com Subject: Re: [PATCH v3] PCI: Add quirk for preventing bus reset on TI C667X Message-ID: <20210312210917.GA2290948@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210308142130.13835-1-antti.jarvinen@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 08, 2021 at 02:21:30PM +0000, Antti J?rvinen wrote: > Some TI KeyStone C667X devices do no support bus/hot reset. Its PCIESS > automatically disables LTSSM when secondary bus reset is received and > device stops working. Prevent bus reset by adding quirk_no_bus_reset to > the device. With this change device can be assigned to VMs with VFIO, > but it will leak state between VMs. s/do no/do/not/ (also in the comment below) Does the user get any indication of this leaking state? I looked through drivers/vfio and drivers/pci, but I haven't found anything yet. We *could* log something in quirk_no_bus_reset(), but that would just be noise for people who don't pass the device through to a VM. So maybe it would be nicer if we logged something when we actually *do* pass it through to a VM. > Reference: https://e2e.ti.com/support/processors/f/791/t/954382 > Signed-off-by: Antti J?rvinen > --- > drivers/pci/quirks.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index 653660e3ba9e..d9201ad1ca39 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -3578,6 +3578,16 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, quirk_no_bus_reset); > */ > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CAVIUM, 0xa100, quirk_no_bus_reset); > > +/* > + * Some TI keystone C667X devices do no support bus/hot reset. > + * Its PCIESS automatically disables LTSSM when secondary bus reset is > + * received and device stops working. Prevent bus reset by adding > + * quirk_no_bus_reset to the device. With this change device can be > + * assigned to VMs with VFIO, but it will leak state between VMs. > + * Reference https://e2e.ti.com/support/processors/f/791/t/954382 > + */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0xb005, quirk_no_bus_reset); > + > static void quirk_no_pm_reset(struct pci_dev *dev) > { > /* > -- > 2.17.1 >