Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp992977ybt; Fri, 19 Jun 2020 20:53:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwitQdoZ6vo048cI7VlEKPvyBpGbY2fa6EVmBcOfxVZ9ozK87GQV02EtvR952yPDpHsO5S X-Received: by 2002:a17:906:148b:: with SMTP id x11mr6776222ejc.282.1592625215718; Fri, 19 Jun 2020 20:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592625215; cv=none; d=google.com; s=arc-20160816; b=PerKm1QSnXTYoeuFHvygyIBPsjFvxtCFxtQWXLlfWE7/8o1mUVNYfkXUI9xna8gxFA YnL0+0rRWsg3EEYFCNQav1gP2kdWrv/M3uhEPjKKbMa9PeAPvWfyLBHYubNmGExF+s7o OpQJyY6CScYZawlgSmYFxVkRmnIHv8jpWVqAUcaXJMAtFhhzgQSdbDpTk9wcurDp5u6c Yuz1S+bSIMha6MGKPEygnDnNeoI2KNzyz2Ig1hhLRW9CMnzzvYS6vblIBZAUq1xgqJNr p5Zf3qGhQo8ab8jLomBNaBaVPkrWQVfi3b4dchLhOSRDbXDLzGfMPQCGJQq3NYv2qZVe y/sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=30f6mvldflOS3BKYV0vyHY/0xLZD+WVGRmapRA5Gro4=; b=KTgcJRVt8MfGFmXDAJa4a0Qh9+FMsIxi9qS16AVoOtOctvIXI+Z6LyCxbla5yeG8Ps HDlD+eia5CCGt4MVjzTGMI7Ee4g1N18RIokwJ98+pJGTz2xutFUeUW7vAPjZdw1k5L6F Gs4a5aOc4OJabHSt6xADmqV8yFOB2+niFIVQ3aadfdEjgZJKitOJ+zlf/DPMCsZ5TNpf QdYYiINIk/XvliEqdCxvvx+vRKUl8BHIM6zAeEhsaDeC59NYvc+d6ahg3UokfPNOZZ+7 349kJgAA93/c3YNVbbGYQDbf+SpDtfRIiwY9tP1HWgttdhcVByUuVexm7ZER9u+SEaTF YFqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uC8TlDVJ; 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 y14si4981144edu.550.2020.06.19.20.53.14; Fri, 19 Jun 2020 20:53:35 -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; dkim=pass header.i=@kernel.org header.s=default header.b=uC8TlDVJ; 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 S2394629AbgFSQUA (ORCPT + 99 others); Fri, 19 Jun 2020 12:20:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:58128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390737AbgFSPBo (ORCPT ); Fri, 19 Jun 2020 11:01:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BB58F21841; Fri, 19 Jun 2020 15:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578903; bh=qrid19kxZaqA3ldtv5abpdqcKtq/ehLJHOG8ghrjLDY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uC8TlDVJS6Kel7Oo98SA+h2P5TYftE/IzKiQFZIwsIIHeaL5dzodlM0dMz4hh4vxc taYaDZvjA7J1HZ30r86zHdsrG1yvhlZUd6zd1mX93vvA5exaIm/clDnkW6f/slfgwR 92ltFgRbEkY7xoRfJ7jBAsBbtS6lmEIaRX5bYl70= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kevin Buettner , Bjorn Helgaas , Sasha Levin Subject: [PATCH 4.19 201/267] PCI: Avoid FLR for AMD Starship USB 3.0 Date: Fri, 19 Jun 2020 16:33:06 +0200 Message-Id: <20200619141658.388542382@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141648.840376470@linuxfoundation.org> References: <20200619141648.840376470@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kevin Buettner [ Upstream commit 5727043c73fdfe04597971b5f3f4850d879c1f4f ] The AMD Starship USB 3.0 host controller advertises Function Level Reset support, but it apparently doesn't work. Add a quirk to prevent use of FLR on this device. Without this quirk, when attempting to assign (pass through) an AMD Starship USB 3.0 host controller to a guest OS, the system becomes increasingly unresponsive over the course of several minutes, eventually requiring a hard reset. Shortly after attempting to start the guest, I see these messages: vfio-pci 0000:05:00.3: not ready 1023ms after FLR; waiting vfio-pci 0000:05:00.3: not ready 2047ms after FLR; waiting vfio-pci 0000:05:00.3: not ready 4095ms after FLR; waiting vfio-pci 0000:05:00.3: not ready 8191ms after FLR; waiting And then eventually: vfio-pci 0000:05:00.3: not ready 65535ms after FLR; giving up INFO: NMI handler (perf_event_nmi_handler) took too long to run: 0.000 msecs perf: interrupt took too long (642744 > 2500), lowering kernel.perf_event_max_sample_rate to 1000 INFO: NMI handler (perf_event_nmi_handler) took too long to run: 82.270 msecs INFO: NMI handler (perf_event_nmi_handler) took too long to run: 680.608 msecs INFO: NMI handler (perf_event_nmi_handler) took too long to run: 100.952 msecs ... watchdog: BUG: soft lockup - CPU#3 stuck for 22s! [qemu-system-x86:7487] Tested on a Micro-Star International Co., Ltd. MS-7C59/Creator TRX40 motherboard with an AMD Ryzen Threadripper 3970X. Link: https://lore.kernel.org/r/20200524003529.598434ff@f31-4.lan Signed-off-by: Kevin Buettner Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/quirks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 7a835c49409e..92892b1c35fa 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -4960,6 +4960,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap); * FLR may cause the following to devices to hang: * * AMD Starship/Matisse HD Audio Controller 0x1487 + * AMD Starship USB 3.0 Host Controller 0x148c * AMD Matisse USB 3.0 Host Controller 0x149c * Intel 82579LM Gigabit Ethernet Controller 0x1502 * Intel 82579V Gigabit Ethernet Controller 0x1503 @@ -4970,6 +4971,7 @@ static void quirk_no_flr(struct pci_dev *dev) dev->dev_flags |= PCI_DEV_FLAGS_NO_FLR_RESET; } DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x1487, quirk_no_flr); +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x148c, quirk_no_flr); DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x149c, quirk_no_flr); DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_no_flr); DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_no_flr); -- 2.25.1