[PATCH] selftests/powerpc: Use req_max_processed_len from sysfs NX capabilities

2021-06-22 Thread Haren Myneni
On PowerVM, the hypervisor defines the maximum buffer length for each NX request and the kernel exported this value via sysfs. This patch reads this value if the sysfs entry is available and is used to limit the request length. Signed-off-by: Haren Myneni --- .../testing/selftests/powerpc/nx

Re: [PATCH v6 12/17] powerpc/pseries/vas: Integrate API with open/close windows

2021-06-18 Thread Haren Myneni
and makes an ioctl > > to allocate VAS window. The close interface is used to deallocate > > window. > > > > Signed-off-by: Haren Myneni > > Reviewed-by: Nicholas Piggin > > Unless there is some significant performance reason it might be > simplest > to

Re: [PATCH v6 13/17] powerpc/pseries/vas: Setup IRQ and fault handling

2021-06-17 Thread Haren Myneni
ult CRB into this FIFO. PowerVM: Each window will have an IRQ and the setup will be done during window open. Thanks Haren > > Thanks, > Nick > > > Signed-off-by: Haren Myneni > > --- > > arch/powerpc/platforms/pseries/vas.c | 102 > > ++

[PATCH v6 17/17] crypto/nx: Register and unregister VAS interface on PowerVM

2021-06-17 Thread Haren Myneni
The user space uses /dev/crypto/nx-gzip interface to setup VAS windows, create paste mapping and close windows. This patch adds changes to create/remove this interface with VAS register/unregister functions on PowerVM platform. Signed-off-by: Haren Myneni Acked-by: Herbert Xu Acked

[PATCH v6 16/17] crypto/nx: Add sysfs interface to export NX capabilities

2021-06-17 Thread Haren Myneni
-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/nx-common-pseries.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/drivers/crypto/nx/nx-common-pseries.c b/drivers/crypto/nx/nx-common-pseries.c index 9fc2abb56019..f51a50d40504 100644 --- a/drivers

[PATCH v6 15/17] crypto/nx: Get NX capabilities for GZIP coprocessor type

2021-06-17 Thread Haren Myneni
only for NXGZIP). Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/nx-common-pseries.c | 87 +++ 1 file changed, 87 insertions(+) diff --git a/drivers/crypto/nx/nx-common-pseries.c b/drivers/crypto/nx/nx-common-pseries.c index cc8dd3072b8b

[PATCH v6 14/17] crypto/nx: Rename nx-842-pseries file name to nx-common-pseries

2021-06-17 Thread Haren Myneni
Rename nx-842-pseries.c to nx-common-pseries.c to add code for new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni Acked-by: Herbert Xu Acked-by: Nicholas Piggin --- drivers/crypto/nx/Makefile | 2

[PATCH v6 13/17] powerpc/pseries/vas: Setup IRQ and fault handling

2021-06-17 Thread Haren Myneni
and also handles the fault by updating the CSB. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 102 +++ 1 file changed, 102 insertions(+) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index f5a44f2f0e99

[PATCH v6 12/17] powerpc/pseries/vas: Integrate API with open/close windows

2021-06-17 Thread Haren Myneni
) and unregister to remove this entry. The user space process opens this device node and makes an ioctl to allocate VAS window. The close interface is used to deallocate window. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 4 + arch/powerpc/platforms/pseries

[PATCH v6 11/17] powerpc/pseries/vas: Implement getting capabilities from hypervisor

2021-06-17 Thread Haren Myneni
). Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 122 +++ 1 file changed, 122 insertions(+) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index a73d7d00bf55..93794e12527d 100644 --- a/arch/powerpc/platforms

[PATCH v6 10/17] powerpc/pseries/vas: Add hcall wrappers for VAS handling

2021-06-17 Thread Haren Myneni
VAS capabilities Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/vas.c | 147 +++ 1 file changed, 147 insertions(+) create mode 100644 arch/powerpc/platforms/pseries/vas.c diff --git a/arch/powerpc/platforms/pseries/vas.c b

[PATCH v6 09/17] powerpc/vas: Define QoS credit flag to allocate window

2021-06-17 Thread Haren Myneni
. But the process can pass VAS_TX_WIN_FLAG_QOS_CREDIT flag with VAS_TX_WIN_OPEN ioctl to open QoS type window. Signed-off-by: Haren Myneni Acked-by: Nicholas Piggin --- arch/powerpc/include/uapi/asm/vas-api.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc

[PATCH v6 08/17] powerpc/pseries/vas: Define VAS/NXGZIP hcalls and structs

