[PATCH v7 0/2] vhost-user hardware notifier bug fixes

2022-02-06 Thread Xueming Li
Fix 2 ciritical bugs of vhost-user hardware notifier. Xueming Li (2): vhost-user: remove VirtQ notifier restore vhost-user: fix VirtQ notifier cleanup hw/virtio/vhost-user.c | 61 +++--- include/hw/virtio/vhost-user.h | 3 +- 2 files changed, 29

[PATCH v7 1/2] vhost-user: remove VirtQ notifier restore

2022-02-06 Thread Xueming Li
er to avoid invalid address access. After backend restart, the backend should ask qemu to install a hardware notifier if needed. Fixes: 44866521bd6e ("vhost-user: support registering external host notifiers") Cc: qemu-sta...@nongnu.org Signed-off-by: Xueming Li --- hw/virtio/vhost-user

[PATCH v7 2/2] vhost-user: fix VirtQ notifier cleanup

2022-02-06 Thread Xueming Li
underlying notifier mmap address is being freed and becomes invalid. This patch calls RCU and munmap notifiers in the callback after the memory flatview update finish. Fixes: 44866521bd6e ("vhost-user: support registering external host notifiers") Cc: qemu-sta...@nongnu.org Signed-off-b

[PATCH v6 2/2] vhost-user: fix VirtQ notifier cleanup

2021-11-01 Thread Xueming Li
vhost-user: support registering external host notifiers") Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 50 +- include/hw/virtio/vhost-user.h | 2 ++ 2 files changed, 33 insertions(+), 19 deletion

[PATCH v6 0/2] Improve vhost-user VQ notifier unmap

2021-11-01 Thread Xueming Li
.html v6: use call_rcu to avoid dead lock in rcu reader Xueming Li (2): vhost-user: remove VirtQ notifier restore vhost-user: fix VirtQ notifier cleanup hw/virtio/vhost-user.c | 63 -- include/hw/virtio/vhost-user.h | 3 +- 2 files changed, 31 insertions

[PATCH v6 1/2] vhost-user: remove VirtQ notifier restore

2021-11-01 Thread Xueming Li
invalid address. Fixes: 44866521bd6e ("vhost-user: support registering external host notifiers") Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 19 +-- include/hw/virtio/vhost-user.h | 1 - 2 files changed, 1 insert

[PATCH v5 1/2] vhost-user: fix VirtQ notifier cleanup

2021-10-19 Thread Xueming Li
pport registering external host notifiers") Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index bf6e50223c..

[PATCH v5 2/2] vhost-user: remove VirtQ notifier restore

2021-10-19 Thread Xueming Li
fiers") Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 19 +-- include/hw/virtio/vhost-user.h | 1 - 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-us

[PATCH v5 0/2] Improve vhost-user VQ notifier unmap

2021-10-19 Thread Xueming Li
style and comments https://lists.nongnu.org/archive/html/qemu-devel/2021-10/msg01764.html v4: fix first patch compilation https://lists.nongnu.org/archive/html/qemu-devel/2021-10/msg04060.html v5: update 2/2 commit message Xueming Li (2): vhost-user: fix VirtQ notifier cleanup vhost-user

[PATCH v4 2/2] vhost-user: remove VirtQ notifier restore

2021-10-18 Thread Xueming Li
Cc: tiwei@intel.com Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 19 +-- include/hw/virtio/vhost-user.h | 1 - 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-us

[PATCH v4 0/2] Improve vhost-user VQ notifier unmap

2021-10-18 Thread Xueming Li
style and comments https://lists.nongnu.org/archive/html/qemu-devel/2021-10/msg01764.html v4: fix first patch compilation Xueming Li (2): vhost-user: fix VirtQ notifier cleanup vhost-user: remove VirtQ notifier restore hw/virtio/vhost-user.c | 41

[PATCH v4 1/2] vhost-user: fix VirtQ notifier cleanup

2021-10-18 Thread Xueming Li
pport registering external host notifiers") Cc: tiwei@intel.com Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-us

[PATCH v3 2/2] vhost-user: remove VirtQ notifier restore

2021-10-08 Thread Xueming Li
Cc: tiwei@intel.com Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 20 ++-- include/hw/virtio/vhost-user.h | 1 - 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-us

[PATCH v0] vhost-user: fix duplicated notifier MR init

2021-10-08 Thread Xueming Li
uwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 2c8556237f..bf6e50223c 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -1526,8 +1526,9

[PATCH v3 1/2] vhost-user: fix VirtQ notifier cleanup

2021-10-08 Thread Xueming Li
pport registering external host notifiers") Cc: tiwei@intel.com Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-us

[PATCH v3 0/2] Improve vhost-user VQ notifier unmap

2021-10-08 Thread Xueming Li
style and comments Xueming Li (2): vhost-user: fix VirtQ notifier cleanup vhost-user: remove VirtQ notifier restore hw/virtio/vhost-user.c | 41 +- include/hw/virtio/vhost-user.h | 1 - 2 files changed, 16 insertions(+), 26 deletions(-) -- 2.33.0

[PATCH v2 0/2] Improve vhost-user VQ notifier unmap

2021-09-17 Thread Xueming Li
When vDPA applicaiton in client mode shutdown, unmapped VQ notifier might being accessed by vCPU thread under high tx traffic, it will crash VM in rare conditon. This patch try to fix it with better RCU sychronization of new flatview. v2: no RCU draining on vCPU thread Xueming Li (2): vhost

[PATCH v2 2/2] vhost-user: remove VirtQ notifier restore

2021-09-17 Thread Xueming Li
Cc: tiwei@intel.com Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 20 ++-- include/hw/virtio/vhost-user.h | 1 - 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-us

[PATCH v2 1/2] vhost-user: fix VirtQ notifier cleanup

2021-09-17 Thread Xueming Li
-user: support registering external host notifiers") Cc: tiwei@intel.com Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-user.c b

[PATCH 0/2] Improve vhost-user VQ notifier unmap

2021-09-12 Thread Xueming Li
When vDPA applicaiton in client mode shutdown, unmapped VQ notifier might being accessed by VM thread under hight tx traffic, it will crash VM in rare conditon. This patch try to fix it with better RCU sychronization of new flatview. Xueming Li (2): vhost-user: fix VirtQ notifier cleanup

[PATCH 1/2] vhost-user: fix VirtQ notifier cleanup

2021-09-12 Thread Xueming Li
pport registering external host notifiers") Cc: tiwei@intel.com Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-us

[PATCH 2/2] vhost-user: remove VirtQ notifier restore

2021-09-12 Thread Xueming Li
Cc: tiwei@intel.com Cc: qemu-sta...@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li --- hw/virtio/vhost-user.c | 19 +-- include/hw/virtio/vhost-user.h | 1 - 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-us