• Dexuan Cui's avatar
    Drivers: hv: vmbus: Suspend after cleaning up hv_sock and sub channels · b307b389
    Dexuan Cui authored
    Before suspend, Linux must make sure all the hv_sock channels have been
    properly cleaned up, because a hv_sock connection can not persist across
    hibernation, and the user-space app must be properly notified of the
    state change of the connection.
    
    Before suspend, Linux also must make sure all the sub-channels have been
    destroyed, i.e. the related channel structs of the sub-channels must be
    properly removed, otherwise they would cause a conflict when the
    sub-channels are recreated upon resume.
    
    Add a counter to track such channels, and vmbus_bus_suspend() should wait
    for the counter to drop to zero.
    Signed-off-by: default avatarDexuan Cui <decui@microsoft.com>
    Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    b307b389
hyperv_vmbus.h 9.55 KB