2021-06-17 Thread Haren Myneni
This patch adds hcalls and other definitions. Also define structs that are used in VAS implementation on PowerVM. Signed-off-by: Haren Myneni Acked-by: Nicholas Piggin --- arch/powerpc/include/asm/hvcall.h| 7 ++ arch/powerpc/include/asm/vas.h | 30 +++ arch/powerpc

[PATCH v6 07/17] powerpc/vas: Define and use common vas_window struct

2021-06-17 Thread Haren Myneni
(pnv_vas_window on PowerNV). Also adds the corresponding changes in PowerNV vas code. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin --- arch/powerpc/include/asm/vas.h | 14 +- arch/powerpc/platforms/powernv/vas-debug.c | 27 ++-- arch/powerpc/platforms/powernv/vas-fault.c

[PATCH v6 06/17] powerpc/vas: Move update_csb/dump_crb to common book3s platform

2021-06-17 Thread Haren Myneni
is not changed. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin --- arch/powerpc/include/asm/vas.h | 3 + arch/powerpc/platforms/book3s/vas-api.c| 167 + arch/powerpc/platforms/powernv/vas-fault.c | 155 ++- 3 files changed, 179

[PATCH v6 05/17] powerpc/vas: Create take/drop pid and mm reference functions

2021-06-17 Thread Haren Myneni
Take pid and mm references when each window opens and drops during close. This functionality is needed for powerNV and pseries. So this patch defines the existing code as functions in common book3s platform vas-api.c Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin --- arch/powerpc

[PATCH v6 04/17] powerpc/vas: Add platform specific user window operations

2021-06-17 Thread Haren Myneni
PowerNV uses registers to open/close VAS windows, and getting the paste address. Whereas the hypervisor calls are used on PowerVM. This patch adds the platform specific user space window operations and register with the common VAS user space interface. Signed-off-by: Haren Myneni Reviewed

[PATCH v6 03/17] powerpc/powernv/vas: Rename register/unregister functions

2021-06-17 Thread Haren Myneni
powerNV and pseries drivers register / unregister to the corresponding platform specific VAS separately. Then these VAS functions call the common API with the specific window operations. So rename powerNV VAS API register/unregister functions. Signed-off-by: Haren Myneni Reviewed-by: Nicholas

[PATCH v6 02/17] powerpc/vas: Move VAS API to book3s common platform

2021-06-17 Thread Haren Myneni
The pseries platform will share vas and nx code and interfaces with the PowerNV platform, so create the arch/powerpc/platforms/book3s/ directory and move VAS API code there. Functionality is not changed. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin --- arch/powerpc/include/asm

[PATCH v6 01/17] powerpc/powernv/vas: Release reference to tgid during window close

2021-06-17 Thread Haren Myneni
kernel.org # 5.8+ Signed-off-by: Haren Myneni Reported-by: Nicholas Piggin Reviewed-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/vas-window.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platfor

[PATCH v6 00/17] Enable VAS and NX-GZIP support on PowerVM

2021-06-17 Thread Haren Myneni
nges based on suggestions from Nicholas Piggin - Create ref_get_pid_and_task() helper function which takes task refrence based on pid or tgid - Pass vas_id and flags to platform specific open window API - Miscellaneous changes Haren Myneni (17): powerpc/powernv/vas: Release referen

Re: [PATCH v5 13/17] powerpc/pseries/vas: Setup IRQ and fault handling

2021-06-15 Thread Haren Myneni
handles the interrupt by issuing H_GET_NX_FAULT hcall > > to retrieve the fault CRB information. > > > > This patch also adds changes to setup and free IRQ per each > > window and also handles the fault by updating the CSB. > > > > Signed-off-by: Haren Myneni

Re: [PATCH v5 12/17] powerpc/pseries/vas: Integrate API with open/close windows

2021-06-15 Thread Haren Myneni
and makes an ioctl > > to allocate VAS window. The close interface is used to deallocate > > window. > > > > Signed-off-by: Haren Myneni > > --- > > arch/powerpc/include/asm/vas.h | 4 + > > arch/powerpc/platforms/pseries/Makefile | 1 + > &

Re: [PATCH v5 12/17] powerpc/pseries/vas: Integrate API with open/close windows

2021-06-15 Thread Haren Myneni
and makes an ioctl > > to allocate VAS window. The close interface is used to deallocate > > window. > > > > Signed-off-by: Haren Myneni > > --- > > arch/powerpc/include/asm/vas.h | 4 + > > arch/powerpc/platforms/pseries/Makefile | 1 + > &

Re: [PATCH v5 04/17] powerpc/vas: Add platform specific user window operations

