• Haren Myneni's avatar
    powerpc/vas: Add VAS user space API · dda44eb2
    Haren Myneni authored
    On power9, userspace can send GZIP compression requests directly to NX
    once kernel establishes NX channel / window with VAS. This patch provides
    user space API which allows user space to establish channel using open
    VAS_TX_WIN_OPEN ioctl, mmap and close operations.
    
    Each window corresponds to file descriptor and application can open
    multiple windows. After the window is opened, VAS_TX_WIN_OPEN icoctl to
    open a window on specific VAS instance, mmap() system call to map
    the hardware address of engine's request queue into the application's
    virtual address space.
    
    Then the application can then submit one or more requests to the the
    engine by using the copy/paste instructions and pasting the CRBs to
    the virtual address (aka paste_address) returned by mmap().
    
    Only NX GZIP coprocessor type is supported right now and allow GZIP
    engine access via /dev/crypto/nx-gzip device node.
    
    Thanks to Michael Ellerman for his changes and suggestions to make the
    ioctl generic to support any coprocessor type.
    Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
    Signed-off-by: default avatarHaren Myneni <haren@linux.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/1587114121.2275.1109.camel@hbabu-laptop
    dda44eb2
vas.h 14.8 KB