linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	michael.neuling@au1.ibm.com, stewart@linux.vnet.ibm.com,
	apopple@au1.ibm.com, hbabu@us.ibm.com, oohall@gmail.com,
	bsingharora@gmail.com, linuxppc-dev@ozlabs.org
Subject: [PATCH v2 00/10] Enable VAS
Date: Wed, 25 Jan 2017 17:37:58 -0800	[thread overview]
Message-ID: <1485394688-31129-1-git-send-email-sukadev@linux.vnet.ibm.com> (raw)

Power9 introduces a hardware subsystem referred to as the Virtual
Accelerator Switchboard (VAS). VAS allows kernel subsystems and user
space processes to directly access the Nest Accelerator (NX) engines
which implement compression and encryption algorithms in the hardware.

NX has been in Power processors since Power7+, but access to the NX
engines was through the 'icswx' instruction which is only available
to the kernel/hypervisor. Starting with Power9, access to the NX
engines is provided to both kernel and user space processes through
VAS.

The switchboard (i.e VAS) multiplexes accesses between "receivers" and
"senders", where the "receivers" are typically the NX engines and
"senders" are the kernel subsystems and user processors that wish to
access the receivers (NX engines).  Once a sender is "connected" to
a receiver through the switchboard, the sender submit compression/
encryption requests to the hardware using the new (PowerISA 3.0)
"copy" and "paste" instructions.

In the initial OPAL and PowerNV kernel patchsets, the "senders" can
only be kernel subsystems (eg NX-842 driver). A follow-on patch set 
will allow senders to be user-space processes.

This kernel patch set configures the VAS subsystems and provides
kernel interfaces to drivers like NX-842 to open receive and send
windows in VAS and to submit requests to the NX engine.

This patch set that has been tested in a Simics Power9 environment using
a modified NX-842 kernel driver and a compression self-test module from
Power8. The corresponding OPAL patchset for VAS support was posted to
skiboot mailing list:

	https://lists.ozlabs.org/pipermail/skiboot/2017-January/006193.html
	
OPAL and kernel patchsets for NX-842 driver will be posted separately.
All four patchsets are needed to effectively use VAS/NX in Power9.

Thanks to input from Ben Herrenschmidt, Michael Neuling, Michael Ellerman
and Haren Myneni.

Changelog[v2]
	- Use vas-id, HVWC, UWC and paste address, entries from device tree
	  rather than defining/computing them in kernel and reorg code.

Sukadev Bhattiprolu (10):
  VAS: Define macros, register fields and structures
  Move GET_FIELD/SET_FIELD to vas.h
  VAS: Define vas_init() and vas_exit()
  VAS: Define helpers for access MMIO regions
  VAS: Define helpers to init window context
  VAS: Define helpers to alloc/free windows
  VAS: Define vas_rx_win_open() interface
  VAS: Define vas_win_close() interface
  VAS: Define vas_tx_win_open()
  VAS: Define copy/paste interfaces

 MAINTAINERS                        |   6 +
 arch/powerpc/include/asm/reg.h     |   1 +
 arch/powerpc/include/asm/vas.h     | 141 ++++++
 drivers/crypto/nx/nx-842-powernv.c |   1 +
 drivers/crypto/nx/nx-842.h         |   5 -
 drivers/misc/Kconfig               |   1 +
 drivers/misc/Makefile              |   1 +
 drivers/misc/vas/Kconfig           |  20 +
 drivers/misc/vas/Makefile          |   3 +
 drivers/misc/vas/copy-paste.h      |  74 +++
 drivers/misc/vas/vas-internal.h    | 467 ++++++++++++++++++
 drivers/misc/vas/vas-window.c      | 950 +++++++++++++++++++++++++++++++++++++
 drivers/misc/vas/vas.c             | 156 ++++++
 13 files changed, 1821 insertions(+), 5 deletions(-)
 create mode 100644 arch/powerpc/include/asm/vas.h
 create mode 100644 drivers/misc/vas/Kconfig
 create mode 100644 drivers/misc/vas/Makefile
 create mode 100644 drivers/misc/vas/copy-paste.h
 create mode 100644 drivers/misc/vas/vas-internal.h
 create mode 100644 drivers/misc/vas/vas-window.c
 create mode 100644 drivers/misc/vas/vas.c

-- 
2.7.4

             reply	other threads:[~2017-01-26  1:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26  1:37 Sukadev Bhattiprolu [this message]
2017-01-26  1:37 ` [PATCH v2 01/10] VAS: Define macros, register fields and structures Sukadev Bhattiprolu
2017-01-26  1:38 ` [PATCH v2 02/10] Move GET_FIELD/SET_FIELD to vas.h Sukadev Bhattiprolu
2017-01-26 17:31   ` Dan Streetman
2017-01-26  1:38 ` [PATCH v2 03/10] VAS: Define vas_init() and vas_exit() Sukadev Bhattiprolu
2017-01-26  8:28   ` kbuild test robot
2017-01-26  1:38 ` [PATCH v2 04/10] VAS: Define helpers for access MMIO regions Sukadev Bhattiprolu
2017-01-26  1:38 ` [PATCH v2 05/10] VAS: Define helpers to init window context Sukadev Bhattiprolu
2017-01-26  1:38 ` [PATCH v2 06/10] VAS: Define helpers to alloc/free windows Sukadev Bhattiprolu
2017-01-26  1:38 ` [PATCH v2 07/10] VAS: Define vas_rx_win_open() interface Sukadev Bhattiprolu
2017-01-26  1:38 ` [PATCH v2 08/10] VAS: Define vas_win_close() interface Sukadev Bhattiprolu
2017-01-26  1:38 ` [PATCH v2 09/10] VAS: Define vas_tx_win_open() Sukadev Bhattiprolu
2017-01-26  1:38 ` [PATCH v2 10/10] VAS: Define copy/paste interfaces Sukadev Bhattiprolu

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=1485394688-31129-1-git-send-email-sukadev@linux.vnet.ibm.com \
    --to=sukadev@linux.vnet.ibm.com \
    --cc=apopple@au1.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=bsingharora@gmail.com \
    --cc=hbabu@us.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=michael.neuling@au1.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=oohall@gmail.com \
    --cc=stewart@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).