On Wed, 2024-08-28 at 18:12 +1000, Michael Ellerman wrote:
> Hi Haren,
>
> One query below about the of_node refcounting.
>
> Haren Myneni writes:
> > In the powerpc-pseries specific implementation, the IO hotplug
> > event is handled in the user space (drmgr tool
/
properties to the device tree.
Signed-off-by: Scott Cheloha
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/dlpar.c | 130 +
1 file changed, 130 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/dlpar.c
b/arch/powerpc/platforms/pseries/dlpar.c
space so that drmgr
tool can remove the corresponding device tree nodes based on DRC
index from the device tree.
Signed-off-by: Scott Cheloha
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/rtas.h| 1 +
arch/powerpc/platforms/pseries/dlpar.c | 88 +-
2
t
Closes:
https://lore.kernel.org/oe-kbuild-all/202408182142.wuikqyae-...@intel.com/
Closes:
https://lore.kernel.org/oe-kbuild-all/202408182302.o7qro45s-...@intel.com/
Signed-off-by: Haren Myneni
v3:
- Fix warnings from using incorrect data types in pseries_hp_errorlog
struct
v2:
- Remove pr_i
t
Closes:
https://lore.kernel.org/oe-kbuild-all/202408182142.wuikqyae-...@intel.com/
Closes:
https://lore.kernel.org/oe-kbuild-all/202408182302.o7qro45s-...@intel.com/
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/dlpar.c| 24 ---
arch/powerpc/platform
space so that drmgr
tool can remove the corresponding device tree nodes based on DRC
index from the device tree.
Signed-off-by: Scott Cheloha
Signed-off-by: Haren Myneni
v2:
- Remove pr_info() and TODO comments
- Update more information in the commit logs
---
arch/powerpc/include/asm/rtas.h
/
properties to the device tree.
Signed-off-by: Scott Cheloha
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/dlpar.c | 130 +
1 file changed, 130 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/dlpar.c
b/arch/powerpc/platforms/pseries/dlpar.c
-off-by: Scott Cheloha
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/dlpar.c | 134 +
1 file changed, 134 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/dlpar.c
b/arch/powerpc/platforms/pseries/dlpar.c
index 993fd3e8f6ea..fb34d5859da8 100644
-off-by: Haren Myneni
---
arch/powerpc/include/asm/rtas.h| 1 +
arch/powerpc/platforms/pseries/dlpar.c | 87 +-
2 files changed, 87 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 065ffd1b2f8a
-off-by: Haren Myneni
---
arch/powerpc/include/asm/rtas.h| 1 +
arch/powerpc/platforms/pseries/dlpar.c | 87 +-
2 files changed, 87 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 065ffd1b2f8a
-off-by: Scott Cheloha
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/dlpar.c | 134 +
1 file changed, 134 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/dlpar.c
b/arch/powerpc/platforms/pseries/dlpar.c
index 993fd3e8f6ea..fb34d5859da8 100644
sleep 10 msecs maximum, this patch allow more tasks can
issue open/close VAS calls without any hung traces in the
dmesg.
Signed-off-by: Haren Myneni
Suggested-by: Nathan Lynch
---
v1 -> v2:
- Use usleep_range instead of using RTAS sleep routine as
suggested by Nathan
v2 -> v3:
- Sleep 1
On 1/11/24 9:27 AM, Nathan Lynch wrote:
Haren Myneni writes:
VAS allocate, modify and deallocate HCALLs returns
H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy
delay and expects OS to reissue HCALL after that delay. But using
msleep() will often sleep at least 20 msecs even
sleep with
the expected value before issuing HCALL again.
Signed-off-by: Haren Myneni
Suggested-by: Nathan Lynch
---
v1 -> v2:
- Use usleep_range instead of using RTAS sleep routine as
suggested by Nathan
v2 -> v3:
- Sleep 10MSecs even for HCALL delay > 10MSecs and the other
commit
sleep with
the expected value before issuing HCALL again.
Signed-off-by: Haren Myneni
Suggested-by: Nathan Lynch
---
v1 -> v2:
- Use usleep_range instead of using RTAS sleep routine as
suggested by Nathan
v2 -> v3:
- Sleep 10MSecs even for HCALL delay > 10MSecs and the other
commit
On 12/4/23 6:05 AM, Aneesh Kumar K.V (IBM) wrote:
Haren Myneni writes:
VAS allocate, modify and deallocate HCALLs returns
H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy
delay and expects OS to reissue HCALL after that delay. But using
msleep() will often sleep at least 20
before issuing HCALL again.
Signed-off-by: Haren Myneni
Suggested-by: Nathan Lynch
---
v1 -> v2:
- Use usleep_range instead of using RTAS sleep routine as
suggested by Nathan
v2 -> v3:
- Sleep 10MSecs even for HCALL delay > 10MSecs and the other
commit / comemnt changes as suggested by N
On 11/29/23 6:07 PM, Michael Ellerman wrote:
Haren Myneni writes:
VAS allocate, modify and deallocate HCALLs returns
H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy
delay and expects OS to reissue HCALL after that delay. But using
msleep() will often sleep at least 20 msecs
On 11/29/23 5:43 PM, Nathan Lynch wrote:
Haren Myneni writes:
VAS allocate, modify and deallocate HCALLs returns
H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy
delay and expects OS to reissue HCALL after that delay. But using
msleep() will often sleep at least 20 msecs even
10msecs.
It might cause these HCALLs takes longer when multiple threads
issue open or close VAS windows simultaneously.
So instead of msleep(), use usleep_range() to ensure sleep with
the expected value before issuing HCALL again.
Signed-off-by: Haren Myneni
Suggested-by: Nathan Lynch
---
v1 ->
10msecs.
It might cause these HCALLs takes longer when multiple threads
issue open or close VAS windows simultaneously.
So instead of using msleep(), call rtas_busy_sleep() which uses
usleep_range() if the delay is <= 20msecs.
Signed-off-by: Haren Myneni
Suggested-by: Nathan Lynch
---
arch/powe
Move the RTAS delay sleep code to new rtas_busy_sleep(). It can
be called from HCALL delay code that needs to support both usleep()
or msleep() depends on delay value.
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/rtas.h | 1 +
arch/powerpc/kernel/rtas.c | 56
return
Fixes: 37e6764895ef ("powerpc/pseries/vas: Add VAS migration handler")
Signed-off-by: Haren Myneni
---
v1 -> v2:
- Do not define the migration_in_progress flag as atomic as
suggested by Nathan
v2 -> v3:
- Use wait_event() instead of wait_event_interru
- The migration handler waits for no in-progress open windows.
Fixes: 37e6764895ef ("powerpc/pseries/vas: Add VAS migration handler")
Signed-off-by: Haren Myneni
---
v1 -> v2:
- Do not define the migration_in_progress flag as atomic as
suggested by Nathan
v2 -> v3:
- Use wait_ev
- The migration handler waits for no in-progress open windows.
Fixes: 37e6764895ef ("powerpc/pseries/vas: Add VAS migration handler")
Signed-off-by: Haren Myneni
---
v1 -> v2:
- Do not define the migration_in_progress flag as atomic as
suggested by Nathan
v2 -> v3:
- Use wait_ev
make the corresponding changes to have the
consistencein prefix all pr_*() messages (vas-api.c).
Fixes: 37e6764895ef ("powerpc/pseries/vas: Add VAS migration handler")
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/book3s/vas-api.c | 34 -
arch/powerpc
On 10/18/23 2:10 PM, Nathan Lynch wrote:
Haren Myneni writes:
The hypervisor returns migration failure if all VAS windows are not
closed. During pre-migration stage, vas_migration_handler() sets
migration_in_progress flag and closes all windows from the list.
The allocate VAS window routine
: Haren Myneni
---
arch/powerpc/platforms/book3s/vas-api.c | 4 ++--
arch/powerpc/platforms/pseries/vas.c| 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/book3s/vas-api.c
b/arch/powerpc/platforms/book3s/vas-api.c
index 77ea9335fd04..203cfc2fb8ff 100644
set and decrements nr_open_window_progress counter
- The migration handler waits for no in-progress open windows.
Fixes: 37e6764895ef ("powerpc/pseries/vas: Add VAS migration handler")
Signed-off-by: Haren Myneni
---
Changes from v1:
- Do not define the migration_in_progress flag as
On 10/16/23 1:30 PM, Nathan Lynch wrote:
Nathan Lynch writes:
Haren Myneni writes:
Haren Myneni writes:
The hypervisor returns migration failure if all VAS windows are not
closed. During pre-migration stage, vas_migration_handler() sets
migration_in_progress flag and closes all windows
On 10/11/23 1:36 PM, Nathan Lynch wrote:
Haren Myneni writes:
Haren Myneni writes:
The hypervisor returns migration failure if all VAS windows are not
closed. During pre-migration stage, vas_migration_handler() sets
migration_in_progress flag and closes all windows from the list.
The
On 10/9/23 1:09 PM, Nathan Lynch wrote:
Hi Haren,
Haren Myneni writes:
The hypervisor returns migration failure if all VAS windows are not
closed. During pre-migration stage, vas_migration_handler() sets
migration_in_progress flag and closes all windows from the list.
The allocate VAS
set and decrements nr_open_window_progress counter
- The migration handler waits for no in-progress open windows.
Fixes: 37e6764895ef ("powerpc/pseries/vas: Add VAS migration handler")
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas.c | 51 ++--
set and decrements nr_open_window_progress counter
- The migration handler waits for no in-progress open windows.
Fixes: 37e6764895ef ("powerpc/pseries/vas: Add VAS migration handler")
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas.c | 51 ++--
ries/vas: Close windows with DLPAR core
removal")
Signed-off-by: Haren Myneni
---
Changes from v1:
- Update commit log with more description on deadlock traces
---
arch/powerpc/platforms/pseries/vas.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platfo
VAS fault handler
execution.
So this patch adds changes to acquire mmap lock before holding
mmap_mutex.
Fixes: 8ef7b9e1765a ("powerpc/pseries/vas: Close windows with DLPAR core
removal")
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas.c | 9 +++--
1 file
in pseries_vas_dlpar_cpu()
and returns success if the copy/paste feature is not enabled.
Then lparcfg_write() completes the processor DLPAR operations
without any failures.
Fixes: 2147783d6bf0 ("powerpc/pseries: Use lparcfg to reconfig VAS windows for
DLPAR CPU")
Signed-off-by: Ha
On Tue, 2023-03-07 at 20:55 -0600, Nathan Lynch wrote:
> Haren Myneni writes:
> > The hypervisor supports user-mode NX from Power10.
> > pseries_vas_dlpar_cpu()
> > is called from lparcfg_write() to update VAS windows for DLPAR CPU
> > event
> > and the kernel
the
copy/paste feature is not enabled.
Fixes: 2147783d6bf0 ("powerpc/pseries: Use lparcfg to reconfig VAS windows for
DLPAR CPU")
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas.c | 8
1 file changed, 8 insertions(+)
diff --git a/arch/powerpc/platforms/pse
: Haren Myneni
---
v3: Update pending_faults usage in changelog
v2: Use the pending_faults counter for the second interrupt and
process it with the previous interrupt handling if its thread
handler is executing.
arch/powerpc/platforms/pseries/vas.c | 40 +++-
arch
changes in the VAS notifier
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/lparcfg.c | 15
arch/powerpc/platforms/pseries/vas.c | 44
arch/powerpc/platforms/pseries/vas.h | 5 +++
3 files changed, 50 insertions(+), 14 deletions(-)
diff --git
hypervisor will not deliver the fault
interrupt to the partition and the user space may wait continuously
for the CSB update. So use VAS specific IRQ handler instead of
calling the default primary handler.
Signed-off-by: Haren Myneni
---
v2: Use the pending_faults counter for the second interrupt and
domain IDs for the current CPU, passing
smp_processor_id() to node associativity HCALL which may return
H_P2 (-55) error during DLPAR CPU event.
This patch fixes this issue by passing hard_smp_processor_id() with
VPHN_FLAG_VCPU flag (PAPR 14.11.6.1 H_HOME_NODE_ASSOCIATIVITY).
Signed-off-by: Haren
-features property and ignore
DSI error during page fault handling if MMU_FTR_NX_DSI is defined.
Signed-off-by: Haren Myneni
---
v2: Code cleanup as suggested by Christophe Leroy
v3: Make NX DSI as MMU feature instead of CPU feature
arch/powerpc/include/asm/mmu.h | 6 +-
arch/powerpc/kernel
On Mon, 2022-09-26 at 05:55 +, Christophe Leroy wrote:
>
> Le 25/09/2022 à 22:26, Haren Myneni a écrit :
> > DSI error will be generated when the paste operation is issued on
> > the suspended NX window due to NX state changes. The hypervisor
> > expects the partit
fault handling if CPU_FTR_NX_DSI if defined.
Signed-off-by: Haren Myneni
---
v2: Code cleanup as suggested by Christophe Leroy
arch/powerpc/include/asm/cputable.h | 5 ++--
arch/powerpc/kernel/prom.c | 36 +
arch/powerpc/mm/fault.c | 17
On Thu, 2022-09-22 at 07:14 -0500, Nathan Lynch wrote:
> Haren Myneni writes:
> > When the migration is initiated, the hypervisor changes VAS
> > mappings as part of pre-migration event. Then the OS gets the
> > migration event which closes all VAS windows before the mig
On Thu, 2022-09-22 at 09:04 +, Christophe Leroy wrote:
>
> Le 22/09/2022 à 10:29, Haren Myneni a écrit :
> > DSI error will be generated when the paste operation is issued on
> > the suspended NX window due to NX state changes. The hypervisor
> > expects the partit
-features” type value is defined.
Byte 0, bit 3 of pi-attribute-specifier-type is now defined to
indicate this DSI error.
This patch adds changes to read ibm,pi-features property and ignore
DSI error in the page fault handling if CPU_FTR_NX_DSI if defined.
Signed-off-by: Haren Myneni
---
arch
hypervisor will not deliver the fault
interrupt to the partition and the user space may wait continuously
for the CSB update. So use VAS specific IRQ handler instead of
calling the default primary handler.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas.c | 19
these NX faults coming
from the actual migration. So to reduce this time window, close
VAS windows first in pseries_migrate_partition().
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/mobility.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch
VAS entry is created as a misc device and the sysfs comments
should list the proper entries
Reported-by: Matheus Castanho
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas-sysfs.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc
IRTUAL enabled. Fixes this issue by
assigning only real address to rx_fifo in vas_rx_win_attr struct
for both receive and fault windows.
Reported-by: Michael Ellerman
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/vas.h | 2 +-
arch/powerpc/platforms/powernv/vas-fault.c | 2 +-
update,
the kernel is using the old total credits value from the
hypervisor. Fix this issue by using the new QoS credits
from the userspace instead of depending on VAS capabilities
from the hypervisor.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas-sysfs.c | 19
copy/paste on these inactive windows.
The current migration implementation does not freeze the user
space and applications can continue to open VAS windows while
migration is in progress. So when the migration_in_progress flag
is set, VAS open window API returns -EBUSY.
Signed-off-by: Haren Myneni
r whenever update_total_credits is updated to make
sure sync with the QoS target credits in the hypervisor.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas-sysfs.c | 54 +++---
arch/powerpc/platforms/pseries/vas.c | 2 +-
arch/powerpc/platforms/pseries/vas.h
*/
nr_used_credits /* Used credits */
/sys/devices/vas/vas0/gzip/qos_capabilities (QoS GZIP capabilities)
nr_total_credits
nr_used_credits
Signed-off-by: Haren Myneni
Reviewed-by: Nicholas Piggin
---
arch/powerpc/platforms/pseries/Makefile| 2 +-
arch/powerpc/platforms
successfully.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas.c | 91 +++-
1 file changed, 90 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/vas.c
b/arch/powerpc/platforms/pseries/vas.c
index a297720bcdae..96178dd58adf 100644
--- a
the system lost credits (core
removal) and reopen windows in the hypervisor when the previously
lost credits are available.
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/vas.h | 2 +
arch/powerpc/platforms/pseries/vas.c | 207 +--
arch/powerpc/platforms
not active, return mmap()
failure with -EACCES and expects the user space reissue mmap()
when the window is active or open a new window when the credit
is available.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/book3s/vas-api.c | 23 ++-
1 file changed, 22 insertions
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 | 54 +
2 files changed, 56 insertions(+)
diff --git a/arch/powerpc/include
handle NX request page faults if the user
space issue NX requests.
This handler maps 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
Reviewed-by: Nicholas Piggin
---
arch/powerpc
DLPAR operation.
Signed-off-by: Haren Myneni
Reviewed-by: Nicholas Piggin
---
arch/powerpc/platforms/pseries/vas.c | 9 +
arch/powerpc/platforms/pseries/vas.h | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/vas.c
b/arch/powerpc/platforms
nr_total/nr_used_credits provides credits usage to user space
via sysfs and the same interface can be used on PowerNV in
future. Changed with proper naming so that applicable on both
pseries and PowerNV.
Signed-off-by: Haren Myneni
Reviewed-by: Nicholas Piggin
---
arch/powerpc/platforms
Changes in v5:
- Rebase on 5.17-rc5
- Add update_total_credits sysfs entry to update QoS target credits
and other commit descriptions as suggested by Nicholas Piggin
Changed in v6:
- Build fix in "Add paste address mmap fault handler" patch
as reported by kernel test robot
Haren Mynen
successfully.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas.c | 91 +++-
1 file changed, 90 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/vas.c
b/arch/powerpc/platforms/pseries/vas.c
index a297720bcdae..96178dd58adf 100644
--- a
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 | 55 -
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/arch
implementation does not freeze the user
space and applications can continue to open VAS windows while
migration is in progress. So when the migration_in_progress flag
is set, VAS open window API returns -EBUSY.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/mobility.c | 5 ++
arch
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/powerpc/platforms/pseries/vas.c | 88
disable copy/paste feature flag if any capabilities HCALL
is failed.
Signed-off-by: Haren Myneni
Acked-by: Nathan Lynch
Reviewed-by: Nicholas Piggin
---
arch/powerpc/platforms/pseries/vas.c | 47
1 file changed, 20 insertions(+), 27 deletions(-)
diff --git a/arch
successfully.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas.c | 91 +++-
1 file changed, 90 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/vas.c
b/arch/powerpc/platforms/pseries/vas.c
index a297720bcdae..96178dd58adf 100644
--- a
n_progress enable patch in "VAS migration handler"
and other changes as suggested by Nicholas Piggin
Haren Myneni (3):
powerpc/pseries/vas: Define global hv_cop_caps struct
powerpc/pseries/vas: Modify reconfig open/close functions for
migration
powerpc/pseries/vas: Add V
r whenever update_total_credits is updated to make
sure sync with the QoS target credits in the hypervisor.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/vas-sysfs.c | 54 +++---
arch/powerpc/platforms/pseries/vas.c | 2 +-
arch/powerpc/platforms/pseries/vas.h
*/
nr_used_credits /* Used credits */
/sys/devices/vas/vas0/gzip/qos_capabilities (QoS GZIP capabilities)
nr_total_credits
nr_used_credits
Signed-off-by: Haren Myneni
Reviewed-by: Nicholas Piggin
---
arch/powerpc/platforms/pseries/Makefile| 2 +-
arch/powerpc/platforms
the system lost credits (core
removal) and reopen windows in the hypervisor when the previously
lost credits are available.
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/vas.h | 2 +
arch/powerpc/platforms/pseries/vas.c | 207 +--
arch/powerpc/platforms
not active, return mmap()
failure with -EACCES and expects the user space reissue mmap()
when the window is active or open a new window when the credit
is available.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/book3s/vas-api.c | 23 ++-
1 file changed, 22 insertions
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 | 55 -
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/arch
handle NX request page faults if the user
space issue NX requests.
This handler maps 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
Reviewed-by: Nicholas Piggin
---
arch/powerpc
DLPAR operation.
Signed-off-by: Haren Myneni
Reviewed-by: Nicholas Piggin
---
arch/powerpc/platforms/pseries/vas.c | 9 +
arch/powerpc/platforms/pseries/vas.h | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/vas.c
b/arch/powerpc/platforms
nr_total/nr_used_credits provides credits usage to user space
via sysfs and the same interface can be used on PowerNV in
future. Changed with proper naming so that applicable on both
pseries and PowerNV.
Signed-off-by: Haren Myneni
Reviewed-by: Nicholas Piggin
---
arch/powerpc/platforms
5:
- Rebase on 5.17-rc5
- Add update_total_credits sysfs entry to update QoS target credits
and other commit descriptions as suggested by Nicholas Piggin
Haren Myneni (9):
powerpc/pseries/vas: Use common names in VAS capability structure
powerpc/pseries/vas: Save PID in pseries_vas_window st
ark 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 Myneni
> > ---
> > arc
us.
>
> Why do you need two close window types, what if you finish
> LPM and just open as many as possible regardless how they
> are closed?
Adding 2 different status bits to support DLPAR and LPM closed staus.
As I mentioned above, windows will be active only after both bits ar
ch "Define global hv_cop_caps struct" to eliminate
> > memory allocation failure during migration (suggestion by
> > Nathan Lynch)
> >
> > Changes in v3:
> > - Rebase on 5.17-rc4
> > - Naming changes for VAS capability struct elemets based on the V4
> &g
and can write the
> > new
> > target QoS credits in sysfs. But the kernel gets the new QoS
> > capabilities from the hypervisor whenever nr_total_credits is
> > updated
> > to make sure sync with the values in the hypervisor.
> >
> > Signed-off-by: Haren M
r space does not retry, new mapping will not be
done. From the OS point of view, this window is not used by the user
space.
Thanks
Haren
>
> Thanks,
> Nick
>
> > Signed-off-by: Haren Myneni
> > ---
> > arch/powerpc/platforms/pseries/vas.c | 91
> > +++
SW compression if can. Added this comment in
the fault hanlder patch.
>
> in-active can be one word, not hyphenated.
>
>
> > This patch also adds the notifier for core removal/add to close
> > windows in the hypervisor if the system lost credits (core
> > remov
an happen which causes the corresponding
> > window in-active. So if the window is not active, return mmap()
> > failure with -EACCES and expects the user space reissue mmap()
> > when the window is active or open a new window when the credit
> > is available.
ixin the SIGBUS thing, was that my
> fault? I vaguely remember writing some of this patch :P
Thanks for your reviews on all patches.
No, it was my fault not handling the -EGAIN error.
>
> Thanks,
> Nick
>
> > Signed-off-by: Nicholas Piggin
> > Signed-off-by: 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
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
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
disable copy/paste feature flag if any capabilities HCALL
is failed.
Signed-off-by: Haren Myneni
Acked-by: Nathan Lynch
---
arch/powerpc/platforms/pseries/vas.c | 47
1 file changed, 20 insertions(+), 27 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/vas.c
_caps struct" to eliminate
memory allocation failure during migration (suggestion by
Nathan Lynch)
Changes in v3:
- Rebase on 5.17-rc4
- Naming changes for VAS capability struct elemets based on the V4 DLPAR
support patch series.
Haren Myneni (4):
powerpc/pseries/vas: Define global h
: Haren Myneni
---
arch/powerpc/platforms/pseries/vas-sysfs.c | 33 +-
arch/powerpc/platforms/pseries/vas.c | 2 +-
arch/powerpc/platforms/pseries/vas.h | 1 +
3 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/vas-sysfs.c
b
*/
nr_used_credits /* Used credits */
/sys/devices/vas/vas0/gzip/qos_capabilities (QoS GZIP capabilities)
nr_total_credits
nr_used_credits
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/pseries/Makefile| 2 +-
arch/powerpc/platforms/pseries/vas-sysfs.c | 226
windows,
it creates mapping on the new paste address. 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/platforms/pseries/vas.c | 91 +++-
1 file changed, 90 insertions
available.
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/vas.h | 2 +
arch/powerpc/platforms/pseries/vas.c | 207 +--
arch/powerpc/platforms/pseries/vas.h | 3 +
3 files changed, 204 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/include/asm
which causes the corresponding
window in-active. So if the window is not active, return mmap()
failure with -EACCES and expects the user space reissue mmap()
when the window is active or open a new window when the credit
is available.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/book3s/vas
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 | 55 -
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/arch
1 - 100 of 686 matches
Mail list logo