linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Avoid FLR for AMD Starship/Matisse Cryptographic Coprocessor
@ 2021-08-31  5:17 David Jaundrew
  2021-09-28 21:45 ` Bjorn Helgaas
  0 siblings, 1 reply; 10+ messages in thread
From: David Jaundrew @ 2021-08-31  5:17 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci

This patch fixes another FLR bug for the Starship/Matisse controller:

AMD Starship/Matisse Cryptogrpahic Coprocessor PSPCPP

This patch allows functions on the same Starship/Matisse device (such as USB controller,sound card) to properly pass through to a guest OS using vfio-pc. Without this patch, the virtual machine does not boot and eventually times out.

Excerpt from lspci -nn showing crypto function on same device as USB and sound card (which are already listed in quirks.c):
0e:00.1 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP [1022:1486]
0e:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller [1022:149c]
0e:00.4 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller [1022:1487]

Fix tested successfully on an Asus ROG STRIX X570-E GAMING motherboard with AMD Ryzen 9 3900X.

--- a/drivers/pci/quirks.c      2021-08-30 21:19:25.365738689 -0700
+++ b/drivers/pci/quirks.c      2021-08-30 21:21:25.802031789 -0700
@@ -5208,6 +5208,7 @@
 /*
  * FLR may cause the following to devices to hang:
  *
+ * AMD Starship/Matisse Cryptographic Coprocessor PSPCPP 0x1486
  * AMD Starship/Matisse HD Audio Controller 0x1487
  * AMD Starship USB 3.0 Host Controller 0x148c
  * AMD Matisse USB 3.0 Host Controller 0x149c
@@ -5219,6 +5220,7 @@
 {
        dev->dev_flags |= PCI_DEV_FLAGS_NO_FLR_RESET;
 }
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x1486, quirk_no_flr);
 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);

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-09-29 20:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31  5:17 [PATCH] Avoid FLR for AMD Starship/Matisse Cryptographic Coprocessor David Jaundrew
2021-09-28 21:45 ` Bjorn Helgaas
2021-09-29  0:16   ` David Jaundrew
2021-09-29  0:21     ` Krzysztof Wilczyński
2021-09-29  1:59     ` Bjorn Helgaas
2021-09-29 13:09       ` Deucher, Alexander
2021-09-29 18:26       ` Alex Williamson
2021-09-29 18:50         ` Bjorn Helgaas
2021-09-29 19:34           ` Alex Williamson
2021-09-29 20:07           ` Deucher, Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).