> 2025年4月16日 10:47,Haoqian He 写道:
>
> Live migration should be terminated if the vhost-user backend crashes
> before the migration completes.
>
> Specifically, since the vhost device will be stopped when VM is stopped
> before the end of the live migration, in current
e will use VMChangeStateHandlerWithRet.
Signed-off-by: Haoqian He
---
hw/block/virtio-blk.c | 2 +-
hw/core/vm-change-state-handler.c | 18 ++--
hw/scsi/scsi-bus.c| 2 +-
hw/vfio/migration.c | 2 +-
hw/virtio/virtio.c| 2 +-
incl
er: return failure if backend crashes
when live migration', which makes the live migration aware of the loss of
connection with the vhost-user backend and aborts the live migration.
Signed-off-by: Haoqian He
---
hw/virtio/vhost.c | 23 +--
include/hw/virtio/vhost.h |
set_status()
can return failure to the upper layer, migration_completion() can handle
the error, terminate the live migration, and restore the VM, so that
inflight IO can be completed normally.
Signed-off-by: Haoqian He
---
backends/vhost-user.c | 20 +--
hw/block/
tus to int.
v3 ... v4
1. Call set_status() only if the function pointer is not NULL in the
3rd patch.
2. Add the more detailed commit messages for the 3rd patch.
v4 ... v5
1. Fix code style issues in patch v4.
2. Rebased on master.
Haoqian He (3):
system/runstate: ad
> 2025年4月4日 05:15,Michael S. Tsirkin 写道:
>
> On Tue, Apr 01, 2025 at 11:18:17AM -0400, Haoqian He wrote:
>> Live migration should be terminated if the vhost-user backend crashes
>> before the migration completes.
>>
>> Specifically, since the vhost device w
> 2025年4月4日 15:30,Stefano Garzarella 写道:
>
> On Thu, Mar 27, 2025 at 02:53:24PM +0800, Haoqian He wrote:
>>
>>> 2025年3月25日 17:51,Stefano Garzarella 写道:
>>>
>>> On Tue, Mar 25, 2025 at 04:39:46PM +0800, Haoqian He wrote:
>>>>> 2025
er: return failure if backend crashes
when live migration', which makes the live migration aware of the loss of
connection with the vhost-user backend and aborts the live migration.
Signed-off-by: Haoqian He
---
hw/virtio/vhost.c | 23 +--
include/hw/virtio/vhost.h |
ation, and restore the VM, so that
inflight IO can be completed normally.
Signed-off-by: Haoqian He
---
backends/vhost-user.c | 20 +--
hw/block/vhost-user-blk.c | 27 ++
hw/block/virtio-blk.c | 5 +++--
hw/char/vir
set_status()
can return failure to the upper layer, migration_completion() can handle
the error, terminate the live migration, and restore the VM, so that
inflight IO can be completed normally.
Signed-off-by: Haoqian He
---
backends/vhost-user.c | 20 +--
hw/block/
e will use VMChangeStateHandlerWithRet.
Signed-off-by: Haoqian He
---
hw/block/virtio-blk.c | 2 +-
hw/core/vm-change-state-handler.c | 18 ++--
hw/scsi/scsi-bus.c| 2 +-
hw/vfio/migration.c | 2 +-
hw/virtio/virtio.c| 2 +-
incl
tus to int.
v3 ... v4
1. Call set_status() only if the function pointer is not NULL in the
3rd patch.
2. Add the more detailed commit messages for the 3rd patch.
Haoqian He (3):
system/runstate: add VM state change cb with return value
vhost: return failure if stop virtqueue
> 2025年3月25日 17:51,Stefano Garzarella 写道:
>
> On Tue, Mar 25, 2025 at 04:39:46PM +0800, Haoqian He wrote:
>>> 2025年3月24日 22:31,Stefano Garzarella 写道:
>>> On Thu, Mar 20, 2025 at 08:21:30PM +0800, Haoqian He wrote:
>>>>> 2025年3月19日 23:20,Stefano Garzar
e will use VMChangeStateHandlerWithRet.
Signed-off-by: Haoqian He
---
hw/block/virtio-blk.c | 2 +-
hw/core/vm-change-state-handler.c | 18 ++--
hw/scsi/scsi-bus.c| 2 +-
hw/vfio/migration.c | 2 +-
hw/virtio/virtio.c| 2 +-
incl
er: return failure if backend crashes
when live migration', which makes the live migration aware of the loss of
connection with the vhost-user backend and aborts the live migration.
Signed-off-by: Haoqian He
---
hw/virtio/vhost.c | 23 +--
include/hw/virtio/vhost.h |
tus to int.
Haoqian He (3):
system/runstate: add VM state change cb with return value
vhost: return failure if stop virtqueue failed in vhost_dev_stop
vhost-user: return failure if backend crash when live migration
backends/vhost-user.c | 20 +++
hw/block/vhost-
> 2025年3月24日 22:31,Stefano Garzarella 写道:
>
> On Thu, Mar 20, 2025 at 08:21:30PM +0800, Haoqian He wrote:
>>
>>
>>> 2025年3月19日 23:20,Stefano Garzarella 写道:
>>>
>>> On Fri, Mar 14, 2025 at 06:15:34AM -0400, Haoqian He wrote:
>>>>
2025年3月24日 22:25,Stefano Garzarella 写道:
On Thu, Mar 20, 2025 at 08:21:25PM +0800, Haoqian He wrote:
2025年3月19日 23:11,Stefano Garzarella 写道:
On Fri, Mar 14, 2025 at 06:15:33AM -0400, Haoqian He wrote:
The backend maybe crash when vhost_dev_stop and GET_VRING_BASE
would fail, we can return
> 2025年3月19日 23:20,Stefano Garzarella 写道:
>
> On Fri, Mar 14, 2025 at 06:15:34AM -0400, Haoqian He wrote:
>> Live migration should be terminated if the backend crashes before
>> the migration completes.
>>
>> Since the vhost device will be stopped when VM is
> 2025年3月19日 23:11,Stefano Garzarella 写道:
>
> On Fri, Mar 14, 2025 at 06:15:33AM -0400, Haoqian He wrote:
>> The backend maybe crash when vhost_dev_stop and GET_VRING_BASE
>> would fail, we can return failure to indicate the connection
>> with the backend is b
> 2025年3月19日 22:50,Stefano Garzarella 写道:
>
> On Fri, Mar 14, 2025 at 06:15:32AM -0400, Haoqian He wrote:
>> This patch contains two changes:
>>
>> 1. Add VM state change cb type VMChangeStateHandlerExt which has return
>> value for virtio devices VMChange
on.
2. In set_status_ext(), return failure if the flag `connected`
is false or vhost_dev_stop return failure, which means qemu lost
connection with backend.
Hence migration_completion() will process failure, terminate
migration and restore VM.
Signed-off-by: Haoqian He
---
hw/block/vhost-user-blk.c
This patch contains two changes:
1. Add VM state change cb type VMChangeStateHandlerExt which has return
value for virtio devices VMChangeStateEntry. When VM state changes,
virtio device will call the _Ext version.
2. Add return value for vm_state_notify().
Signed-off-by: Haoqian He
---
hw
The backend maybe crash when vhost_dev_stop and GET_VRING_BASE
would fail, we can return failure to indicate the connection
with the backend is broken.
Signed-off-by: Haoqian He
---
hw/virtio/vhost.c | 27 +++
include/hw/virtio/vhost.h | 8 +---
2 files
mar issues in commit message.
2. Remove assert in vhost_scsi_common_stop and return error upwards.
Haoqian He (3):
virtio: add VM state change cb with return value
vhost: return failure if stop virtqueue failed in vhost_dev_stop
vhost-user: return failure if backend crash when live migr
gt;> is false or vhost_dev_stop return failure, which means qemu lost
>> connection with backend.
>
> I have some concerns with [2]. See my later responses.
>
>>
>> Hence migration_completion() will process failure, terminate
>> migration and restore VM.
>>
The backend maybe crash when vhost_dev_stop and GET_VRING_BASE
would fail, we can return failure to indicate the connection
with the backend is broken.
Signed-off-by: Haoqian He
---
hw/virtio/vhost.c | 27 +++
include/hw/virtio/vhost.h | 8 +---
2 files
f the flag `connected`
is false or vhost_dev_stop return failure, which means qemu lost
connection with backend.
Hence migration_completion() will process failure, terminate
migration and restore VM.
Signed-off-by: Haoqian He
---
hw/block/vhost-user-blk.c | 29 +++---
This patch contains two changes:
1. Add VM state change cb type VMChangeStateHandlerExt which has return
value for virtio devices VMChangeStateEntry. When VM state changes,
virtio device will call the _Ext version.
2. Add return value for vm_state_notify().
Signed-off-by: Haoqian He
---
hw
nflight
IO would be submitted to the migration target host, which may leading to
the IO error.
The following patch series fixes the issue by making the live migration
aware of the lost of connection with the vhost-user backend and aborting
the live migration.
Haoqian He (3):
virtio: add VM state
> 2025年2月25日 21:29,Marc-André Lureau 写道:
>
> Hi Haoqian
>
> On Tue, Feb 25, 2025 at 5:19 PM Haoqian He wrote:
>>
>> I use chardev to connect with a vhost-user target, the chardev backend type
>> is
>> socket, part of QEMU boot parameter:
>> -d
when computing the client chardev socket file path, using
remoteAddr is more appropriate.
Signed-off-by: Haoqian He
---
chardev/char-socket.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/chardev/char-socket.c b/chardev/char-socket.c
index 91496ceda9..2f842f9f88 1
32 matches
Mail list logo