Skip to content

ocxl: Support for an 0penCAPI device in a QEMU guest.

christophe lombard linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ocxl: Introduce implementation-specific APIdrivers/misc/ocxl/Makefile drivers/misc/ocxl/config.c drivers/misc/ocxl/link.c +3 more+138 -190 replies
2/3ocxl: Add pseries-specific codedrivers/misc/ocxl/Makefile drivers/misc/ocxl/main.c drivers/misc/ocxl/ocxl_internal.h +1 more+456 -01 reply
3/3powerpc/pseries: Fixup config space size of OpenCAPI devicesarch/powerpc/platforms/pseries/pci.c+9 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] ocxl: Support for an 0penCAPI device in a QEMU guest.

This series adds support for an 0penCAPI device in a QEMU guest.

It builds on top of the existing ocxl driver +
http://patchwork.ozlabs.org/patch/1177999/

The ocxl module registers either a pci driver or a platform driver, based on the environment (bare-metal (powernv) or pseries).

Roughly 4/5 of the code is common between the 2 types of driver:
- PCI implementation
- mmio operations
- link management
- sysfs folders
- page fault and context handling

The differences in implementation are essentially based on the interact with the opal api(s) defined in the host. Several hcalls have been defined (extension of the PAPR) to:
- configure the Sceduled Process Area
- get specific AFU information
- allocated irq
- handle page fault and process element

When the code needs to call a platform-specific implementation, it does so through an API. The powervn and pseries implementations each describe their own definition. See struct ocxl_backend_ops.

It has been tested in a bare-metal and QEMU environment using the memcpy and the AFP AFUs.

christophe lombard (3):
ocxl: Introduce implementation-specific API
ocxl: Add pseries-specific code
powerpc/pseries: Fixup config space size of OpenCAPI devices

 arch/powerpc/platforms/pseries/pci.c |   9 +
 drivers/misc/ocxl/Makefile           |   3 +
 drivers/misc/ocxl/config.c           |   7 +-
 drivers/misc/ocxl/link.c             |  31 +-
 drivers/misc/ocxl/main.c             |   9 +
 drivers/misc/ocxl/ocxl_internal.h    |  25 ++
 drivers/misc/ocxl/powernv.c          |  88 ++++++
 drivers/misc/ocxl/pseries.c          | 450 +++++++++++++++++++++++++++
 8 files changed, 603 insertions(+), 19 deletions(-)
 create mode 100644 drivers/misc/ocxl/powernv.c
 create mode 100644 drivers/misc/ocxl/pseries.c
Signature · 1 line
2.21.0