All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Donnellan <ajd@linux.ibm.com>
To: Haren Myneni <haren@linux.ibm.com>, mpe@ellerman.id.au
Cc: mikey@neuling.org, herbert@gondor.apana.org.au,
	npiggin@gmail.com, hch@infradead.org, oohall@gmail.com,
	sukadev@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V6 00/14] powerpc/vas: Page fault handling for user space NX requests
Date: Thu, 5 Mar 2020 11:04:13 +1100	[thread overview]
Message-ID: <93c032c4-9be2-f48a-ebe7-cecdcb505545@linux.ibm.com> (raw)
In-Reply-To: <1583353283.18705.2112.camel@hbabu-laptop>

On 5/3/20 7:21 am, Haren Myneni wrote:
> 
> On power9, Virtual Accelerator Switchboard (VAS) allows user space or
> kernel to communicate with Nest Accelerator (NX) directly using COPY/PASTE
> instructions. NX provides various functionalities such as compression,
> encryption and etc. But only compression (842 and GZIP formats) is
> supported in Linux kernel on power9.
> 
> 842 compression driver (drivers/crypto/nx/nx-842-powernv.c)
> is already included in Linux. Only GZIP support will be available from
> user space.
> 
> Applications can issue GZIP compression / decompression requests to NX with
> COPY/PASTE instructions. When NX is processing these requests, can hit
> fault on the request buffer (not in memory). It issues an interrupt and
> pastes fault CRB in fault FIFO. Expects kernel to handle this fault and
> return credits for both send and fault windows after processing.
> 
> This patch series adds IRQ and fault window setup, and NX fault handling:
> - Alloc IRQ and trigger port address, and configure IRQ per VAS instance.
> - Set port# for each window to generate an interrupt when noticed fault.
> - Set fault window and FIFO on which NX paste fault CRB.
> - Setup IRQ thread fault handler per VAS instance.
> - When receiving an interrupt, Read CRBs from fault FIFO and update
>    coprocessor_status_block (CSB) in the corresponding CRB with translation
>    failure (CSB_CC_TRANSLATION). After issuing NX requests, process polls
>    on CSB address. When it sees translation error, can touch the request
>    buffer to bring the page in to memory and reissue NX request.
> - If copy_to_user fails on user space CSB address, OS sends SEGV signal.
> 
> Tested these patches with NX-GZIP support and will be posting this series
> soon.
> 
> Patches 1 & 2: Define alloc IRQ and get port address per chip which are needed
>                 to alloc IRQ per VAS instance.
> Patch 3: Define nx_fault_stamp on which NX writes fault status for the fault
>           CRB
> Patch 4: Alloc and setup IRQ and trigger port address for each VAS instance
> Patch 5: Setup fault window per each VAS instance. This window is used for
>           NX to paste fault CRB in FIFO.
> Patches 6 & 7: Setup threaded IRQ per VAS and register NX with fault window
>           ID and port number for each send window so that NX paste fault CRB
>           in this window.
> Patch 8: Reference to pid and mm so that pid is not used until window closed.
>           Needed for multi thread application where child can open a window
>           and can be used by parent later.
> Patches 9 and 10: Process CRBs from fault FIFO and notify tasks by
>           updating CSB or through signals.
> Patches 11 and 12: Return credits for send and fault windows after handling
>          faults.
> Patch 14:Fix closing send window after all credits are returned. This issue
>           happens only for user space requests. No page faults on kernel
>           request buffer.
> 

This series adds a bunch of sparse warnings - it would be great if you 
could take a look.

https://openpower.xyz/job/snowpatch/job/snowpatch-linux-sparse/16052//artifact/linux/report.txt

-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd@linux.ibm.com             IBM Australia Limited


      parent reply	other threads:[~2020-03-05  0:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04 20:21 [PATCH V6 00/14] powerpc/vas: Page fault handling for user space NX requests Haren Myneni
2020-03-04 20:44 ` [PATCH V6 01/14] powerpc/xive: Define xive_native_alloc_irq_on_chip() Haren Myneni
2020-03-04 20:45 ` [PATCH V6 02/14] powerpc/xive: Define xive_native_alloc_get_irq_info() Haren Myneni
2020-03-04 20:45 ` [PATCH V6 03/14] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block Haren Myneni
2020-03-04 20:46 ` [PATCH V6 04/14] powerpc/vas: Alloc and setup IRQ and trigger port address Haren Myneni
2020-03-04 20:46 ` [PATCH V6 05/14] powerpc/vas: Setup fault window per VAS instance Haren Myneni
2020-03-04 20:47 ` [PATCH V6 06/14] powerpc/vas: Setup thread IRQ handler " Haren Myneni
2020-03-04 20:48 ` [PATCH V6 07/14] powerpc/vas: Register NX with fault window ID and IRQ port value Haren Myneni
2020-03-04 20:48 ` [PATCH V6 08/14] powerpc/vas: Take reference to PID and mm for user space windows Haren Myneni
2020-03-04 20:49 ` [PATCH V6 09/14] powerpc/vas: Update CSB and notify process for fault CRBs Haren Myneni
2020-03-04 20:50 ` [PATCH V6 10/14] powerpc/vas: Print CRB and FIFO values Haren Myneni
2020-03-04 20:50 ` [PATCH V6 11/14] powerpc/vas: Do not use default credits for receive window Haren Myneni
2020-03-04 20:52 ` [PATCH V6 12/14] powerpc/vas: Return credits after handling fault Haren Myneni
2020-03-04 20:53 ` [PATCH V6 13/14] powerpc/vas: Display process stuck message Haren Myneni
2020-03-04 20:53 ` [PATCH V6 14/14] powerpc/vas: Free send window in VAS instance after credits returned Haren Myneni
2020-03-05  0:04 ` Andrew Donnellan [this message]

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=93c032c4-9be2-f48a-ebe7-cecdcb505545@linux.ibm.com \
    --to=ajd@linux.ibm.com \
    --cc=haren@linux.ibm.com \
    --cc=hch@infradead.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=oohall@gmail.com \
    --cc=sukadev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.