Re: [PATCH v2 1/4] powerpc/pseries/vas: Define global hv_cop_caps struct

2022-02-08 Thread Haren Myneni
On Tue, 2022-02-08 at 09:48 -0600, Nathan Lynch wrote: > Haren Myneni writes: > > The coprocessor capabilities struct is used to get default and > > QoS capabilities from the hypervisor during init, DLPAR event and > > migration. So instead of allocating this struct for e

[PATCH v2 4/4] powerpc/pseries/vas: Disable window open during migration

2022-02-05 Thread Haren Myneni
The current partition migration implementation does not freeze the user space and the user space can continue open VAS windows. So when migration_in_progress flag is enabled, VAS open window API returns -EBUSY. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 13

[PATCH v2 3/4] powerpc/pseries/vas: Add VAS migration handler

2022-02-05 Thread Haren Myneni
after migration. All active windows for both default and QoS types will be closed and mark them in-active and reopened after migration with this handler. During the migration, the user space receives paste instruction failure if it issues copy/paste on these in-active windows. Signed-off-by: Haren

[PATCH v2 2/4] powerpc/pseries/vas: Modify reconfig open/close functions for migration

2022-02-05 Thread Haren Myneni
migration is in progress, set VAS_WIN_NO_CRED_CLOSE to the window status. Close window happens with the first event (migration or DLPAR) and Reopen window happens only with the last event (migration or DLPAR). Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 2 + arch

[PATCH v2 1/4] powerpc/pseries/vas: Define global hv_cop_caps struct

2022-02-05 Thread Haren Myneni
. Also disable copy/paste feature flag if any capabilities HCALL is failed. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 49 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc

[PATCH v2 0/4] powerpc/pseries/vas: VAS/NXGZIP support with LPM

2022-02-05 Thread Haren Myneni
_caps struct" to eliminate memory allocation failure during migration (suggestion by Nathan Lynch) Haren Myneni (4): powerpc/pseries/vas: Define global hv_cop_caps struct powerpc/pseries/vas: Modify reconfig open/close functions for migration powerpc/pseries/vas: Add VAS migrati

Re: [PATCH 2/3] powerpc/pseries/vas: Add VAS migration handler

2022-01-31 Thread Haren Myneni
On Mon, 2022-01-31 at 10:37 -0600, Nathan Lynch wrote: > Hi Haren, > > Mostly this seems OK to me. Some questions: Thanks Nathan for your suggestions. > > Haren Myneni writes: > > Since the VAS windows belong to the VAS hardware resource, the > > hypervisor expects

[PATCH 3/3] powerpc/pseries/vas: Disable window open during migration

2022-01-28 Thread Haren Myneni
The current partition migration implementation does not freeze the user space and the user space can continue open VAS windows. So when migration_in_progress flag is enabled, VAS open window API returns -EBUSY. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 13

[PATCH 2/3] powerpc/pseries/vas: Add VAS migration handler

2022-01-28 Thread Haren Myneni
after migration. All active windows for both default and QoS types will be closed and mark them in-active and reopened after migration with this handler. During the migration, the user space receives paste instruction failure if it issues copy/paste on these in-active windows. Signed-off-by: Haren

[PATCH 1/3] powerpc/pseries/vas: Modify reconfig open/close functions for migration

2022-01-28 Thread Haren Myneni
migration is in progress, set VAS_WIN_NO_CRED_CLOSE to the window status. Close window happens with the first event (migration or DLPAR) and Reopen window happens only with the last event (migration or DLPAR). Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 2 + arch

[PATCH 0/3] powerpc/pseries/vas: VAS/NXGZIP support with LPM

2022-01-28 Thread Haren Myneni
to reopen all windows which has VAS_WIN_MIGRATE_CLOSE status and make them active again. The user space gets paste instruction failure when it sends requests on these in-active windows. These patches depend on VAS/DLPAR support patch series Haren Myneni (3): powerpc/pseries/vas: Modify reconfig open

[RFC PATCH 3/3] powerpc/pseries/vas: Disable window open during migration

2022-01-21 Thread Haren Myneni
The current partition migration implementation does not freeze the user space and the user space can continue open VAS windows. So when migration_in_progress flag is enabled, VAS open window API returns -EBUSY. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 14

[RFC PATCH 2/3] powerpc/pseries/vas: Add VAS suspend/resume notifier

