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, agraf@suse.de,
	Gavin Shan <gwshan@linux.vnet.ibm.com>,
	alex.williamson@redhat.com, qemu-ppc@nongnu.org,
	david@gibson.dropbear.id.au
Subject: [Qemu-devel] [PATCH v17 0/2] EEH Support for VFIO Devices
Date: Wed, 11 Feb 2015 14:13:58 +1100	[thread overview]
Message-ID: <1423624440-30212-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, which was merged during 3.17
merge window. This patchset has been rebased to Alex Graf's QEMU repository:

   git://github.com/agraf/qemu.git (branch: ppc-next)

The implementations notes are below. Please consider for merging!

* 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 callback is defined, it is called.
* sPAPRPHBClass EEH callbacks are 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
=========
v12 -> v13:
    * Rebase to Alex Graf's QEMU repository ("ppc-next" branch).
    * Drop the patch for header file (vfio.h) changes, which was merged
      to QEMU repository by commit a9fd1654 ("linux-headers: update to 3.17-rc7").
    * Retested on Emulex adapter and EEH errors are recovered successfully.
v13 -> v14:
    * Check if sPAPRPHBState instance is valid before converting it to the
      corresponding class as pointed by Alex Graf.
v14 -> v15:
    * Dropped unrelated patch making find_phb()/find_dev() public.
    * Checking RTAS parameter number before accessing RTAS parameter buffer for
      more safety.
    * Return hardware error from RTAS call "ibm,set-eeh-option" and "ibm,set-slot-reset"
      for some cases according to PAPR spec.
v15 -> v16:
    * Drop rtas_handle_eeh_request() and merge the logic to its callers so that
      more accurate return values can be returned for RTAS calls in the callers
    * Always return 1 ("No error log") for RTAS call "ibm,slot-error-detail" and
      correct wrong return values for other RTAS calls according to David Gibson's
      suggestions.
    * Make fall-through more obvious for case of negative return value from
      sPAPRPHBClass::eeh_handler()
    * Clear the argument buffer passed to ioctl()
    * Rename sPAPRPHBClass variable from "info" to "spc"
v16 -> v17:
    * Split sPAPRPHBClass::eeh_handler() to multiple callbacks according to David
      Gibson's suggestion
    * Make comments for the form of PE address more precise and merge the condition
      checking on the option in rtas_ibm_get_config_addr_info2() to improve code
      readability
    * Return RTAS_OUT_PARAM_ERROR for invalid number of arguments to function
      rtas_ibm_slot_error_detail(), which is inconsistent with PAPR spec

Gavin Shan (2):
  sPAPR: Implement EEH RTAS calls
  sPAPR: Implement sPAPRPHBClass EEH callbacks

 hw/ppc/spapr_pci.c          | 295 ++++++++++++++++++++++++++++++++++++++++++++
 hw/ppc/spapr_pci_vfio.c     |  98 +++++++++++++++
 hw/vfio/common.c            |   1 +
 include/hw/pci-host/spapr.h |   4 +
 include/hw/ppc/spapr.h      |  43 ++++++-
 5 files changed, 439 insertions(+), 2 deletions(-)

-- 
1.8.3.2

             reply	other threads:[~2015-02-11  3:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11  3:13 Gavin Shan [this message]
2015-02-11  3:13 ` [Qemu-devel] [PATCH v17 1/2] sPAPR: Implement EEH RTAS calls Gavin Shan
2015-02-12  5:15   ` David Gibson
2015-02-12  6:07     ` Gavin Shan
2015-02-11  3:14 ` [Qemu-devel] [PATCH v17 2/2] sPAPR: Implement sPAPRPHBClass EEH callbacks 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=1423624440-30212-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=david@gibson.dropbear.id.au \
    --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).