• Haren Myneni's avatar
    powerpc/pseries/vas: Modify reconfig open/close functions for migration · 716d7a2e
    Haren Myneni authored
    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: default avatarHaren Myneni <haren@linux.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/0aad580387cb58379496b4cbbd7c5596e9ea70be.camel@linux.ibm.com
    716d7a2e
vas.h 7.91 KB