2022-01-21 Thread Haren Myneni
migration. All active windows for both default and QoS types will be closed during suspend and reopen them during resume. During migration, the user space should expect paste instruction failure if issues copy/paste on these active windows. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries

[RFC PATCH 1/3] powerpc/pseries/vas: Modify reconfig open/close functions for migration

2022-01-21 Thread Haren Myneni
migration is in progress, set VAS_WIN_NO_CRED_CLOSE to the window status. Close window happens with the first event (migration or DLPAR) and Reopen window happens only with the last event (migration or DLPAR). Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 2 + arch

[RFC PATCH 0/3] powerpc/pseries/vas: VAS/NXGZIP support with LPM

2022-01-21 Thread Haren Myneni
VAS_WIN_MIGRATE_CLOSE status. These patches depend on VAS/DLPAR support patch series (https://lists.ozlabs.org/pipermail/linuxppc-dev/2021-December/238331.html) Also the suspend/resume notifier code is added in a separate patch and will be posted later with the actual patches. Haren Myneni (3): powerpc/pseries

[PATCH v3 10/10] powerpc/pseries/vas: Write 'target_creds' for QoS credits change

2022-01-21 Thread Haren Myneni
to communicate to the kernel. This patch adds an interface so that drmgr command can write the new target QoS credits in sysfs. But the kernel gets the new QoS capabilities from the hypervisor whenever target_creds is updated to make sure sync with the values in the hypervisor. Signed-off-by: Haren

[PATCH v3 09/10] powerpc/pseries/vas: sysfs interface to export capabilities

2022-01-21 Thread Haren Myneni
be /* changed with DLPAR operation */ used_creds /* Used credits */ /sys/devices/vas/vas0/gzip/qos_caps (QoS GZIP capabilities) avail_creds target_creds used_creds Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/Makefile| 2 +- arch/powerpc/platforms

[PATCH v3 08/10] powerpc/vas: Return paste instruction failure if no active window

2022-01-21 Thread Haren Myneni
instruction that caused the fault was a paste. Signed-off-by: Nicholas Piggin Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/platforms/book3s/vas-api.c | 47 - 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH v3 07/10] powerpc/vas: Add paste address mmap fault handler

2022-01-21 Thread Haren Myneni
to handle NX request page faults if the user space issue NX requests. This handler remap the new paste address with the same VMA when the window is active again (due to core add with DLPAR). Otherwise returns paste failure. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/book3s/vas-api.c

[PATCH v3 06/10] powerpc/vas: Map paste address only if window is active

2022-01-21 Thread Haren Myneni
is active or open new window when the credit is available. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/book3s/vas-api.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas

[PATCH v3 05/10] powerpc/pseries/vas: Close windows with DLPAR core removal

2022-01-21 Thread Haren Myneni
. Also the kernel unmaps the paste address so that the user space receives paste failure until these windows are active with the later DLPAR (core add). Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 1 + arch/powerpc/platforms/book3s/vas-api.c | 2 + arch/powerpc

[PATCH v3 04/10] powerpc/pseries/vas: Reopen windows with DLPAR core add

2022-01-21 Thread Haren Myneni
. Then the user space can continue to use these windows and send HW compression requests to NX successfully. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 16 +++ arch/powerpc/platforms/book3s/vas-api.c | 1 + arch/powerpc/platforms/pseries/vas.c| 144

[PATCH v3 03/10] powerpc/pseries/vas: Save LPID in pseries_vas_window struct

2022-01-21 Thread Haren Myneni
during DLPAR operation. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 7 --- arch/powerpc/platforms/pseries/vas.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index

[PATCH v3 02/10] powerpc/pseries/vas: Add notifier for DLPAR core removal/add

2022-01-21 Thread Haren Myneni
and reopen windows when the credits available later. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 37 1 file changed, 37 insertions(+) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index c0737379cc7b

[PATCH v3 01/10] powerpc/pseries/vas: Use common names in VAS capability structure

2022-01-21 Thread Haren Myneni
target/used/avail_creds provides credits usage to user space via sysfs and the same interface can be used on PowerNV in future. Remove "lpar" from these names so that applicable on both PowerVM and PowerNV. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/

[PATCH v3 00/10] powerpc/pseries/vas: NXGZIP support with DLPAR

2022-01-21 Thread Haren Myneni
dits. Changes in v3: - Rebase 5.16 - Reconfigure VAS windows only for CPU hotplug events. Haren Myneni (10): powerpc/pseries/vas: Use common names in VAS capability structure powerpc/pseries/vas: Add notifier for DLPAR core removal/add powerpc/pseries/vas: Save partition PID in pseries_vas_wi

