From: Alex Williamson <alex.williamson@redhat.com>
To: bhelgaas@google.com
Cc: linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/8] pci: extended reset capabilities
Date: Wed, 01 May 2013 12:42:56 -0600 [thread overview]
Message-ID: <20130501181828.28515.68783.stgit@bling.home> (raw)
PCI currently provides pci_reset_function() which will try several
reset mechanisms including PCIe FLR, AF FLR, PM reset, and only if
none of those are available and the device is alone on the bus, a
secondary bus reset. This is rather limiting because many devices
don't support FLR and don't have useful PM resets. A driver, like
vfio, that may control all of the devices on a bus needs an interface
to reset a bus even if it has multiple devices.
This series adds pci_reset_slot() and pci_reset_bus() to allow that.
pci_reset_slot() also corrects a problem in the secondary bus reset
path where a bridge supporting pciehp with surprise removal may
detect a device presence change during secondary bus reset and
attempt to remove and re-add the device. This series allows a driver
to determine which reset mechanisms are available for a device and
upgrade to a slot or bus reset depending on what the platform drivers
support.
I still need to integrate this all the way through to vfio, but I'd
like some feedback on the PCI changes before investing too much in
that. I'm finding with attempting to support graphics devices
exposed through vfio that they are typically multifunction devices
(func0 = gfx, func1 = audio) where both devices are grouped in the
same iommu group, thus vfio controls both of them. They don't
support any kind of FLR and a PM reset does nothing. Also, host
drivers or even userspace drivers, leave the device in an unusable
state, so many users are having problems. I think these interfaces
should significantly improve our repeatability for such devices.
Thanks,
Alex
---
Alex Williamson (8):
pci: Create pci_reset_bridge_secondary_bus()
pci: Add hotplug_slot_ops.reset_slot()
pci: Add pci_hp_reset_slot
pci: Implement reset_slot for pciehp
pci: Add reset_slot option to pci_dev_reset
pci: Split out pci_dev lock/unlock and save/restore
pci: Add slot and bus reset interfaces
pci: Add reset probe functions
drivers/pci/hotplug/pci_hotplug_core.c | 24 ++
drivers/pci/hotplug/pciehp.h | 1
drivers/pci/hotplug/pciehp_core.c | 12 +
drivers/pci/hotplug/pciehp_hpc.c | 31 +++
drivers/pci/pci.c | 341 ++++++++++++++++++++++++++++++--
include/linux/pci.h | 6 +
include/linux/pci_hotplug.h | 12 +
7 files changed, 401 insertions(+), 26 deletions(-)
next reply other threads:[~2013-05-01 18:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 18:42 Alex Williamson [this message]
2013-05-01 18:43 ` [RFC PATCH 1/8] pci: Create pci_reset_bridge_secondary_bus() Alex Williamson
2013-05-01 18:43 ` [RFC PATCH 2/8] pci: Add hotplug_slot_ops.reset_slot() Alex Williamson
2013-05-01 18:43 ` [RFC PATCH 3/8] pci: Add pci_hp_reset_slot Alex Williamson
2013-05-01 18:43 ` [RFC PATCH 4/8] pci: Implement reset_slot for pciehp Alex Williamson
2013-05-01 18:43 ` [RFC PATCH 5/8] pci: Add reset_slot option to pci_dev_reset Alex Williamson
2013-05-01 18:43 ` [RFC PATCH 6/8] pci: Split out pci_dev lock/unlock and save/restore Alex Williamson
2013-05-01 18:43 ` [RFC PATCH 7/8] pci: Add slot and bus reset interfaces Alex Williamson
2013-05-01 18:43 ` [RFC PATCH 8/8] pci: Add reset probe functions Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130501181828.28515.68783.stgit@bling.home \
--to=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®