From: "Eugenio Pérez" <eperezma@redhat.com>
To: mst@redhat.com, elic@nvidia.com
Cc: linux-kernel@vger.kernel.org, parav@nvidia.com, lulu@redhat.com,
jasowang@redhat.com, virtualization@lists.linux-foundation.org,
sgarzare@redhat.com, si-wei.liu@oracle.com
Subject: [RFC 1/3] vdpa/mlx5: reset iotlb at dup_iotlb
Date: Thu, 12 Jan 2023 15:22:16 +0100 [thread overview]
Message-ID: <20230112142218.725622-2-eperezma@redhat.com> (raw)
In-Reply-To: <20230112142218.725622-1-eperezma@redhat.com>
Regular memory region changes already reset cvq iotlb at set_map.
However this is not true if CVQ and data VQs are in different ASID.
Clean the CVQ iotlb every time we hit dup_iotlb.
Fixes: 8fcd20c30704 ("vdpa/mlx5: Support different address spaces for control and data")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
drivers/vdpa/mlx5/core/mr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c
index 0a1e0b0dc37e..ae34dcac9a3f 100644
--- a/drivers/vdpa/mlx5/core/mr.c
+++ b/drivers/vdpa/mlx5/core/mr.c
@@ -456,6 +456,8 @@ static int dup_iotlb(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *src)
u64 start = 0, last = ULLONG_MAX;
int err;
+ vhost_iotlb_reset(mvdev->cvq.iotlb);
+
if (!src) {
err = vhost_iotlb_add_range(mvdev->cvq.iotlb, start, last, start, VHOST_ACCESS_RW);
return err;
--
2.31.1
next prev parent reply other threads:[~2023-01-12 14:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 14:22 [RFC 0/3] MLX Adress Space ID + Control VirtQueue fixes Eugenio Pérez
2023-01-12 14:22 ` Eugenio Pérez [this message]
2023-01-16 6:31 ` [RFC 1/3] vdpa/mlx5: reset iotlb at dup_iotlb Eli Cohen
2023-01-16 18:16 ` Eugenio Perez Martin
2023-01-12 14:22 ` [RFC 2/3] vdpa/mlx5: conditionally delete cvq iotlb in destroy_mr Eugenio Pérez
2023-01-16 7:03 ` Eli Cohen
2023-01-16 18:03 ` Eugenio Perez Martin
2023-01-17 7:07 ` Eli Cohen
2023-01-17 7:25 ` Eugenio Perez Martin
2023-01-12 14:22 ` [RFC 3/3] vdpa/mlx5: take iommu_lock at dup_iotlb Eugenio Pérez
2023-01-16 7:13 ` Eli Cohen
2023-01-16 10:39 ` Eugenio Perez Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230112142218.725622-2-eperezma@redhat.com \
--to=eperezma@redhat.com \
--cc=elic@nvidia.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lulu@redhat.com \
--cc=mst@redhat.com \
--cc=parav@nvidia.com \
--cc=sgarzare@redhat.com \
--cc=si-wei.liu@oracle.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®