Re: [RFC PATCH 3/3] powerpc/pseries/vas: Use migration_in_progress to disable DLPAR

2022-01-18 Thread Haren Myneni
On Fri, 2022-01-14 at 11:59 -0600, Nathan Lynch wrote: > Haren Myneni writes: > > > Before migration starts, all secondary CPUs will be offline which > > can invoke VAS DLPAR event. > > I don't understand this statement, so I can't evaluate the patch. The > curr

[RFC PATCH 3/3] powerpc/pseries/vas: Use migration_in_progress to disable DLPAR

2021-12-27 Thread Haren Myneni
space can continue open VAS windows. So when migration_in_progress flag is enabled, VAS open window API returns -EBUSY. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms

[RFC PATCH 2/3] powerpc/pseries/vas: Add VAS suspend/resume notifier

2021-12-27 Thread Haren Myneni
migration. All active windows for both default and QoS types will be closed during suspend and reopen them during resume. During migration, the user space should expect paste instruction failure if issues copy/paste on these active windows. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries

[RFC PATCH 1/3] powerpc/pseries/vas: Modify reconfig open/close functions for migration

2021-12-27 Thread Haren Myneni
the window status to VAS_WIN_MIGRATE_CLOSE when closes and reopen windows with the same status during resume. - Continue to close all windows even if deallocate HCALL failed (should not happen) since no way to stop migration with the current LPM implementation. Signed-off-by: Haren Myneni

[RFC PATCH 0/3] powerpc/pseries/vas: VAS/NXGZIP support with LPM

2021-12-27 Thread Haren Myneni
VAS_WIN_MIGRATE_CLOSE status. These patches depend on VAS/DLPAR support patch series (https://lists.ozlabs.org/pipermail/linuxppc-dev/2021-December/238331.html) Also the suspend/resume notifier code is added in a separate patch and will be posted later with the actual patches. Haren Myneni (3): powerpc/pseries

[PATCH v2 10/10] powerpc/pseries/vas: Write 'target_creds' for QoS credits change

2021-12-22 Thread Haren Myneni
to communicate to the kernel. This patch adds an interface so that drmgr command can write the new target QoS credits in sysfs. But the kernel gets the new QoS capabilities from the hypervisor whenever target_creds is updated to make sure sync with the values in the hypervisor. Signed-off-by: Haren

[PATCH v2 09/10] powerpc/pseries/vas: sysfs interface to export capabilities

2021-12-22 Thread Haren Myneni
be /* changed with DLPAR operation */ used_creds /* Used credits */ /sys/devices/vas/vas0/gzip/qos_caps (QoS GZIP capabilities) avail_creds target_creds used_creds Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/Makefile| 2 +- arch/powerpc/platforms

[PATCH v2 08/10] powerpc/vas: Return paste instruction failure if no active window

2021-12-22 Thread Haren Myneni
instruction that caused the fault was a paste. Signed-off-by: Nicholas Piggin Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/platforms/book3s/vas-api.c | 47 - 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH v2 07/10] powerpc/vas: Add paste address mmap fault handler

2021-12-22 Thread Haren Myneni
to handle NX request page faults if the user space issue NX requests. This handler remap the new paste address with the same VMA when the window is active again (due to core add with DLPAR). Otherwise returns paste failure. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/book3s/vas-api.c

[PATCH v2 06/10] powerpc/vas: Map paste address only if window is active

2021-12-22 Thread Haren Myneni
is active or open new window when the credit is available. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/book3s/vas-api.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas

[PATCH v2 05/10] powerpc/pseries/vas: Close windows with DLPAR core removal

2021-12-22 Thread Haren Myneni
. Also the kernel unmaps the paste address so that the user space receives paste failure until these windows are active with the later DLPAR (core add). Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 1 + arch/powerpc/platforms/book3s/vas-api.c | 2 + arch/powerpc

[PATCH v2 04/10] powerpc/pseries/vas: Reopen windows with DLPAR core add

2021-12-22 Thread Haren Myneni
. Then the user space can continue to use these windows and send HW compression requests to NX successfully. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 15 +++ arch/powerpc/platforms/book3s/vas-api.c | 1 + arch/powerpc/platforms/pseries/vas.c| 143

