All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] pci: virtual channel save/restore support
@ 2013-12-17 23:43 Alex Williamson
  2013-12-17 23:43 ` [PATCH v2 1/4] pci: Generalize wait loop Alex Williamson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alex Williamson @ 2013-12-17 23:43 UTC (permalink / raw)
  To: bhelgaas, linux-pci; +Cc: ddutile, linux-kernel

v1->v2:

Address Bjorn's comments
 - split code out to vc.c
 - #defines for everything
 - rename VC defines
 - fix word access to PCI_VC_PORT_CTRL

It ended up getting a little bigger since I added function description
comments, header, includes and misc lines here and there.

v1:

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 (4):
      pci: Generalize wait loop
      pci: Add support for save/restore of extended capabilities
      pci: Add Virtual Channel to save/restore support
      pci: Rename PCI_VC_PORT_REG1/2 to PCI_VC_PORT_CAP1/2


 drivers/pci/Makefile               |    2 
 drivers/pci/pci.c                  |  102 ++++++--
 drivers/pci/vc.c                   |  434 ++++++++++++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_pci_config.c |   12 -
 include/linux/pci.h                |   15 +
 include/uapi/linux/pci_regs.h      |   29 ++
 6 files changed, 549 insertions(+), 45 deletions(-)
 create mode 100644 drivers/pci/vc.c

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-17 23:43 [PATCH v2 0/4] pci: virtual channel save/restore support Alex Williamson
2013-12-17 23:43 ` [PATCH v2 1/4] pci: Generalize wait loop Alex Williamson
2013-12-17 23:43 ` [PATCH v2 2/4] pci: Add support for save/restore of extended capabilities Alex Williamson
2013-12-17 23:43 ` [PATCH v2 3/4] pci: Add Virtual Channel to save/restore support Alex Williamson
2013-12-17 23:43 ` [PATCH v2 4/4] pci: Rename PCI_VC_PORT_REG1/2 to PCI_VC_PORT_CAP1/2 Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.