Skip to contentSkip to conversation

vhost_vdpa: fix the compile issue in commit 881ac7d2314f

PATCH In review Cindy Lu 3 participants 6 messages Dec 20, 2022 – Dec 21, 2022

Subsystems (6)
lore
Share & tools
lore

Cindy Lu

author
#0 lore raw

PATCH 1/1 vhost_vdpa: fix the compile issue in commit 881ac7d2314f

The input of  vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f, But some function was not changed while calling this function. Add this change

Fixes 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")
---
 drivers/vhost/vdpa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/vhost/vdpa.c +3 -3
index 46ce35bea705..ec32f785dfde 100644
@@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
 static dev_t vhost_vdpa_major;
 
 static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
-				   struct vhost_iotlb *iotlb,
-				   u64 start, u64 last);
+				   struct vhost_iotlb *iotlb, u64 start,
+				   u64 last, u32 asid);
 
 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
 {
@@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
 		return -EINVAL;
 
 	hlist_del(&as->hash_link);
-	vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
+	vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
 	kfree(as);
 
 	return 0;
Signature · 1 line
2.34.3
#1 lore raw
Quoted 7 lines · Cindy Lu

The input of vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f, But some function was not changed while calling this function. Add this change

Fixes 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")

Is this commit merged into Linus tree?

Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy can squash the fix into the new version?

Thanks

Quoted 33 lines
---
 drivers/vhost/vdpa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/vhost/vdpa.c +3 -4
index 46ce35bea705..ec32f785dfde 100644
@@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
 static dev_t vhost_vdpa_major;
 
 static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
-                                  struct vhost_iotlb *iotlb,
-                                  u64 start, u64 last);
+                                  struct vhost_iotlb *iotlb, u64 start,
+                                  u64 last, u32 asid);
 
 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
 {
@@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
                return -EINVAL;
 
        hlist_del(&as->hash_link);
-       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
+       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
        kfree(as);
 
        return 0;
--

2.34.3

author
#2 lore raw
Quoted 10 lines · Jason Wang
Quoted 7 lines · Cindy Lu

The input of vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f, But some function was not changed while calling this function. Add this change

Fixes 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")
Quoted 7 lines

Is this commit merged into Linus tree?

Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy can squash the fix into the new version?

Thanks

This is not merged in linus tree, and this compile issue was hit in mst's tree should I send a new version squash the patch and the fix?

Thanks
Cindy

Quoted 34 lines
Quoted 33 lines
---
 drivers/vhost/vdpa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/vhost/vdpa.c +3 -4
index 46ce35bea705..ec32f785dfde 100644
@@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
 static dev_t vhost_vdpa_major;
 
 static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
-                                  struct vhost_iotlb *iotlb,
-                                  u64 start, u64 last);
+                                  struct vhost_iotlb *iotlb, u64 start,
+                                  u64 last, u32 asid);
 
 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
 {
@@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
                return -EINVAL;
 
        hlist_del(&as->hash_link);
-       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
+       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
        kfree(as);
 
        return 0;
--

2.34.3

#3 lore raw
Quoted 16 lines · Cindy Lu
Quoted 15 lines · Jason Wang
Quoted 7 lines · Cindy Lu

The input of vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f, But some function was not changed while calling this function. Add this change

Fixes 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")

Is this commit merged into Linus tree?

Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy can squash the fix into the new version?

Quoted 7 lines
Quoted 2 lines

Thanks

This is not merged in linus tree, and this compile issue was hit in mst's tree should I send a new version squash the patch and the fix?

Thanks
Cindy

No I fixed it myself. Pls check my tree now if it's not ok let me know. Thanks!

Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
---
 drivers/vhost/vdpa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/vhost/vdpa.c +3 -3
index 46ce35bea705..ec32f785dfde 100644
@@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
 static dev_t vhost_vdpa_major;
 
 static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
-                                  struct vhost_iotlb *iotlb,
-                                  u64 start, u64 last);
+                                  struct vhost_iotlb *iotlb, u64 start,
+                                  u64 last, u32 asid);
 
 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
 {
@@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
                return -EINVAL;
 
        hlist_del(&as->hash_link);
-       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
+       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
        kfree(as);
 
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
drivers/vhost/vdpa.c +0 -1
        return 0;
--

2.34.3

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#4 lore raw
In reply to Jason Wang
Quoted 9 lines · Jason Wang
Quoted 7 lines · Cindy Lu

The input of vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f, But some function was not changed while calling this function. Add this change

Fixes 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")
Quoted 6 lines

Is this commit merged into Linus tree?

Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy can squash the fix into the new version?

Thanks

Thanks, I fixed it myself already. Why do you want a respin? That will mean trouble as the fixed patch is now being tested.

Quoted 29 lines
Quoted 29 lines
---
 drivers/vhost/vdpa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/vhost/vdpa.c +3 -3
index 46ce35bea705..ec32f785dfde 100644
@@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
 static dev_t vhost_vdpa_major;
 
 static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
-                                  struct vhost_iotlb *iotlb,
-                                  u64 start, u64 last);
+                                  struct vhost_iotlb *iotlb, u64 start,
+                                  u64 last, u32 asid);
 
 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
 {
@@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
                return -EINVAL;
 
        hlist_del(&as->hash_link);
-       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
+       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
        kfree(as);
 
Quoted 4 lines
Quoted 4 lines
drivers/vhost/vdpa.c +0 -1
        return 0;
--

2.34.3

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#5 lore raw
Quoted 11 lines · Michael S. Tsirkin
Quoted 9 lines · Jason Wang
Quoted 7 lines · Cindy Lu

The input of vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f, But some function was not changed while calling this function. Add this change

Fixes 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")
Quoted 8 lines
Quoted 6 lines

Is this commit merged into Linus tree?

Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy can squash the fix into the new version?

Thanks

Thanks, I fixed it myself already. Why do you want a respin?

For some reason I miss v4, so it should be fine.

Thanks

Quoted 32 lines

That will mean trouble as the fixed patch is now being tested.

Quoted 29 lines
Quoted 29 lines
---
 drivers/vhost/vdpa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/vhost/vdpa.c +3 -3
index 46ce35bea705..ec32f785dfde 100644
@@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
 static dev_t vhost_vdpa_major;
 
 static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
-                                  struct vhost_iotlb *iotlb,
-                                  u64 start, u64 last);
+                                  struct vhost_iotlb *iotlb, u64 start,
+                                  u64 last, u32 asid);
 
 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
 {
@@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
                return -EINVAL;
 
        hlist_del(&as->hash_link);
-       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
+       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
        kfree(as);
 
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
drivers/vhost/vdpa.c +0 -1
        return 0;
--

2.34.3

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization