OSDN Git Service

powerpc/vas: Update CSB and notify process for fault CRBs
authorHaren Myneni <haren@linux.ibm.com>
Thu, 16 Apr 2020 06:03:42 +0000 (23:03 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 20 Apr 2020 06:53:00 +0000 (16:53 +1000)
commitc96c4436aba4c12f1f48369f2f90bc43e12fe36c
tree0c51bb2aed17597e063fd7c4e0546e6c379c07a1
parent9774628acf86409771acad6269ad24ea31ddb4b3
powerpc/vas: Update CSB and notify process for fault CRBs

Applications polls on CSB for the status update after requests are
issued. NX process these requests and update the CSB with the status.
If it encounters translation error, pastes CRB in fault FIFO and
raises an interrupt. The kernel handles fault by reading CRB from
fault FIFO and process the fault CRB.

For each fault CRB, update fault address in CRB (fault_storage_addr)
and translation error status in CSB so that user space can touch the
fault address and resend the request. If the user space passed invalid
CSB address send signal to process with SIGSEGV.

In the case of multi-thread applications, child thread may not be
available. So if the task is not running, send signal to tgid.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1587017022.2275.1063.camel@hbabu-laptop
arch/powerpc/platforms/powernv/vas-fault.c