aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorHaren Myneni <haren@linux.ibm.com>2022-02-27 23:52:08 -0800
committerMichael Ellerman <mpe@ellerman.id.au>2022-03-08 00:04:56 +1100
commit716d7a2e3764cb79061371767bff1a691adb4e7f (patch)
tree3e23d09192683a8d41f1ae673264724209de67df /arch/powerpc/include
parentpowerpc/pseries/vas: Define global hv_cop_caps struct (diff)
downloadwireguard-linux-716d7a2e3764cb79061371767bff1a691adb4e7f.tar.xz
wireguard-linux-716d7a2e3764cb79061371767bff1a691adb4e7f.zip
powerpc/pseries/vas: Modify reconfig open/close functions for migration
VAS is a hardware engine stays on the chip. So when the partition migrates, all VAS windows on the source system have to be closed and reopen them on the destination after migration. The kernel has to consider both DLPAR CPU and migration events to take action on VAS windows. So using VAS_WIN_NO_CRED_CLOSE and VAS_WIN_MIGRATE_CLOSE status bits and windows will be reopened after migration only after both status bits are cleared. This patch make changes to the current reconfig_open/close_windows functions to support migration: - Set VAS_WIN_MIGRATE_CLOSE to the window status 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. - If the DLPAR CPU event happens while 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 <haren@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/0aad580387cb58379496b4cbbd7c5596e9ea70be.camel@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/vas.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/vas.h b/arch/powerpc/include/asm/vas.h
index 6baf7b9ffed4..83afcb6c194b 100644
--- a/arch/powerpc/include/asm/vas.h
+++ b/arch/powerpc/include/asm/vas.h
@@ -36,6 +36,8 @@
/* vas mmap() */
/* Window is closed in the hypervisor due to lost credit */
#define VAS_WIN_NO_CRED_CLOSE 0x00000001
+/* Window is closed due to migration */
+#define VAS_WIN_MIGRATE_CLOSE 0x00000002
/*
* Get/Set bit fields