linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFCv4 0/4] EEH Support for VFIO PCI device
@ 2014-05-20  8:30 Gavin Shan
  2014-05-20  8:30 ` [PATCH 1/4] drivers/vfio: Introduce CONFIG_VFIO_PCI_EEH Gavin Shan
                   ` (3 more replies)
  0 siblings, 4 replies; 32+ messages in thread
From: Gavin Shan @ 2014-05-20  8:30 UTC (permalink / raw)
  To: kvm-ppc; +Cc: aik, agraf, Gavin Shan, alex.williamson, qiudayu, linuxppc-dev

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_OP) and gets handled in host kernel.

The series of patches requires corresponding QEMU changes.

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.
v3 -> v4:
        * Remove the error injection from the patchset. Mike or I will work on that
          later.
        * Rename CONFIG_VFIO_EEH to VFIO_PCI_EEH.
        * Rename the IOCTL command to VFIO_EEH_OP and it's handled by VFIO-PCI device
          instead of VFIO container.
        * Rename the IOCTL argument structure to "vfio_eeh_op" accordingly. Also, more
          fields added to hold return values for RTAS requests.
        * The address mapping stuff is totally removed. When opening or releasing VFIO
          PCI device, notification sent to EEH to update the flags indicates the device
          is passed to guest or not.
        * Change pr_warn() to pr_debug() to avoid DOS as pointed by Alex.W
        * Argument size check issue pointed by Alex.W.

Testing on P7
=============

- Emulex adapter

Testing on P8
=============
Need testing for more after the code is finalized. The logic is required by P7/P8
machines shouldn't be different.

Gavin Shan (4):
  drivers/vfio: Introduce CONFIG_VFIO_PCI_EEH
  powerpc/eeh: Flags for passed device and PE
  drivers/vfio: New IOCTL command VFIO_EEH_INFO
  powerpc/eeh: Avoid event on passed PE

 arch/powerpc/include/asm/eeh.h            |  32 +++
 arch/powerpc/kernel/eeh.c                 |   8 +
 arch/powerpc/platforms/powernv/Makefile   |   1 +
 arch/powerpc/platforms/powernv/eeh-ioda.c |   3 +-
 arch/powerpc/platforms/powernv/eeh-vfio.c | 445 ++++++++++++++++++++++++++++++
 drivers/vfio/pci/Kconfig                  |   6 +
 drivers/vfio/pci/vfio_pci.c               |  24 +-
 drivers/vfio/pci/vfio_pci_private.h       |  16 ++
 include/uapi/linux/vfio.h                 |  43 +++
 9 files changed, 571 insertions(+), 7 deletions(-)
 create mode 100644 arch/powerpc/platforms/powernv/eeh-vfio.c

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2014-06-03  7:52 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20  8:30 [PATCH RFCv4 0/4] EEH Support for VFIO PCI device Gavin Shan
2014-05-20  8:30 ` [PATCH 1/4] drivers/vfio: Introduce CONFIG_VFIO_PCI_EEH Gavin Shan
2014-05-20  8:30 ` [PATCH 2/4] powerpc/eeh: Flags for passed device and PE Gavin Shan
2014-05-20  8:30 ` [PATCH 3/4] drivers/vfio: New IOCTL command VFIO_EEH_INFO Gavin Shan
2014-05-20 11:21   ` Alexander Graf
2014-05-20 11:28     ` Alexander Graf
2014-05-20 11:40       ` Gavin Shan
2014-05-20 11:44         ` Alexander Graf
2014-05-20 12:21           ` Gavin Shan
2014-05-20 12:25             ` Alexander Graf
2014-05-20 12:39               ` Gavin Shan
2014-05-21  0:23                 ` Benjamin Herrenschmidt
2014-05-21  4:39                   ` Gavin Shan
2014-05-21  6:23                   ` Alexander Graf
2014-05-21  7:24                     ` Benjamin Herrenschmidt
2014-05-21 10:48                       ` Gavin Shan
2014-05-21  0:21               ` Benjamin Herrenschmidt
2014-05-20  8:30 ` [PATCH 4/4] powerpc/eeh: Avoid event on passed PE Gavin Shan
2014-05-20 11:25   ` Alexander Graf
2014-05-20 11:56     ` Gavin Shan
2014-05-20 12:14       ` Alexander Graf
2014-05-20 12:45         ` Gavin Shan
2014-05-20 13:49           ` Alexander Graf
2014-05-21  0:13             ` Benjamin Herrenschmidt
2014-05-21  6:16               ` Alexander Graf
2014-05-21  0:19             ` Benjamin Herrenschmidt
2014-05-21  6:20               ` Alexander Graf
2014-05-21  0:12       ` Benjamin Herrenschmidt
2014-05-21  4:41         ` Gavin Shan
2014-06-03  5:54     ` Paul Mackerras
2014-06-03  7:45       ` Alexander Graf
2014-06-03  7:52         ` Benjamin Herrenschmidt

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).