[Qemu-devel] [PATCH] libvhost-user: fix bad vu_log_write

Li Feng posted 1 patch 5 years ago
Test checkpatch passed
Test asan passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190420091016.213160-1-fengli@smartx.com
contrib/libvhost-user/libvhost-user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] libvhost-user: fix bad vu_log_write
Posted by Li Feng 5 years ago
Mark dirty as page, the step of each call is 1.

Signed-off-by: Li Feng <fengli@smartx.com>
---
 contrib/libvhost-user/libvhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
index e08d6c7b97..2689de6d1c 100644
--- a/contrib/libvhost-user/libvhost-user.c
+++ b/contrib/libvhost-user/libvhost-user.c
@@ -433,7 +433,7 @@ vu_log_write(VuDev *dev, uint64_t address, uint64_t length)
     page = address / VHOST_LOG_PAGE;
     while (page * VHOST_LOG_PAGE < address + length) {
         vu_log_page(dev->log_table, page);
-        page += VHOST_LOG_PAGE;
+        page += 1;
     }
 
     vu_log_kick(dev);
-- 
2.11.0


Re: [Qemu-devel] [PATCH] libvhost-user: fix bad vu_log_write
Posted by Marc-André Lureau 5 years ago
On Sat, Apr 20, 2019 at 11:11 AM Li Feng <lifeng1519@gmail.com> wrote:
>
> Mark dirty as page, the step of each call is 1.
>
> Signed-off-by: Li Feng <fengli@smartx.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  contrib/libvhost-user/libvhost-user.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
> index e08d6c7b97..2689de6d1c 100644
> --- a/contrib/libvhost-user/libvhost-user.c
> +++ b/contrib/libvhost-user/libvhost-user.c
> @@ -433,7 +433,7 @@ vu_log_write(VuDev *dev, uint64_t address, uint64_t length)
>      page = address / VHOST_LOG_PAGE;
>      while (page * VHOST_LOG_PAGE < address + length) {
>          vu_log_page(dev->log_table, page);
> -        page += VHOST_LOG_PAGE;
> +        page += 1;
>      }
>
>      vu_log_kick(dev);
> --
> 2.11.0
>
>


-- 
Marc-André Lureau