• Dragos Tatulea's avatar
    vdpa/mlx5: Fix mr->initialized semantics · 9ee81100
    Dragos Tatulea authored
    The mr->initialized flag is shared between the control vq and data vq
    part of the mr init/uninit. But if the control vq and data vq get placed
    in different ASIDs, it can happen that initializing the control vq will
    prevent the data vq mr from being initialized.
    
    This patch consolidates the control and data vq init parts into their
    own init functions. The mr->initialized will now be used for the data vq
    only. The control vq currently doesn't need a flag.
    
    The uninitializing part is also taken care of: mlx5_vdpa_destroy_mr got
    split into data and control vq functions which are now also ASID aware.
    
    Fixes: 8fcd20c3 ("vdpa/mlx5: Support different address spaces for control and data")
    Signed-off-by: default avatarDragos Tatulea <dtatulea@nvidia.com>
    Reviewed-by: default avatarEugenio Pérez <eperezma@redhat.com>
    Reviewed-by: default avatarGal Pressman <gal@nvidia.com>
    Message-Id: <20230802171231.11001-3-dtatulea@nvidia.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Acked-by: default avatarJason Wang <jasowang@redhat.com>
    9ee81100
mr.c 14.8 KB