[Skiboot] [PATCH v6 0/7] Enable VAS

Stewart Smith stewart at linux.vnet.ibm.com
Tue Aug 1 16:20:18 AEST 2017

Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com> writes:
> 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 can submit compression/
> encryption requests to the hardware using the new (in PowerISA 3.0)
> "copy" and "paste" instructions.
> In the initial OPAL and PowerNV kernel patchsets, the "senders" can
> only be kernel subsystems (i.e NX-842 driver). A follow-on patch set
> will allow senders to be user-space processes.
> This OPAL patch set initializes the VAS registers and makes the VAS
> hardware available to the NX-842 driver in the kernel. It also provides
> some interfaces that the NX-842 subsystem in OPAL needs to initialize
> the NX hardware in Power9.
> This patchset has been tested in Simics and P9 hardware environments
> using:
> 	- the corresponding VAS kernel patchset [1]
> 	- modified NX-842 OPAL [2]
> 	- modified NX-842 kernel drivers [3] and
> 	- a compression self-test module from Power8.
> On the hardware the compression requests (CRBs) are submitted to the
> coprocessors using the paste instruction. Verifying actual compression
> needs additional work.
> A newer version of the VAS kernel patchset, as well as the OPAL and
> kernel patchsets for NX-842 driver will be posted separately. All four
> are needed to effectively use VAS/NX in Power9.
> Thanks to Haren Myneni for the NX-842 modifications and help with
> testing, Ben Herrenschmidt, Michael Ellerman and Michael Neuling for
> input on working with the hardware and Oliver O'Halloran and Balbir
> Singh for review comments.
> [1] Previous version of VAS kernel patch set:
>     https://lkml.org/lkml/2017/3/31/22
> [2] NX Skiboot patches (from Haren Myneni)
>     https://lists.ozlabs.org/pipermail/skiboot/2017-April/006852.html
> [3] NX Kernel patches (from Haren Myneni)
>     https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-April/156106.html

So, I've taken this into skiboot master as of
63a7bf7f58b6b87d00e58a74c0440adad904d575, but one thing I *do* want us
to sort out over the next few weeks is how well this works on hardware
and to ensure we don't cause problems anywhere by having it
enabled... my (limited) testing seems to have been okay, but that
testing is *really* limited.

Can you talk with Pridhiviraj about how we could add some VAS and NX
tests into op-test-framework? I'd really like to be able to test the end
functionality through there and ensure that we both don't regress and
we've got a decent test suite.

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list