From: Xie Yongji
Use a zero-initialized VuVirtqInflightDesc struct to avoid
that scan-build reports that vq->resubmit_list[0].counter may
be garbage value in vu_check_queue_inflights().
Fixes: 5f9ff1eff ("libvhost-user: Support tracking inflight I/O in
shared memory")
Reported-by: Marc-André
From: Xie Yongji
Use a zero-initialized VuVirtqInflightDesc struct to avoid
that scan-build reports that vq->resubmit_list[0].counter may
be garbage value in vu_check_queue_inflights().
Fixes: 5f9ff1eff ("libvhost-user: Support tracking inflight I/O in
shared memory")
Reported-by: Marc-André
From: Xie Yongji
This avoids memory leak when device hotplug is failed.
Signed-off-by: Xie Yongji
---
hw/scsi/vhost-user-scsi.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index
From: Xie Yongji
This avoids memory leak when device hotplug is failed.
Signed-off-by: Xie Yongji
---
hw/scsi/vhost-scsi.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 4090f99ee4..c0dd9bdf89 100644
---
From: Xie Yongji
This avoids memory leak when device hotplug is failed.
Signed-off-by: Xie Yongji
---
hw/scsi/vhost-scsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 4090f99ee4..db4a090576 100644
---
From: Xie Yongji
This avoids memory leak when device hotplug is failed.
Signed-off-by: Xie Yongji
---
hw/scsi/vhost-user-scsi.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index
From: Xie Yongji
We should set the flags: "start_on_kick" and "started" after we call
the kick functions (handle_aio_output() and handle_output()).
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/virtio.c
From: Xie Yongji
The guest feature is not set correctly on virtio_reset() and
virtio_init(). So we should not use it to set "start_on_kick" at that
point. This patch set "start_on_kick" on virtio_set_features() instead.
Fixes: badaf79cfdbd3 ("virtio: Introduce started flag to VirtioDevice")
From: Xie Yongji
We will call virtio_set_status() on virtio_vmstate_change().
The "started" flag should not be changed in this case. Otherwise,
we may get an incorrect value when we set "started" flag but
not set DRIVER_OK in source VM.
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 5
From: Xie Yongji
In order to avoid migration issues, we introduce a "use-started"
property to the base virtio device to indicate whether use
"started" flag or not. This property will be true by default and
set to false when machine type <= 4.0.
Suggested-by: Greg Kurz
Signed-off-by: Xie Yongji
From: Xie Yongji
We introduced two flags "started" and "start_on_kick" to indicate virtio
device's state before. But there still are some problems with them. So
we try to fixup them in this patchset.
The patch 1 introduces a "use-started" property to avoid a migration
issue under Greg Kurz's
From: Xie Yongji
Besides virtio 1.0 transitional devices, we should also
set "start_on_kick" flag for legacy devices (virtio 0.9).
Signed-off-by: Xie Yongji
Reviewed-by: Greg Kurz
---
hw/virtio/virtio.c | 6 ++
include/hw/virtio/virtio.h | 2 +-
2 files changed, 3 insertions(+),
From: Xie Yongji
Besides virtio 1.0 transitional devices, we should also
set "start_on_kick" flag for legacy devices (virtio 0.9).
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 6 ++
include/hw/virtio/virtio.h | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff
From: Xie Yongji
We will call virtio_set_status() on virtio_vmstate_change().
The "started" flag should not be changed in this case. Otherwise,
we may get an incorrect value when we set "started" flag but
not set DRIVER_OK in source VM.
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 5
From: Xie Yongji
We introduced two flags "started" and "start_on_kick" to indicate virtio
device's state before. But there still are some problems with them. So
we try to fixup them in this patchset.
The patch 1 introduces a "use-started" property to avoid a migration
issue under Greg Kurz's
From: Xie Yongji
We should set the flags: "start_on_kick" and "started" after we call
the kick functions (handle_aio_output() and handle_output()).
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/virtio.c
From: Xie Yongji
The guest feature is not set correctly on virtio_reset() and
virtio_init(). So we should not use it to set "start_on_kick" at that
point. This patch set "start_on_kick" on virtio_set_features() instead.
Fixes: badaf79cfdbd3 ("virtio: Introduce started flag to VirtioDevice")
From: Xie Yongji
In order to avoid migration issues, we introduce a "use-started"
property to the base virtio device to indicate whether use
"started" flag or not. This property will be true by default and
set to false when machine type <= 4.0.1.
Suggested-by: Greg Kurz
Signed-off-by: Xie
From: Xie Yongji
The guest feature is not set correctly on virtio_reset() and
virtio_init(). So we should not use it to set "start_on_kick" at that
point. This patch set "start_on_kick" on virtio_set_features() instead.
Fixes: badaf79cfdbd3 ("virtio: Introduce started flag to VirtioDevice")
From: Xie Yongji
We should set the flags: "start_on_kick" and "started" after we call
the kick functions (handle_aio_output() and handle_output()).
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/virtio.c
From: Xie Yongji
In order to avoid migration issues, we introduce a "use-started"
property to the base virtio device to indicate whether use
"started" flag or not. This property will be true by default and
set to false when machine type <= 4.0.1.
Signed-off-by: Xie Yongji
---
From: Xie Yongji
We will call virtio_set_status() on virtio_vmstate_change().
The "started" flag should not be changed in this case. Otherwise,
we may get an incorrect value when we set "started" flag but
not set DRIVER_OK in source VM.
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 10
From: Xie Yongji
We introduced two flags "started" and "start_on_kick" to indicate virtio
device's state before. But there still are some problems with them. So
we try to fixup them in this patchset.
The patch 1 fixes a regression bug that old guest is not able to boot with
vhost-user-blk
From: Xie Yongji
Besides virtio 1.0 transitional devices, we should also
set "start_on_kick" flag for legacy devices (virtio 0.9).
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 2 --
include/hw/virtio/virtio.h | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git
From: Xie Yongji
We will call virtio_set_status() on virtio_vmstate_change().
The "started" flag should not be changed in this case. Otherwise,
we may get an incorrect value when we set "started" flag but
not set DRIVER_OK in source VM.
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 10
From: Xie Yongji
We should migrate the "start_on_kick" flag so that we
would not miss starting device on kicking at startup
after migration.
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/hw/virtio/virtio.c
From: Xie Yongji
In order to avoid migration issues, we introduce a "use-started"
property to the base virtio device to indicate whether "started"
and "start_on_kick" flag could be used. This property will be
true by default and set to false when machine type <= 4.0.
Suggested-by: Greg Kurz
From: Xie Yongji
We should set the flags: "start_on_kick" and "started" after we call
the kick functions (handle_aio_output() and handle_output()).
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/virtio.c
From: Xie Yongji
The guest feature is not set correctly on virtio_reset() and
virtio_init(). So we should not use it to set "start_on_kick" at that
point. This patch set "start_on_kick" on virtio_set_features() instead.
Signed-off-by: Xie Yongji
---
hw/virtio/virtio.c | 25
From: Xie Yongji
We introduced two flags "started" and "start_on_kick" to indicate virtio
device's state before. But there still are some problems with them. So
we try to fixup them in this patchset.
The patch 1 fixes a regression bug that old guest is not able to boot with
vhost-user-blk
From: Xie Yongji
Add a return value for vhost_user_blk_start() to check whether
we start vhost-user backend successfully or not.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
From: Xie Yongji
This patch enables inflight I/O tracking for
vhost-user-blk backend so that we could restart it safely.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Xie Yongji
We should only start vhost-user backend at the first kick for
virtio 1.0 transitional devices.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/block/vhost-user-blk.c
From: Xie Yongji
Since we now support the message VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD. The backend is able to restart
safely because it can track inflight I/O in shared memory.
This patch allows qemu to reconnect the backend after
connection closed.
Signed-off-by: Xie
From: Xie Yongji
Currently, we use DRIVER_OK status bit to check whether guest
driver has started the device in virtio_vmstate_change(). But it's
not the case for virtio 1.0 transitional devices. If migration completes
between kicking virtqueue and setting VIRTIO_CONFIG_S_DRIVER_OK, guest
may be
From: Xie Yongji
Use started flag in vhost_user_blk_set_status() to decide if
starting vhost-user backend or not.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/block/vhost-user-blk.c
From: Xie Yongji
The virtio 1.0 transitional devices support driver uses the device
before setting the DRIVER_OK status bit. So we introduce a started
flag to indicate whether driver has started the device or not.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/virtio/virtio.c
From: Xie Yongji
This patchset is aimed at supporting qemu to reconnect
vhost-user-blk backend after vhost-user-blk backend crash or
restart.
The patch 1,2,3 introduce started flag to VirtioDevice to
fix possible guest hung after migration for virtio 1.0
transitional devices.
The patch 4,5,6
From: Xie Yongji
This patch enables inflight I/O tracking for
vhost-user-blk backend so that we could restart it safely.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Xie Yongji
Since we now support the message VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD. The backend is able to restart
safely because it can track inflight I/O in shared memory.
This patch allows qemu to reconnect the backend after
connection closed.
Signed-off-by: Xie
From: Xie Yongji
This patch adds support for VHOST_USER_GET_INFLIGHT_FD and
VHOST_USER_SET_INFLIGHT_FD message to set/get shared buffer
to/from qemu. Then backend can track inflight I/O in this buffer.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
Makefile
From: Xie Yongji
This patch adds support for vhost-user-blk device to get/set
inflight buffer from/to backend.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c | 28
include/hw/virtio/vhost-user-blk.h | 1 +
2 files
From: Xie Yongji
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared
buffer between qemu and backend.
Firstly, qemu uses VHOST_USER_GET_INFLIGHT_FD to get the
shared buffer from backend. Then qemu should send it back
From: Xie Yongji
This patchset is aimed at supporting qemu to reconnect
vhost-user-blk backend after vhost-user-blk backend crash or
restart.
The patch 1 introduces two new messages VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD to support transferring shared
buffer between qemu and
From: Xie Yongji
Introduce vu_queue_map_desc() which should be
independent with vu_queue_pop();
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
Reviewed-by: Marc-André Lureau
---
contrib/libvhost-user/libvhost-user.c | 88 ---
1 file changed, 51 insertions(+), 37
From: Xie Yongji
The vu_check_queue_msg_file() has checked the FD flag. So let's
delete the redundant check after it.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/libvhost-user/libvhost-user.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git
From: Xie Yongji
The vu_check_queue_msg_file() has checked the FD flag. So let's
delete the redundant check after it.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/libvhost-user/libvhost-user.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git
From: Xie Yongji
This patch adds support for VHOST_USER_GET_INFLIGHT_FD and
VHOST_USER_SET_INFLIGHT_FD message to set/get shared buffer
to/from qemu. Then backend can track inflight I/O in this buffer.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
Makefile
From: Xie Yongji
This patch enables inflight I/O tracking for
vhost-user-blk backend so that we could restart it safely.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Xie Yongji
Introduce vu_queue_map_desc() which should be
independent with vu_queue_pop();
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
Reviewed-by: Marc-André Lureau
---
contrib/libvhost-user/libvhost-user.c | 88 ---
1 file changed, 51 insertions(+), 37
From: Xie Yongji
This patch adds support for vhost-user-blk device to get/set
inflight buffer from/to backend.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c | 28
include/hw/virtio/vhost-user-blk.h | 1 +
2 files
From: Xie Yongji
Since we now support the message VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD. The backend is able to restart
safely because it can track inflight I/O in shared memory.
This patch allows qemu to reconnect the backend after
connection closed.
Signed-off-by: Xie
From: Xie Yongji
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared
buffer between qemu and backend.
Firstly, qemu uses VHOST_USER_GET_INFLIGHT_FD to get the
shared buffer from backend. Then qemu should send it back
From: Xie Yongji
This patchset is aimed at supporting qemu to reconnect
vhost-user-blk backend after vhost-user-blk backend crash or
restart.
The patch 1 introduces two new messages VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD to support transferring shared
buffer between qemu and
From: Xie Yongji
This patch enables inflight I/O tracking for
vhost-user-blk backend so that we could restart it safely.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Xie Yongji
This patch adds support for VHOST_USER_GET_INFLIGHT_FD and
VHOST_USER_SET_INFLIGHT_FD message to set/get shared buffer
to/from qemu. Then backend can track inflight I/O in this buffer.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
Makefile
From: Xie Yongji
Since we now support the message VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD. The backend is able to restart
safely because it can track inflight I/O in shared memory.
This patch allows qemu to reconnect the backend after
connection closed.
Signed-off-by: Xie
From: Xie Yongji
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared
buffer between qemu and backend.
Firstly, qemu uses VHOST_USER_GET_INFLIGHT_FD to get the
shared buffer from backend. Then qemu should send it back
From: Xie Yongji
This patch adds support for vhost-user-blk device to get/set
inflight buffer from/to backend.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c | 26 ++
include/hw/virtio/vhost-user-blk.h | 1 +
2 files changed,
From: Xie Yongji
Introduce vu_queue_map_desc() which should be
independent with vu_queue_pop();
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
Reviewed-by: Marc-André Lureau
---
contrib/libvhost-user/libvhost-user.c | 88 ---
1 file changed, 51 insertions(+), 37
From: Xie Yongji
This patchset is aimed at supporting qemu to reconnect
vhost-user-blk backend after vhost-user-blk backend crash or
restart.
The patch 1 introduces two new messages VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD to support support transferring shared
buffer between
From: Xie Yongji
This patch adds support for VHOST_USER_GET_INFLIGHT_FD and
VHOST_USER_SET_INFLIGHT_FD message to set/get shared memory
to/from qemu. Then we maintain a "bitmap" of all descriptors in
the shared memory for each queue to track inflight I/O.
Signed-off-by: Xie Yongji
From: Xie Yongji
Introduce vu_queue_map_desc() which should be
independent with vu_queue_pop();
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
Reviewed-by: Marc-André Lureau
---
contrib/libvhost-user/libvhost-user.c | 88 ---
1 file changed, 51 insertions(+), 37
From: Xie Yongji
Since we now support the message VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD. The backend is able to restart
safely because it can track inflight I/O in shared memory.
This patch allows qemu to reconnect the backend after
connection closed.
Signed-off-by: Xie
From: Xie Yongji
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared
buffer between qemu and backend.
Firstly, qemu uses VHOST_USER_GET_INFLIGHT_FD to get the
shared buffer from backend. Then qemu should send it back
From: Xie Yongji
This patch enables inflight I/O tracking for
vhost-user-blk backend so that we could restart it safely.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Xie Yongji
This patch adds support for vhost-user-blk device to get/set
inflight buffer from/to backend.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c | 26 ++
include/hw/virtio/vhost-user-blk.h | 1 +
2 files changed,
From: Xie Yongji
Enable "nowait" option to make QEMU not do a connect
on client sockets during initialization of the chardev.
Then we can use qemu_chr_fe_wait_connected() to connect
when necessary. Now it would be used for unix domain
socket of vhost-user-blk device to support reconnect.
From: Xie Yongji
This patchset is aimed at supporting qemu to reconnect
vhost-user-blk backend after vhost-user-blk backend crash or
restart.
The patch 1 uses exisiting wait/nowait options to make QEMU not
do a connect on client sockets during initialization of the chardev.
The patch 2
From: Xie Yongji
Since we now support the message VHOST_USER_GET_SHM_SIZE
and VHOST_USER_SET_SHM_FD. The backend is able to restart
safely because it can record inflight I/O in shared memory.
This patch allows qemu to reconnect the backend after
connection closed.
Signed-off-by: Xie Yongji
From: Xie Yongji
This patch enables inflight I/O recording for
vhost-user-blk backend so that we could restart it safely.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Xie Yongji
This patch add supports for vhost-user-blk device to provide
shared memory to backend.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c | 26 ++
include/hw/virtio/vhost-user-blk.h | 1 +
2 files changed, 27
From: Xie Yongji
Enable "nowait" option to make QEMU not do a connect
on client sockets during initialization of the chardev.
Then we can use qemu_chr_fe_wait_connected() to connect
when necessary. Now it would be used for unix domain
socket of vhost-user-blk device to support reconnect.
From: Xie Yongji
Introduce vu_queue_map_desc() which should be
independent with vu_queue_pop();
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
Reviewed-by: Marc-André Lureau
---
contrib/libvhost-user/libvhost-user.c | 88 ---
1 file changed, 51 insertions(+), 37
From: Xie Yongji
This patch introduces two new messages VHOST_USER_GET_SHM_SIZE
and VHOST_USER_SET_SHM_FD to support providing shared
memory to backend.
Firstly, qemu uses VHOST_USER_GET_SHM_SIZE to get the
required size of shared memory from backend. Then, qemu
allocates memory and sends them
From: Xie Yongji
This patchset is aimed at supporting qemu to reconnect
vhost-user-blk backend after vhost-user-blk backend crash or
restart.
The patch 1 uses exisiting wait/nowait options to make QEMU not
do a connect on client sockets during initialization of the chardev.
The patch 2
From: Xie Yongji
This patch adds support for VHOST_USER_GET_SHM_SIZE and
VHOST_USER_SET_SHM_FD message to get shared memory from qemu.
Then we maintain a "bitmap" of all descriptors in
the shared memory for each queue to record inflight I/O.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
From: Xie Yongji
Since we now support the message VHOST_USER_GET_SHM_SIZE
and VHOST_USER_SET_SHM_FD. The backend is able to restart
safely because it can record inflight I/O in shared memory.
This patch allows qemu to reconnect the backend after
connection closed.
Signed-off-by: Xie Yongji
From: Xie Yongji
This patch add supports for vhost-user-blk device to provide
shared memory to backend.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c | 26 ++
include/hw/virtio/vhost-user-blk.h | 1 +
2 files changed, 27
From: Xie Yongji
Introduce vu_queue_map_desc() which should be
independent with vu_queue_pop();
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
Reviewed-by: Marc-André Lureau
---
contrib/libvhost-user/libvhost-user.c | 88 ---
1 file changed, 51 insertions(+), 37
From: Xie Yongji
This patch enables inflight I/O recording for
vhost-user-blk backend so that we could restart it safely.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Xie Yongji
New option "disconnected" is added to init the chardev socket
in disconnected state. Then we can use qemu_chr_fe_wait_connected()
to connect when necessary. Now it would be used for unix domain
socket of vhost-user-blk device to support reconnect.
Suggested-by: Yury Kotov
From: Xie Yongji
This patch adds support for VHOST_USER_GET_SHM_SIZE and
VHOST_USER_SET_SHM_FD message to get shared memory from qemu.
Then we maintain a "bitmap" of all descriptors in
the shared memory for each queue to record inflight I/O.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
From: Xie Yongji
This patch introduces two new messages VHOST_USER_GET_SHM_SIZE
and VHOST_USER_SET_SHM_FD to support providing shared
memory to backend.
Firstly, qemu uses VHOST_USER_GET_SHM_SIZE to get the
required size of shared memory from backend. Then, qemu
allocates memory and sends them
From: Xie Yongji
This patchset is aimed at supporting qemu to reconnect
vhost-user-blk backend after vhost-user-blk backend crash or
restart.
The patch 1 adds a "disconnected" option to init the chardev socket
in disconnected state.
The patch 2 introduces two new messages
From: Xie Yongji
This patch tells qemu that we now support inflight I/O recording
so that qemu could offer shared memory to it.
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/vhost-user-blk/vhost-user-blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Xie Yongji
This introduces a new message VHOST_USER_SET_VRING_INFLIGHT
to support offering shared memory to backend to record
its inflight I/O.
With this new message, the backend is able to restart without
missing I/O which would cause I/O hung for block device.
Signed-off-by: Xie Yongji
From: Xie Yongji
Introduce vu_queue_map_desc() which should be
independent with vu_queue_pop();
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
contrib/libvhost-user/libvhost-user.c | 86 +++
1 file changed, 49 insertions(+), 37 deletions(-)
diff --git
From: Xie Yongji
This patch adds support for VHOST_USER_SET_VRING_INFLIGHT
message. Now we maintain a "bitmap" of all descriptors in
the shared memory for each queue. Then set it in vu_queue_pop()
and clear it in vu_queue_push();
Signed-off-by: Xie Yongji
Signed-off-by: Zhang Yu
---
From: Xie Yongji
Since the new message VHOST_USER_SET_VRING_INFLIGHT,
the backend is able to restart safely. This patch
allow qemu to reconnect the backend after connection
closed.
Signed-off-by: Xie Yongji
Signed-off-by: Ni Xun
Signed-off-by: Zhang Yu
---
hw/block/vhost-user-blk.c
From: Xie Yongji
Now we attempt to connect asynchronously for "reconnect socket"
during open(). But vhost-user device prefer a connected socket
during initialization. That means we may still need to support
sync connection during open() for the "reconnect socket".
Signed-off-by: Xie Yongji
From: Xie Yongji
This patchset is aimed at supporting qemu to reconnect
vhost-user-blk backend after vhost-user-blk backend crash or
restart.
The patch 1 tries to implenment the sync connection for
"reconnect socket".
The patch 2 introduces a new message VHOST_USER_SET_VRING_INFLIGHT
to
92 matches
Mail list logo