They will be used in a followup patch.
Signed-off-by: Dragos Tatulea
---
drivers/vdpa/mlx5/core/mr.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c
index 3dee6d9bed6b..a4135c16b5bf 100644
---
For the following sequence:
- cvq group is in ASID 0
- .set_map(1, cvq_iotlb)
- .set_group_asid(cvq_group, 1)
... the cvq mapping from ASID 0 will be used. This is not always correct
behaviour.
This patch adds support for the above mentioned flow by saving the iotlb
on each .set_map and updating
Vq descriptor mappings are supported in hardware by filling in an
additional mkey which contains the descriptor mappings to the hw vq.
A previous patch in this series added support for hw mkey (mr) creation
for ASID 1.
This patch fills in both the vq data and vq descriptor mkeys based on
group
Introduce the vq descriptor group and ASID 1. Until now .set_map on ASID
1 was only updating the cvq iotlb. From now on it also creates a mkey
for it. The current patch doesn't use it but follow-up patches will
add hardware support for mapping the vq descriptors.
Signed-off-by: Dragos Tatulea
The mutex is named like it is supposed to protect only the mkey but in
reality it is a global lock for all mr resources.
Shift the mutex to it's rightful location (struct mlx5_vdpa_dev) and
give it a more appropriate name.
Signed-off-by: Dragos Tatulea
---
drivers/vdpa/mlx5/core/mlx5_vdpa.h |
Now that the cvq code is out of mlx5_vdpa_create/destroy_mr, the "dvq"
functions can be folded into their callers.
Having "dvq" in the naming will no longer be accurate in the downstream
patches.
Acked-by: Jason Wang
Signed-off-by: Dragos Tatulea
---
drivers/vdpa/mlx5/core/mr.c | 16
The current flow for updating an mr works directly on mvdev->mr which
makes it cumbersome to handle multiple new mr structs.
This patch makes the flow more straightforward by having
mlx5_vdpa_create_mr return a new mr which will update the old mr (if
any). The old mr will be deleted and unlinked
The reslock is taken while refresh is called but iommu_lock is more
specific to this resource. So take the iommu_lock during cvq iotlb
refresh.
Based on Eugenio's patch [0].
[0] https://lore.kernel.org/lkml/20230112142218.725622-4-epere...@redhat.com/
Acked-by: Jason Wang
Suggested-by: Eugenio
This patch adapts the mr creation/deletion code to be able to work with
any given mr struct pointer. All the APIs are adapted to take an extra
parameter for the mr.
mlx5_vdpa_create/delete_mr doesn't need a ASID parameter anymore. The
check is done in the caller instead (mlx5_set_map).
This
Make mlx5_destroy_mr symmetric to mlx5_create_mr.
Acked-by: Jason Wang
Signed-off-by: Dragos Tatulea
---
drivers/vdpa/mlx5/core/mlx5_vdpa.h | 4 ++--
drivers/vdpa/mlx5/core/mr.c| 6 +++---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 12 ++--
3 files changed, 11 insertions(+), 11
The handling of the cvq iotlb is currently coupled with the creation
and destruction of the hardware mkeys (mr).
This patch moves cvq iotlb handling into its own function and shifts it
to a scope that is not related to mr handling. As cvq handling is just a
prune_iotlb + dup_iotlb cycle, put it
From: Si-Wei Liu
With _F_DESC_ASID backend feature, the device can now support the
VHOST_VDPA_GET_VRING_DESC_GROUP ioctl, and it may expose the descriptor
table (including avail and used ring) in a different group than the
buffers it contains. This new uAPI will fetch the group ID of the
Necessary for upcoming cvq separation from mr allocation.
Acked-by: Jason Wang
Signed-off-by: Dragos Tatulea
---
drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 +
drivers/vdpa/mlx5/core/mr.c| 5 +
drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
3 files changed, 8 insertions(+), 2 deletions(-)
From: Si-Wei Liu
Userspace knows if the device has dedicated descriptor group or not
by checking this feature bit.
It's only exposed if the vdpa driver backend implements the
.get_vq_desc_group() operation callback. Userspace trying to negotiate
this feature when it or the dependent
From: Si-Wei Liu
In some cases, the access to the virtqueue's descriptor area, device
and driver areas (precluding indirect descriptor table in guest memory)
may have to be confined to a different address space than where its
buffers reside. Without loss of simplicity and generality with already
Necessary for improved live migration flow. Actual support will be added
in a downstream patch.
Reviewed-by: Gal Pressman
Signed-off-by: Dragos Tatulea
---
include/linux/mlx5/mlx5_ifc.h | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/linux/mlx5/mlx5_ifc.h
This patch series adds support for vq descriptor table mappings which
are used to improve vdpa live migration downtime. The improvement comes
from using smaller mappings which take less time to create and destroy
in hw.
The first part adds the vdpa core changes from Si-Wei [0].
The second part
This patch series adds support for vq descriptor table mappings which
are used to improve vdpa live migration downtime. The improvement comes
from using smaller mappings which take less time to create and destroy
in hw.
The first part adds the vdpa core changes from Si-Wei [0].
The second part
Fix a misspelling of "preceding".
Signed-off-by: Geert Uytterhoeven
---
drivers/vhost/scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index abef0619c7901af0..2d689181bafef241 100644
--- a/drivers/vhost/scsi.c
+++
19 matches
Mail list logo