2021-06-15 Thread Haren Myneni
> > This patch adds the platform specific user space window operations > > and register with the common VAS user space interface. > > > > Signed-off-by: Haren Myneni > > --- > > arch/powerpc/include/asm/vas.h | 14 +- > > arch/powerpc/platforms

Re: [PATCH v5 16/17] crypto/nx: Get NX capabilities for GZIP coprocessor type

2021-06-14 Thread Haren Myneni
ended values. We can add this patch and the last one (crypto/nx: Add sysfs interface to export NX capabilities) before the actual enablement ("crypto/nx: Register and unregisterVAS interface on PowerVM"" Thanks Haren > > Thanks, > Nick > > > Signed-off-by: Ha

[PATCH v5 17/17] crypto/nx: Add sysfs interface to export NX capabilities

2021-06-13 Thread Haren Myneni
of bytes processed in one request */ NX will return RMA_Reject if the request buffer size is greater than req_max_processed_len. Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/nx-common-pseries.c | 43 +++ 1 file changed, 43

[PATCH v5 16/17] crypto/nx: Get NX capabilities for GZIP coprocessor type

2021-06-13 Thread Haren Myneni
features that the hypervisor supports. Then retrieve the capabilities for the specific feature (available only for NXGZIP). Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/nx-common-pseries.c | 86 +++ 1 file changed, 86 insertions(+) diff --git

[PATCH v5 15/17] crypto/nx: Register and unregister VAS interface on PowerVM

2021-06-13 Thread Haren Myneni
The user space uses /dev/crypto/nx-gzip interface to setup VAS windows, create paste mapping and close windows. This patch adds changes to create/remove this interface with VAS register/unregister functions on PowerVM platform. Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers

[PATCH v5 14/17] crypto/nx: Rename nx-842-pseries file name to nx-common-pseries

2021-06-13 Thread Haren Myneni
Rename nx-842-pseries.c to nx-common-pseries.c to add code for new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/Makefile | 2 +- drivers/crypto/nx/{nx-842

[PATCH v5 13/17] powerpc/pseries/vas: Setup IRQ and fault handling

2021-06-13 Thread Haren Myneni
and also handles the fault by updating the CSB. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 108 +++ 1 file changed, 108 insertions(+) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index fe375f7a7029

[PATCH v5 12/17] powerpc/pseries/vas: Integrate API with open/close windows

2021-06-13 Thread Haren Myneni
) and unregister to remove this entry. The user space process opens this device node and makes an ioctl to allocate VAS window. The close interface is used to deallocate window. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 4 + arch/powerpc/platforms/pseries

[PATCH v5 11/17] powerpc/pseries/vas: Implement getting capabilities from hypervisor

2021-06-13 Thread Haren Myneni
). Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 124 +++ 1 file changed, 124 insertions(+) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index fec280979d50..98109a13f1c2 100644 --- a/arch/powerpc/platforms

[PATCH v5 10/17] powerpc/pseries/vas: Add hcall wrappers for VAS handling

2021-06-13 Thread Haren Myneni
VAS capabilities Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/vas.c | 181 +++ 1 file changed, 181 insertions(+) create mode 100644 arch/powerpc/platforms/pseries/vas.c diff --git a/arch/powerpc/platforms/pseries/vas.c b

[PATCH v5 09/17] powerpc/vas: Define QoS credit flag to allocate window

2021-06-13 Thread Haren Myneni
. But the process can pass VAS_TX_WIN_FLAG_QOS_CREDIT flag with VAS_TX_WIN_OPEN ioctl to open QoS type window. Signed-off-by: Haren Myneni --- arch/powerpc/include/uapi/asm/vas-api.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/uapi/asm/vas-api.h b

[PATCH v5 08/17] powerpc/pseries/vas: Define VAS/NXGZIP hcalls and structs

2021-06-13 Thread Haren Myneni
This patch adds hcalls and other definitions. Also define structs that are used in VAS implementation on PowerVM. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/hvcall.h| 7 ++ arch/powerpc/include/asm/vas.h | 30 +++ arch/powerpc/platforms/pseries/vas.h | 125

[PATCH v5 07/17] powerpc/vas: Define and use common vas_window struct

2021-06-13 Thread Haren Myneni
(pnv_vas_window on PowerNV). Also adds the corresponding changes in PowerNV vas code. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 14 +- arch/powerpc/platforms/powernv/vas-debug.c | 27 ++-- arch/powerpc/platforms/powernv/vas-fault.c | 20 +-- arch/powerpc/platforms

[PATCH v5 06/17] powerpc/vas: Move update_csb/dump_crb to common book3s platform

