linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: aik@ozlabs.ru, agraf@suse.de, kvm-ppc@vger.kernel.org,
	alex.williamson@redhat.com, qiudayu@linux.vnet.ibm.com,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH RFC v3 0/8] EEH Support for VFIO PCI device
Date: Mon, 19 May 2014 20:07:05 +1000	[thread overview]
Message-ID: <20140519100705.GA13624@shangw> (raw)
In-Reply-To: <1400040722-29608-1-git-send-email-gwshan@linux.vnet.ibm.com>

On Wed, May 14, 2014 at 02:11:54PM +1000, Gavin Shan wrote:

Ping, Alex.G and Alex.W. Could you please take a look on this when
you have available bandwidth? Thanks in advance for your time :-)

>The series of patches intends to support EEH for PCI devices, which are
>passed through to PowerKVM based guest via VFIO. The implementation is
>straightforward based on the issues or problems we have to resolve to
>support EEH for PowerKVM based guest.
>
>- Emulation for EEH RTAS requests. All EEH RTAS requests goes to QEMU firstly.
>  If QEMU can't handle it, the request will be sent to host via newly introduced
>  VFIO container IOCTL command (VFIO_EEH_INFO) and gets handled in host kernel.
>
>- The error injection infrastructure need support request from the userland
>  utility "errinjct" and PowerKVM based guest. The userland utility "errinjct"
>  works on pSeries platform well with dedicated syscall, which helps invoking
>  RTAS service to fulfil error injection in kernel. From the perspective, it's
>  reasonable to extend the syscall to support PowerNV platform so that OPAL call
>  can be invoked in host kernel for injecting errors. The data transported
>  between userland and kerenl is still following "struct rtas_args" for both
>  cases of PowerNV (OPAL) and pSeries (RTAS).
>
>The series of patches requires corresponding firmware changes from Mike Qiu to
>support error injection and QEMU changes to support EEH for guest. QEMU patchset
>will be sent separately.
>
>Change log
>==========
>v1 -> v2:
>	* EEH RTAS requests are routed to QEMU, and then possiblly to host kerenl.
>	  The mechanism KVM in-kernel handling is dropped.
>	* Error injection is reimplemented based syscall, instead of KVM in-kerenl
>	  handling. The logic for error injection token management is moved to
>	  QEMU. The error injection request is routed to QEMU and then possiblly
>	  to host kernel.
>v2 -> v3:
>	* Make the fields in struct eeh_vfio_pci_addr, struct vfio_eeh_info based
>	  on the comments from Alexey.
>	* Define macros for EEH VFIO operations (Alexey).
>	* Clear frozen state after successful PE reset.
>	* Merge original [PATCH 1/2/3] to one.
>
>Testing on P7
>=============
>
>- Emulex adapter
>
>Testing on P8
>=============
>
>- Need more testing after design is finalized.
>
>-----
>
>Gavin Shan (8):
>  drivers/vfio: Introduce CONFIG_VFIO_EEH
>  powerpc/eeh: Info to trace passed devices
>  drivers/vfio: New IOCTL command VFIO_EEH_INFO
>  powerpc/eeh: Avoid event on passed PE
>  powerpc/powernv: Sync OPAL header file with firmware
>  powerpc: Extend syscall ppc_rtas()
>  powerpc/powernv: Implement ppc_call_opal()
>  powerpc/powernv: Error injection infrastructure
>
> arch/powerpc/include/asm/eeh.h                 |  52 +++
> arch/powerpc/include/asm/opal.h                |  74 ++-
> arch/powerpc/include/asm/rtas.h                |  10 +-
> arch/powerpc/include/asm/syscalls.h            |   2 +-
> arch/powerpc/include/asm/systbl.h              |   2 +-
> arch/powerpc/include/uapi/asm/unistd.h         |   2 +-
> arch/powerpc/kernel/eeh.c                      |   8 +
> arch/powerpc/kernel/eeh_pe.c                   |  80 ++++
> arch/powerpc/kernel/rtas.c                     |  57 +--
> arch/powerpc/kernel/syscalls.c                 |  50 +++
> arch/powerpc/platforms/powernv/Makefile        |   3 +-
> arch/powerpc/platforms/powernv/eeh-ioda.c      |   3 +-
> arch/powerpc/platforms/powernv/eeh-vfio.c      | 593 +++++++++++++++++++++++++
> arch/powerpc/platforms/powernv/errinject.c     | 224 ++++++++++
> arch/powerpc/platforms/powernv/opal-wrappers.S |   1 +
> arch/powerpc/platforms/powernv/opal.c          |  93 ++++
> drivers/vfio/Kconfig                           |   6 +
> drivers/vfio/vfio_iommu_spapr_tce.c            |  12 +
> include/uapi/linux/vfio.h                      |  57 +++
> kernel/sys_ni.c                                |   2 +-
> 20 files changed, 1278 insertions(+), 53 deletions(-)
> create mode 100644 arch/powerpc/platforms/powernv/eeh-vfio.c
> create mode 100644 arch/powerpc/platforms/powernv/errinject.c
>

Thanks,
Gavin

      parent reply	other threads:[~2014-05-19 10:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14  4:11 [PATCH RFC v3 0/8] EEH Support for VFIO PCI device Gavin Shan
2014-05-14  4:11 ` [PATCH 1/8] drivers/vfio: Introduce CONFIG_VFIO_EEH Gavin Shan
2014-05-14  4:11 ` [PATCH 2/8] powerpc/eeh: Info to trace passed devices Gavin Shan
2014-05-19 12:46   ` Alexander Graf
2014-05-19 22:37     ` Benjamin Herrenschmidt
2014-05-19 23:54       ` Gavin Shan
2014-05-14  4:11 ` [PATCH 3/8] drivers/vfio: New IOCTL command VFIO_EEH_INFO Gavin Shan
2014-05-19 12:51   ` Alexander Graf
2014-05-19 23:57     ` Gavin Shan
2014-05-19 22:33   ` Alex Williamson
2014-05-19 22:51     ` Benjamin Herrenschmidt
2014-05-20  0:22     ` Gavin Shan
2014-05-20  0:37       ` Alex Williamson
2014-05-20  8:28         ` Gavin Shan
2014-05-20 10:02           ` Alexander Graf
2014-05-20 10:23             ` Gavin Shan
2014-05-14  4:11 ` [PATCH 4/8] powerpc/eeh: Avoid event on passed PE Gavin Shan
2014-05-14  4:11 ` [PATCH 5/8] powerpc/powernv: Sync OPAL header file with firmware Gavin Shan
2014-05-14  4:12 ` [PATCH 6/8] powerpc: Extend syscall ppc_rtas() Gavin Shan
2014-05-19 12:55   ` Alexander Graf
2014-05-19 22:38     ` Benjamin Herrenschmidt
2014-05-14  4:12 ` [PATCH 7/8] powerpc/powernv: Implement ppc_call_opal() Gavin Shan
2014-05-19 12:59   ` Alexander Graf
2014-05-14  4:12 ` [PATCH 8/8] powerpc/powernv: Error injection infrastructure Gavin Shan
2014-05-19 13:04   ` Alexander Graf
2014-05-19 22:40     ` Benjamin Herrenschmidt
2014-05-15  6:34 ` [PATCH RFC v3 0/8] EEH Support for VFIO PCI device Mike Qiu
2014-05-15  7:43   ` Gavin Shan
2014-05-19 10:07 ` Gavin Shan [this message]

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=20140519100705.GA13624@shangw \
    --to=gwshan@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=qiudayu@linux.vnet.ibm.com \
    /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).