From: David Gibson <david@gibson.dropbear.id.au>
To: aik@ozlabs.ru, alex.williamson@redhat.com
Cc: agraf@suse.de, gwshan@au1.ibm.com, qemu-devel@nongnu.org,
qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PATCHv3 0/7] Allow EEH on spapr-pci-host-bridge devices
Date: Tue, 8 Mar 2016 13:10:22 +1100 [thread overview]
Message-ID: <1457403029-21322-1-git-send-email-david@gibson.dropbear.id.au> (raw)
For historical reasons, the spapr machine type has two PCI host bridge
implementations: spapr-pci-host-bridge, and
spapr-vfio-pci-host-bridge. The latter was (duh) designed for VFIO
devices, but later reworks mean it's not necessary for that, and VFIO
can be used on the regular host bridge.
The only remaining difference is that EEH (Enhanced Error Handling -
IBM's interface with similar purpose to AER) is only supported on the
spapr-vfio-pci-host-bridge device.
This series corrects this, allowing EEH operations on the regular host
bridge. That allows the special VFIO host bridge (we leave a stub,
for backwards compatibility).
EEH is only supported for VFIO devices, for the time being, and due to
bugs in the kernel implementation, it is only usable when the host
bridge only has devices from a single (host-side) IOMMU group
("Partitionable Endpoint", in IBM terminology). That's an annoying
limitation which we hope to lift someday, but it's no worse than now,
since the spapr-vfio-pci-host-bridge only permits devices from a
single IOMMU group in any case (although it doesn't properly enforce
that).
I wrote these a while back, and I'm not sure why they got sidelined -
I suspect I was looking for testing from Gavin Shan, not realising
then that he was no longer working on EEH. In any case, I'm hoping we
can squeeze this change into 2.6, so we don't need to carry the broken
spapr-vfio-pci-host-bridge device any longer.
This series applies on top of a merge of my current ppc-for-2.6 tree
and Alex Williamson's "[PATCH 0/6] vfio: Prep for vGPU & IGD" series.
Alex,
You've indicated that once your concerns on the last version were
addressed, you're ok with me taking the vfio patches through my tree.
Assuming you're happy with this revision, can I please get an
Acked-by.
Changes since v2:
* Revised some comments and error messages to be more accurate and
informative.
* Don't use an assert() in vfio_eeh_as_op(), instead return -ENODEV
if the AS isn't suitable for VFIO.
Changes since v1:
* Don't consider containers with no groups as being able to support
EEH, which is a safer option
* To avoid build problems on non-Linux hosts, I no longer merge most
of the code into spapr_pci.c, instead leaving it in helpers in
spapr_pci_vfio.c, just no longer part of its own special device
type (this approach suggested by Alexey Kardashevskiy).
David Gibson (7):
vfio: Start improving VFIO/EEH interface
spapr_pci: Switch to vfio_eeh_as_op() interface
spapr_pci: Eliminate class callbacks
spapr_pci: Allow EEH on spapr-pci-host-bridge
spapr_pci: (Mostly) remove spapr-pci-vfio-host-bridge
spapr_pci: Remove finish_realize hook
vfio: Eliminate vfio_container_ioctl()
hw/ppc/spapr_pci.c | 63 +++++++--------------
hw/ppc/spapr_pci_vfio.c | 131 +++++++++++++++-----------------------------
hw/vfio/common.c | 112 ++++++++++++++++++++++++++-----------
include/hw/pci-host/spapr.h | 64 +++++++++++++---------
include/hw/vfio/vfio.h | 4 +-
5 files changed, 184 insertions(+), 190 deletions(-)
--
2.5.0
next reply other threads:[~2016-03-08 2:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 2:10 David Gibson [this message]
2016-03-08 2:10 ` [Qemu-devel] [PATCHv3 1/7] vfio: Start improving VFIO/EEH interface David Gibson
2016-03-08 18:33 ` Alex Williamson
2016-03-09 0:56 ` David Gibson
2016-03-09 1:36 ` Alex Williamson
2016-03-08 2:10 ` [Qemu-devel] [PATCHv3 2/7] spapr_pci: Switch to vfio_eeh_as_op() interface David Gibson
2016-03-08 2:10 ` [Qemu-devel] [PATCHv3 3/7] spapr_pci: Eliminate class callbacks David Gibson
2016-03-08 2:10 ` [Qemu-devel] [PATCHv3 4/7] spapr_pci: Allow EEH on spapr-pci-host-bridge David Gibson
2016-03-08 2:10 ` [Qemu-devel] [PATCHv3 5/7] spapr_pci: (Mostly) remove spapr-pci-vfio-host-bridge David Gibson
2016-03-08 2:10 ` [Qemu-devel] [PATCHv3 6/7] spapr_pci: Remove finish_realize hook David Gibson
2016-03-08 2:10 ` [Qemu-devel] [PATCHv3 7/7] vfio: Eliminate vfio_container_ioctl() David Gibson
2016-03-08 18:34 ` 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=1457403029-21322-1-git-send-email-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=gwshan@au1.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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;
as well as URLs for NNTP newsgroup(s).