LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
From: christophe lombard <clombard@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, fbarrat@linux.vnet.ibm.com,
	ajd@linux.ibm.com, groug@kaod.org
Subject: [PATCH 0/3] ocxl: Support for an 0penCAPI device in a QEMU guest.
Date: Tue, 22 Oct 2019 09:52:44 +0200
Message-ID: <20191022075247.16266-1-clombard@linux.vnet.ibm.com> (raw)

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

-- 
2.21.0


             reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  7:52 christophe lombard [this message]
2019-10-22  7:52 ` [PATCH 1/3] ocxl: Introduce implementation-specific API christophe lombard
2019-10-22  7:52 ` [PATCH 2/3] ocxl: Add pseries-specific code christophe lombard
2019-10-28 14:40   ` christophe lombard
2019-10-22  7:52 ` [PATCH 3/3] powerpc/pseries: Fixup config space size of OpenCAPI devices christophe lombard
2019-11-05  5:01   ` Andrew Donnellan
2019-11-07  8:46     ` christophe lombard
2019-11-09 13:07       ` Greg Kurz

Reply instructions:

You may reply publically 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=20191022075247.16266-1-clombard@linux.vnet.ibm.com \
    --to=clombard@linux.vnet.ibm.com \
    --cc=ajd@linux.ibm.com \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=groug@kaod.org \
    --cc=linuxppc-dev@lists.ozlabs.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

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git