2021-06-13 Thread Haren Myneni
is not changed. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin --- arch/powerpc/include/asm/vas.h | 3 + arch/powerpc/platforms/book3s/vas-api.c| 147 +++ arch/powerpc/platforms/powernv/vas-fault.c | 155 ++--- 3 files changed, 159

[PATCH v5 05/17] powerpc/vas: Create take/drop pid and mm reference functions

2021-06-13 Thread Haren Myneni
Take pid and mm references when each window opens and drops during close. This functionality is needed for powerNV and pseries. So this patch defines the existing code as functions in common book3s platform vas-api.c Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h

[PATCH v5 04/17] powerpc/vas: Add platform specific user window operations

2021-06-13 Thread Haren Myneni
PowerNV uses registers to open/close VAS windows, and getting the paste address. Whereas the hypervisor calls are used on PowerVM. This patch adds the platform specific user space window operations and register with the common VAS user space interface. Signed-off-by: Haren Myneni --- arch

[PATCH v5 03/17] powerpc/powernv/vas: Rename register/unregister functions

2021-06-13 Thread Haren Myneni
powerNV and pseries drivers register / unregister to the corresponding platform specific VAS separately. Then these VAS functions call the common API with the specific window operations. So rename powerNV VAS API register/unregister functions. Signed-off-by: Haren Myneni Reviewed-by: Nicholas

[PATCH v5 02/17] powerpc/vas: Move VAS API to book3s common platform

2021-06-13 Thread Haren Myneni
Using the same /dev/crypto/nx-gzip interface for both powerNV and pseries. So this patch creates platforms/book3s/ and moves VAS API to that directory. The actual functionality is not changed. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/Kconfig| 1 + arch

[PATCH v5 01/17] powerpc/powernv/vas: Release reference to tgid during window close

2021-06-13 Thread Haren Myneni
kernel.org # 5.8+ Signed-off-by: Haren Myneni Reported-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/vas-window.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-wind

[PATCH v5 00/17] Enable VAS and NX-GZIP support on PowerVM

2021-06-13 Thread Haren Myneni
o fix tgid reference release. This fix should be also included in stable 5.8+ - Define platform specific VAS window structs - Define helper functions to take and release pid, tgid and mm references - Other cleanup suggestions Haren Myneni (17): powerpc/powernv/vas: Release

Re: [PATCH v4 09/16] powerpc/pseries/vas: Add HCALL wrappers for VAS handling

2021-06-04 Thread Haren Myneni
On Fri, 2021-06-04 at 21:52 +1000, Michael Ellerman wrote: > Haren Myneni writes: > > This patch adds the following HCALL wrapper functions to allocate, > > Normal spelling is "hcall". > > > modify and deallocate VAS windows, and retrieve VAS capabiliti

Re: [PATCH v4 06/16] powerpc/vas: Define and use common vas_window struct

2021-06-04 Thread Haren Myneni
On Fri, 2021-06-04 at 21:52 +1000, Michael Ellerman wrote: > Haren Myneni writes: > > On Thu, 2021-06-03 at 14:38 +1000, Nicholas Piggin wrote: > > > Excerpts from Haren Myneni's message of May 21, 2021 7:33 pm: > > > > Same vas_window struct is used on powerNV and

Re: [PATCH v4 16/16] crypto/nx: Add sysfs interface to export NX capabilities

2021-06-04 Thread Haren Myneni
On Fri, 2021-06-04 at 21:52 +1000, Michael Ellerman wrote: > Haren Myneni writes: > > On Thu, 2021-06-03 at 14:57 +1000, Nicholas Piggin wrote: > > > Excerpts from Haren Myneni's message of May 21, 2021 7:42 pm: > > > > Changes to export the following NXGZIP capa

Re: [PATCH v4 06/16] powerpc/vas: Define and use common vas_window struct

2021-06-03 Thread Haren Myneni
the > > corresponding modifications in powerNV vas code. > > > > On powerNV, vas_window is used for both TX and RX windows, whereas > > only for TX windows on powerVM. So some elements are specific to > > these platforms. > > > > Signed-off-by: Haren Myneni

Re: [PATCH v4 04/16] powerpc/vas: Create take/drop pid and mm references

2021-06-03 Thread Haren Myneni
defines the existing code as functions in common book3s > > platform vas-api.c > > > > Signed-off-by: Haren Myneni > > Seems like a good idea to put these into their own helper functions. > > > --- > > arch/powerpc/include/asm/vas.h | 25 +++

Re: [PATCH v4 07/16] powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs

