linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] pci: virtual channel save/restore support
@ 2013-12-10 18:48 Alex Williamson
  2013-12-10 18:48 ` [PATCH 1/3] pci: Generalize wait loop Alex Williamson
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alex Williamson @ 2013-12-10 18:48 UTC (permalink / raw)
  To: bhelgaas, linux-pci; +Cc: ddutile, linux-kernel

Turns out that even though we don't do much with virtual channel, we
still need to save/restore it around reset.  The case where this comes
into play currently is a card with a switch and multiple devices, all
supporting VC (Nvidia GRID).  On some platforms the system firmware
will leave all the virtual channel capabilities in their default
state, where the VC0 TC/VC map is 0xff (TC0-7 enabled over VC0).
Other systems decide to restrict the available traffic classes and
configure 0x01 (only TC0 over VC0).  At handoff, everything works, but
as soon as we do a device reset, especially if done via bus reset, the
endpoint can be returned to the spec defined default rather than the
platform default.  If such a device is then assigned to a guest, the
guest driver sees multiple TCs enabled, attempts to use them, and it
fails.  The failure mode depends on the platform, ranging from the
driver in the guest failing to work to host panic from an unsupported
transaction.

This series attempts to implement full save/restore support for all
types of virtual channel (VC, MFVC, and VC9).  The buffer sizing code
will execute for any device with these capabilities, but of couse the
actual save/restore is only done if a reset is requested for the
device, which typically means assignment to a VM.  Thanks,

Alex

---

Alex Williamson (3):
      pci: Generalize wait loop
      pci: Add support for save/restore of extended capabilities
      pci: Add Virtual Channel to save/restore support


 drivers/pci/pci.c   |  488 ++++++++++++++++++++++++++++++++++++++++++++++++---
 include/linux/pci.h |    3 
 2 files changed, 459 insertions(+), 32 deletions(-)

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

end of thread, other threads:[~2013-12-17 22:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 18:48 [PATCH 0/3] pci: virtual channel save/restore support Alex Williamson
2013-12-10 18:48 ` [PATCH 1/3] pci: Generalize wait loop Alex Williamson
2013-12-10 18:48 ` [PATCH 2/3] pci: Add support for save/restore of extended capabilities Alex Williamson
2013-12-10 18:48 ` [PATCH 3/3] pci: Add Virtual Channel to save/restore support Alex Williamson
2013-12-17  0:48   ` Bjorn Helgaas
2013-12-17 22:12     ` Alex Williamson
2013-12-17 22:24       ` Bjorn Helgaas
2013-12-17 22:33         ` Alex Williamson
2013-12-17 22:26       ` Bjorn Helgaas
2013-12-17 18:03   ` Bjorn Helgaas
2013-12-17 20:28     ` Alex Williamson
2013-12-17 21:57       ` Bjorn Helgaas

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).