powerpc/pseries/vas: Close windows with DLPAR core removal
authorHaren Myneni <haren@linux.ibm.com>
Tue, 1 Mar 2022 01:14:28 +0000 (17:14 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 7 Mar 2022 13:04:55 +0000 (00:04 +1100)
commit8ef7b9e1765a52c8023d9133a2438ac9f6da486a
treeb767f6226456c06a7e77356e61871a9fc6b84134
parent6a8d4ca891aa5f9402973eab5d7d9cf3929678b7
powerpc/pseries/vas: Close windows with DLPAR core removal

The hypervisor assigns vas credits (windows) for each LPAR based
on the number of cores configured in that system. The OS is
expected to release credits when cores are removed, and may
allocate more when cores are added. So there is a possibility of
using excessive credits (windows) in the LPAR and the hypervisor
expects the system to close the excessive windows so that NX load
can be equally distributed across all LPARs in the system.

When the OS closes the excessive windows in the hypervisor,
it sets the window status inactive and invalidates window
virtual address mapping. The user space receives paste instruction
failure if any NX requests are issued on the inactive window.
Then the user space can use with the available open windows or
retry NX requests until this window active again.

This patch also adds the notifier for core removal/add to close
windows in the hypervisor if the system lost credits (core
removal) and reopen windows in the hypervisor when the previously
lost credits are available.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/108928f9c00a48cc6a722315d482d07cf66acf5a.camel@linux.ibm.com
arch/powerpc/include/asm/vas.h
arch/powerpc/platforms/pseries/vas.c
arch/powerpc/platforms/pseries/vas.h