2021-06-03 Thread Haren Myneni
On Thu, 2021-06-03 at 14:47 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of May 21, 2021 7:34 pm: > > This patch adds HCALLs and other definitions. Also define structs > > that are used in VAS implementation on powerVM. > > > >

Re: [PATCH v4 12/16] powerpc/pseries/vas: Setup IRQ and fault handling

2021-06-03 Thread Haren Myneni
handles the interrupt by issuing H_GET_NX_FAULT hcall > > to retrieve the fault CRB information. > > > > This patch also adds changes to setup and free IRQ per each > > window and also handles the fault by updating the CSB. > > > > Signed-off-by: Haren Myneni

Re: [PATCH v4 16/16] crypto/nx: Add sysfs interface to export NX capabilities

2021-06-03 Thread Haren Myneni
gt; > NX will return RMA_Reject if the request buffer size is greater > > than req_max_processed_len. > > > > Signed-off-by: Haren Myneni > > Acked-by: Herbert Xu > > --- > > drivers/crypto/nx/nx-common-pseries.c | 43 > > +++ > >

Re: [PATCH v4 03/16] powerpc/vas: Add platform specific user window operations

2021-06-03 Thread Haren Myneni
his patch adds the platform specific user space window operations > > and register with the common VAS user space interface. > > Basic idea makes sense. I don't understand this code in detail > though. > A couple of things, > > > Signed-off-by: Haren Myneni > &g

Re: [PATCH v4 01/16] powerpc/vas: Move VAS API to book3s common platform

2021-06-03 Thread Haren Myneni
directory. The actual functionality is not changed. > > > > Signed-off-by: Haren Myneni > > --- > > arch/powerpc/include/asm/vas.h| 3 +++ > > arch/powerpc/platforms/Kconfig| 1 + > > arch/powerpc/platforms/Makefile

[PATCH v4 16/16] crypto/nx: Add sysfs interface to export NX capabilities

2021-05-21 Thread Haren Myneni
of bytes processed in one request */ NX will return RMA_Reject if the request buffer size is greater than req_max_processed_len. Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/nx-common-pseries.c | 43 +++ 1 file changed, 43

[PATCH v4 15/16] crypto/nx: Get NX capabilities for GZIP coprocessor type

2021-05-21 Thread Haren Myneni
features that the hypervisor supports. Then retrieve the capabilities for the specific feature (available only for NXGZIP). Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/nx-common-pseries.c | 89 +++ 1 file changed, 89 insertions(+) diff --git

[PATCH v4 14/16] crypto/nx: Register and unregister VAS interface

2021-05-21 Thread Haren Myneni
Changes to create /dev/crypto/nx-gzip interface with VAS register and to remove this interface with VAS unregister. Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/Kconfig | 1 + drivers/crypto/nx/nx-common-pseries.c | 9 + 2 files changed, 10

[PATCH v4 13/16] crypto/nx: Rename nx-842-pseries file name to nx-common-pseries

2021-05-21 Thread Haren Myneni
Rename nx-842-pseries.c to nx-common-pseries.c to add code for new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/Makefile | 2 +- drivers/crypto/nx/{nx-842

[PATCH v4 12/16] powerpc/pseries/vas: Setup IRQ and fault handling

2021-05-21 Thread Haren Myneni
and also handles the fault by updating the CSB. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 111 +++ 1 file changed, 111 insertions(+) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index ef0c455f6e93

[PATCH v4 11/16] powerpc/pseries/vas: Integrate API with open/close windows

2021-05-21 Thread Haren Myneni
) and unregister to remove this entry. The user space process opens this device node and makes an ioctl to allocate VAS window. The close interface is used to deallocate window. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 5 + arch/powerpc/platforms/pseries

[PATCH v4 10/16] powerpc/pseries/vas: Implement getting capabilities from hypervisor

2021-05-21 Thread Haren Myneni
). Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 127 +++ 1 file changed, 127 insertions(+) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index 06960151477c..9976f6b614b9 100644 --- a/arch/powerpc/platforms

[PATCH v4 09/16] powerpc/pseries/vas: Add HCALL wrappers for VAS handling

2021-05-21 Thread Haren Myneni
VAS capabilities Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/vas.c | 217 +++ 1 file changed, 217 insertions(+) create mode 100644 arch/powerpc/platforms/pseries/vas.c diff --git a/arch/powerpc/platforms/pseries/vas.c b

[PATCH v4 08/16] powerpc/vas: Define QoS credit flag to allocate window

2021-05-21 Thread Haren Myneni
. But the process can pass VAS_TX_WIN_FLAG_QOS_CREDIT flag with VAS_TX_WIN_OPEN ioctl to open QoS type window. Signed-off-by: Haren Myneni --- arch/powerpc/include/uapi/asm/vas-api.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/uapi/asm/vas-api.h b

