qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: aik@ozlabs.ru, alex.williamson@redhat.com, agraf@suse.de,
	Gavin Shan <gwshan@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v11 0/3] EEH Support for VFIO PCI Devices
Date: Thu, 26 Jun 2014 11:35:35 +1000	[thread overview]
Message-ID: <1403746538-12487-1-git-send-email-gwshan@linux.vnet.ibm.com> (raw)

The series of patches adds support EEH for VFIO PCI devices on sPAPR platform.
It requires corresponding host kernel support. Also, it is based on top of
Alexey's VFIO-for-sPAPR git repository.

QEMU:   git://github.com/aik/qemu.git (branch: vfio)
Kernel: git://github.com/aik/linux.git (branch: vfio)
Kernel: http://linuxppc.10917.n7.nabble.com/PATCH-v10-0-3-EEH-Support-for-VFIO-PCI-Device-td83042.html

The implementations notes are below. Please comment.

* RTAS calls are received in spapr_pci.c, sanity check is done there. RTAS
  handlers handle what they can. If there is something it cannot handle and
  sPAPRPHBClass::eeh_handler callback is defined, it is called.
* sPAPRPHBClass::eeh_handler is only implemented for VFIO now. It does ioctl()
  to the IOMMU container fd to complete the call. Error codes from that ioctl()
  are transferred back to the guest.

Changelog
=========
v8 -> v9:
        * Update kernel header (vfio.h) according to changes applied to kerenl.
        * Rename rtas_finish_eeh_request() to rtas_handle_eeh_request().
        * vfio_pci_container_ioctl() moved to Alexey's VFIO patchset.
v9 -> v10:
        * Make sure we have zero struct vfio_eeh_pe_op::flags
v10 -> v11:
	* Don't explicitly set struct vfio_eeh_pe_op::flags to 0.
	* rtas_handle_eeh_request() checks the validity of sPAPRPHBState and
          sPAPRPHBClass::eeh_handler.
	* The first level functions set the RTAS call return value.
	* Replace "if (...)" with "switch (...)".

Gavin Shan (3):
  sPAPR: Implement EEH RTAS calls
  headers: Update kernel header
  sPAPR: Implement sPAPRPHBClass::eeh_handler

 hw/ppc/spapr_pci.c          | 240 ++++++++++++++++++++++++++++++++++++++++++++
 hw/ppc/spapr_pci_vfio.c     |  56 +++++++++++
 include/hw/pci-host/spapr.h |   7 ++
 include/hw/ppc/spapr.h      |  33 ++++++
 linux-headers/linux/vfio.h  |  34 +++++++
 5 files changed, 370 insertions(+)

-- 
1.8.3.2

             reply	other threads:[~2014-06-26  1:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26  1:35 Gavin Shan [this message]
2014-06-26  1:35 ` [Qemu-devel] [PATCH v11 1/3] sPAPR: Implement EEH RTAS calls Gavin Shan
2014-06-26 10:30   ` Alexander Graf
2014-06-26 10:43     ` Gavin Shan
2014-06-26 10:46       ` Alexander Graf
2014-06-27  9:53         ` Gavin Shan
2014-06-27 11:46           ` Alexander Graf
2014-06-26  1:35 ` [Qemu-devel] [PATCH v11 2/3] headers: Update kernel header Gavin Shan
2014-06-26  1:35 ` [Qemu-devel] [PATCH v11 3/3] sPAPR: Implement sPAPRPHBClass::eeh_handler Gavin Shan

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=1403746538-12487-1-git-send-email-gwshan@linux.vnet.ibm.com \
    --to=gwshan@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=qemu-devel@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).