[PATCH v2 00/10] powerpc/pseries/vas: NXGZIP support with DLPAR

2021-12-22 Thread Haren Myneni
dits. Haren Myneni (10): powerpc/pseries/vas: Use common names in VAS capability structure powerpc/pseries/vas: Add notifier for DLPAR core removal/add powerpc/pseries/vas: Save partition PID in pseries_vas_window struct powerpc/pseries/vas: Reopen windows with DLPAR core add powerpc/pseries

Re: [PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable

2021-11-29 Thread Haren Myneni
On Tue, 2021-11-30 at 10:25 +1100, Michael Ellerman wrote: > Nicholas Piggin writes: > > Excerpts from Cédric Le Goater's message of November 26, 2021 5:13 > > pm: > > > On 11/26/21 06:21, Nicholas Piggin wrote: > > > > KVM does not support VAS so guests always print a useless error > > > > on

[PATCH 10/10] powerpc/pseries/vas: Write 'target_creds' for QoS credits change

2021-11-29 Thread Haren Myneni
to communicate to the kernel. This patch adds an interface so that drmgr command can write the new target QoS credits in sysfs. But the kernel gets the new QoS capabilities from the hypervisor whenever target_creds is updated to make sure sync with the values in the hypervisor. Signed-off-by: Haren

[PATCH 09/10] powerpc/pseries/vas: sysfs interface to export capabilities

2021-11-29 Thread Haren Myneni
be /* changed with DLPAR operation */ used_creds /* Used credits */ /sys/devices/vas/vas0/gzip/qos_caps (QoS GZIP capabilities) avail_creds target_creds used_creds Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/Makefile| 2 +- arch/powerpc/platforms

[PATCH 08/10] powerpc/vas: Return paste instruction failure if no active window

2021-11-29 Thread Haren Myneni
instruction that caused the fault was a paste. Signed-off-by: Nicholas Piggin Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/platforms/book3s/vas-api.c | 47 - 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH 07/10] powerpc/vas: Add paste address mmap fault handler

2021-11-29 Thread Haren Myneni
to handle NX request page faults if the user space issue NX requests. This handler remap the new paste address with the same VMA when the window is active again (due to core add with DLPAR). Otherwise returns paste failure. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/book3s/vas-api.c

[PATCH 06/10] powerpc/vas: Map paste address only if window is active

2021-11-29 Thread Haren Myneni
is active or open new window when the credit is available. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/book3s/vas-api.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas

[PATCH 05/10] powerpc/pseries/vas: Close windows with DLPAR core removal

2021-11-29 Thread Haren Myneni
. Also the kernel unmaps the paste address so that the user space receives paste failure until these windows are active with the later DLPAR (core add). Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 1 + arch/powerpc/platforms/book3s/vas-api.c | 2 + arch/powerpc

[PATCH 04/10] powerpc/pseries/vas: Reopen windows with DLPAR core add

2021-11-29 Thread Haren Myneni
. Then the user space can continue to use these windows and send HW compression requests to NX successfully. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 15 +++ arch/powerpc/platforms/book3s/vas-api.c | 1 + arch/powerpc/platforms/pseries/vas.c| 148

[PATCH 03/10] powerpc/pseries/vas: Save LPID in pseries_vas_window struct

2021-11-29 Thread Haren Myneni
during DLPAR operation. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 6 +++--- arch/powerpc/platforms/pseries/vas.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index

[PATCH 02/10] powerpc/pseries/vas: Add notifier for DLPAR core removal/add

2021-11-29 Thread Haren Myneni
and reopen windows when the credits available later. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 34 1 file changed, 34 insertions(+) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index ecdd21f517c0

[PATCH 01/10] powerpc/pseries/vas: Use common names in VAS capability structure

2021-11-29 Thread Haren Myneni
target/used/avail_creds provides credits usage to user space via sysfs and the same interface can be used on PowerNV in future. Remove "lpar" from these names so that applicable on both PowerVM and PowerNV. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/

[PATCH 00/10] powerpc/pseries/vas: NXGZIP support with DLPAR

2021-11-29 Thread Haren Myneni
ines the credit usage with sysfs target/avail/used_creds interfaces. drmgr uses target_creds to notify OS for QoS credit changes. Thanks to Nicholas Piggin and Aneesh Kumar for the valuable suggestions on the NXGZIP design to support DLPAR operations. Haren Myneni (10): pow

[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 +++

<    1   2   3   4   5   6   7   >