[PATCH v4 07/16] powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs

2021-05-21 Thread Haren Myneni
This patch adds HCALLs and other definitions. Also define structs that are used in VAS implementation on powerVM. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/hvcall.h| 7 ++ arch/powerpc/include/asm/vas.h | 32 arch/powerpc/platforms/pseries/vas.h | 110

[PATCH v4 06/16] powerpc/vas: Define and use common vas_window struct

2021-05-21 Thread Haren Myneni
elements are specific to these platforms. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 50 +++- arch/powerpc/platforms/powernv/vas-debug.c | 12 +- arch/powerpc/platforms/powernv/vas-fault.c | 4 +- arch/powerpc/platforms/powernv/vas-trace.h | 6

[PATCH v4 05/16] powerpc/vas: Move update_csb/dump_crb to common book3s platform

2021-05-21 Thread Haren Myneni
is not changed. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin --- arch/powerpc/include/asm/vas.h | 3 + arch/powerpc/platforms/book3s/vas-api.c| 147 +++ arch/powerpc/platforms/powernv/vas-fault.c | 155 ++--- 3 files changed, 159

[PATCH v4 04/16] powerpc/vas: Create take/drop pid and mm references

2021-05-21 Thread Haren Myneni
Take pid and mm references when each window opens and drops during close. This functionality is needed for powerNV and pseries. So this patch defines the existing code as functions in common book3s platform vas-api.c Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h

[PATCH v4 02/16] powerpc/powernv/vas: Rename register/unregister functions

2021-05-21 Thread Haren Myneni
powerNV and pseries drivers register / unregister to the corresponding platform specific VAS separately. Then these VAS functions call the common API with the specific window operations. So rename powerNV VAS API register/unregister functions. Signed-off-by: Haren Myneni Reviewed-by: Nicholas

[PATCH v4 03/16] powerpc/vas: Add platform specific user window operations

2021-05-21 Thread Haren Myneni
PowerNV uses registers to open/close VAS windows, and getting the paste address. Whereas the hypervisor calls are used on PowerVM. This patch adds the platform specific user space window operations and register with the common VAS user space interface. Signed-off-by: Haren Myneni --- arch

[PATCH v4 01/16] powerpc/vas: Move VAS API to book3s common platform

2021-05-21 Thread Haren Myneni
Using the same /dev/crypto/nx-gzip interface for both powerNV and pseries. So this patch creates platforms/book3s/ and moves VAS API to that directory. The actual functionality is not changed. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h| 3 +++ arch

[PATCH v4 00/16] Enable VAS and NX-GZIP support on powerVM

2021-05-21 Thread Haren Myneni
luded when DLPAR/LPM support is added. - Other cleanup changes Haren Myneni (16): powerpc/vas: Move VAS API to book3s common platform powerpc/powernv/vas: Rename register/unregister functions powerpc/vas: Add platform specific user window operations powerpc/vas: Create take/drop

Re: [V3 PATCH 06/16] powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs

2021-05-10 Thread Haren Myneni
On Mon, 2021-05-10 at 15:49 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of April 18, 2021 7:05 am: > > This patch adds HCALLs and other definitions. Also define structs > > that are used in VAS implementation on powerVM. > > > >

Re: [V3 PATCH 07/16] powerpc/vas: Define QoS credit flag to allocate window

2021-05-10 Thread Haren Myneni
cific hypervisor is introducing them. DEF and QoS credits types are introduced by the hypervisor, not VAS PAPR. We did not have these types on powerNV. > > > flag with VAS_TX_WIN_OPEN ioctl to open QoS type window. > > > > Signed-off-by: Haren Myneni > > --- >

Re: [V3 PATCH 09/16] powerpc/pseries/vas: Implement to get all capabilities

2021-05-10 Thread Haren Myneni
ailable. Then retrieve the specific capabilities by using the > > feature type in H_QUERY_VAS_CAPABILITIES HCALL. > > > > pHyp supports only GZIP default and GZIP QoS capabilities right > > now. > > Changelog and title could use a bit of work. >

Re: [V3 PATCH 12/16] powerpc/pseries/vas: sysfs interface to export capabilities

2021-05-10 Thread Haren Myneni
On Mon, 2021-05-10 at 16:34 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of April 18, 2021 7:10 am: > > pHyp provides GZIP default and GZIP QoS capabilities which gives > > the total number of credits are available in LPAR. This patch > > creates sysfs entries and exports

Re: [V3 PATCH 15/16] crypto/nx: Get NX capabilities for GZIP coprocessor type

