• Yishai Hadas's avatar
    vfio/mlx5: Enable querying state size which is > 4GB · 543640af
    Yishai Hadas authored
    Once the device supports 'chunk mode' the driver can support state size
    which is larger than 4GB.
    
    In that case the device has the capability to split a single image to
    multiple chunks as long as the software provides a buffer in the minimum
    size reported by the device.
    
    The driver should query for the minimum buffer size required using
    QUERY_VHCA_MIGRATION_STATE command with the 'chunk' bit set in its
    input, in that case, the output will include both the minimum buffer
    size (i.e.  required_umem_size) and also the remaining total size to be
    reported/used where that it will be applicable.
    
    At that point in the series the 'chunk' bit is off, the last patch will
    activate the feature once all pieces will be ready.
    
    Note:
    Before this change we were limited to 4GB state size as of 4 bytes max
    value based on the device specification for the query/save/load
    commands.
    Signed-off-by: default avatarYishai Hadas <yishaih@nvidia.com>
    Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
    Link: https://lore.kernel.org/r/20230911093856.81910-5-yishaih@nvidia.comSigned-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    543640af
cmd.c 43.7 KB