linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vhost_vdpa: fix unmap process in no-batch mode
@ 2023-04-10 15:01 Cindy Lu
  2023-04-11  3:09 ` Jason Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Cindy Lu @ 2023-04-10 15:01 UTC (permalink / raw)
  To: lulu, jasowang, mst, kvm, linux-kernel, virtualization, netdev

While using the no-batch mode, the process will not begin with
VHOST_IOTLB_BATCH_BEGIN, so we need to add the
VHOST_IOTLB_INVALIDATE to get vhost_vdpa_as, the process is the
same as VHOST_IOTLB_UPDATE

Signed-off-by: Cindy Lu <lulu@redhat.com>
---
 drivers/vhost/vdpa.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 7be9d9d8f01c..32636a02a0ab 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -1074,6 +1074,7 @@ static int vhost_vdpa_process_iotlb_msg(struct vhost_dev *dev, u32 asid,
 		goto unlock;
 
 	if (msg->type == VHOST_IOTLB_UPDATE ||
+	    msg->type == VHOST_IOTLB_INVALIDATE ||
 	    msg->type == VHOST_IOTLB_BATCH_BEGIN) {
 		as = vhost_vdpa_find_alloc_as(v, asid);
 		if (!as) {
-- 
2.34.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-12  6:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-10 15:01 [PATCH] vhost_vdpa: fix unmap process in no-batch mode Cindy Lu
2023-04-11  3:09 ` Jason Wang
2023-04-11  7:28   ` Cindy Lu
2023-04-11  9:13     ` Jason Wang
2023-04-12  6:31       ` Cindy Lu
2023-04-12  6:37         ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).