2021-05-10 Thread Haren Myneni
t; > > > Changes to get NX overall capabilities which points to the specific > > features phyp supports. Then retrieve NXGZIP specific capabilities. > > > > Signed-off-by: Haren Myneni > > --- > > drivers/crypto/nx/nx-common-pseries.c | 83 >

Re: [V3 PATCH 03/16] powerpc/vas: Create take/drop task reference functions

2021-05-10 Thread Haren Myneni
nes the existing code as functions in common book3s platform > > vas-api.c > > > > Signed-off-by: Haren Myneni > > --- > > arch/powerpc/include/asm/vas.h | 20 > > arch/powerpc/platforms/book3s/vas-api.c | 51 > > +

Re: [PATCH V3 02/16] powerpc/vas: Move VAS API to common book3s platform

2021-05-10 Thread Haren Myneni
e are moved to arch/powerpc/platforms/book3s/vas-api.c > > Added hooks to call platform specific code, but the underline > > powerNV code in these functions is not changed. > > Even so, could you do one patch that just moves, and another that > adds the ops struct?

Re: [V3 PATCH 05/16] powerpc/vas: Define and use common vas_window struct

2021-05-10 Thread Haren Myneni
dows on powerVM. So some elements are specific to these platforms. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 48 arch/powerpc/platforms/powernv/vas-debug.c | 12 +- arch/powerpc/platforms/powernv/vas-fault.c | 4 +- arch/powerpc/platforms/po

Re: [V3 PATCH 01/16] powerpc/powernv/vas: Rename register/unregister functions

2021-05-10 Thread Haren Myneni
have separate drivers nx-common-powernv/nx-common-pseries for powerNV and pseries. API registeration patch is: - driver calls platform specific API vas_register_api_powernv/pseries - Platform specific code calls common API with its vas_user_win_ops vas_register_coproc_api() > > Rev

[PATCH] Documentation/powerpc: Add proper links for manual and tests

2021-04-18 Thread Haren Myneni
The links that are mentioned in this document are no longer valid. So changed the proper links for NXGZIP user manual and test cases. Signed-off-by: Haren Myneni Reported-by: Bulent Abali --- Documentation/powerpc/vas-api.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[V3 PATCH 16/16] crypto/nx: Add sysfs interface to export NX capabilities

2021-04-17 Thread Haren Myneni
of bytes processed in one request */ Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-common-pseries.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/drivers/crypto/nx/nx-common-pseries.c b/drivers/crypto/nx/nx-common-pseries.c index

[V3 PATCH 15/16] crypto/nx: Get NX capabilities for GZIP coprocessor type

2021-04-17 Thread Haren Myneni
-by: Haren Myneni --- drivers/crypto/nx/nx-common-pseries.c | 83 +++ 1 file changed, 83 insertions(+) diff --git a/drivers/crypto/nx/nx-common-pseries.c b/drivers/crypto/nx/nx-common-pseries.c index 9a40fca8a9e6..49224870d05e 100644 --- a/drivers/crypto/nx/nx-common-pseries.c

[V3 PATCH 14/16] crypto/nx: Register and unregister VAS interface

2021-04-17 Thread Haren Myneni
Changes to create /dev/crypto/nx-gzip interface with VAS register and to remove this interface with VAS unregister. Signed-off-by: Haren Myneni --- drivers/crypto/nx/Kconfig | 1 + drivers/crypto/nx/nx-common-pseries.c | 9 + 2 files changed, 10 insertions(+) diff --git

[V3 PATCH 13/16] crypto/nx: Rename nx-842-pseries file name to nx-common-pseries

2021-04-17 Thread Haren Myneni
Rename nx-842-pseries.c to nx-common-pseries.c to add code for new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni --- drivers/crypto/nx/Makefile | 2 +- drivers/crypto/nx/{nx-842-pseries.c => nx-com

[V3 PATCH 12/16] powerpc/pseries/vas: sysfs interface to export capabilities

2021-04-17 Thread Haren Myneni
) avail_lpar_creds target_lpar_creds used_lpar_creds Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/Makefile| 2 +- arch/powerpc/platforms/pseries/vas-sysfs.c | 173 + arch/powerpc/platforms/pseries/vas.c | 6 + arch/powerpc/platforms

[V3 PATCH 11/16] powerpc/pseries/vas: Setup IRQ and fault handling

2021-04-17 Thread Haren Myneni
-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 111 ++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index 0ade0d6d728f..2106eca0862a 100644 --- a/arch/powerpc

[V3 PATCH 10/16] powerpc/pseries/vas: Integrate API with open/close windows

2021-04-17 Thread Haren Myneni
) and unregister to remove this entry. The user space process opens this device node and makes an ioctl to allocate VAS window. The close interface is used to deallocate window. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 5 + arch/powerpc/platforms/book3s/Kconfig

[V3 PATCH 09/16] powerpc/pseries/vas: Implement to get all capabilities

2021-04-17 Thread Haren Myneni
using H_QUERY_VAS_CAPABILITIES HCALL which tells the specific features that are available. Then retrieve the specific capabilities by using the feature type in H_QUERY_VAS_CAPABILITIES HCALL. pHyp supports only GZIP default and GZIP QoS capabilities right now. Signed-off-by: Haren Myneni --- arch

[V3 PATCH 08/16] powerpc/pseries/VAS: Implement allocate/modify/deallocate HCALLS

2021-04-17 Thread Haren Myneni
capabilities that phyp provides. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 217 +++ 1 file changed, 217 insertions(+) create mode 100644 arch/powerpc/platforms/pseries/vas.c diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc

[V3 PATCH 07/16] powerpc/vas: Define QoS credit flag to allocate window

2021-04-17 Thread Haren Myneni
. But the process can pass VAS_WIN_QOS_CREDITS flag with VAS_TX_WIN_OPEN ioctl to open QoS type window. Signed-off-by: Haren Myneni --- arch/powerpc/include/uapi/asm/vas-api.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/uapi/asm/vas-api.h b/arch/powerpc

[V3 PATCH 06/16] powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs

2021-04-17 Thread Haren Myneni
This patch adds HCALLs and other definitions. Also define structs that are used in VAS implementation on powerVM. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/hvcall.h| 7 ++ arch/powerpc/include/asm/vas.h | 28 arch/powerpc/platforms/pseries/vas.h | 96

[V3 PATCH 05/16] powerpc/vas: Define and use common vas_window struct

2021-04-17 Thread Haren Myneni

[V3 PATCH 03/16] powerpc/vas: Create take/drop task reference functions

2021-04-17 Thread Haren Myneni
Take task reference when each window opens and drops during close. This functionality is needed for powerNV and pseries. So this patch defines the existing code as functions in common book3s platform vas-api.c Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 20

[V3 PATCH 04/16] powerpc/vas: Move update_csb/dump_crb to common book3s platform

2021-04-17 Thread Haren Myneni
NX issues an interrupt when sees fault on user space buffer. The kernel processes the fault by updating CSB. This functionality is same for both powerNV and pseries. So this patch moves these functions to common vas-api.c and the actual functionality is not changed. Signed-off-by: Haren Myneni

[PATCH V3 02/16] powerpc/vas: Move VAS API to common book3s platform

2021-04-17 Thread Haren Myneni
/platforms/book3s/vas-api.c Added hooks to call platform specific code, but the underline powerNV code in these functions is not changed. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h| 22 ++- arch/powerpc/platforms/Kconfig| 1 + arch/powerpc

[V3 PATCH 01/16] powerpc/powernv/vas: Rename register/unregister functions

2021-04-17 Thread Haren Myneni
powerNV and pseries drivers register / unregister to the corresponding VAS code separately. So rename powerNV VAS API register/unregister functions. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 6 +++--- arch/powerpc/platforms/powernv/vas-api.c | 10

[V3 PATCH 00/16] Enable VAS and NX-GZIP support on powerVM

2021-04-17 Thread Haren Myneni
as Michael Ellerman suggested Haren Myneni (16): powerpc/powernv/vas: Rename register/unregister functions powerpc/vas: Make VAS API powerpc platform independent powerpc/vas: Create take/drop task reference functions powerpc/vas: Move update_csb/dump_crb to common book3s platform powerpc

[V2 PATCH 16/16] crypto/nx: Add sysfs interface to export NX capabilities

2021-04-13 Thread Haren Myneni
of bytes processed in one request */ Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-common-pseries.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/drivers/crypto/nx/nx-common-pseries.c b/drivers/crypto/nx/nx-common-pseries.c index

[V2 PATCH 15/16] crypto/nx: Get NX capabilities for GZIP coprocessor type

2021-04-13 Thread Haren Myneni
-by: Haren Myneni --- drivers/crypto/nx/nx-common-pseries.c | 83 +++ 1 file changed, 83 insertions(+) diff --git a/drivers/crypto/nx/nx-common-pseries.c b/drivers/crypto/nx/nx-common-pseries.c index 9a40fca8a9e6..49224870d05e 100644 --- a/drivers/crypto/nx/nx-common-pseries.c

  1   2   3   4   5   6   >