Re: [virtio-dev] Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Zhu, Lingshan
On 9/20/2023 3:51 PM, Parav Pandit wrote: From: Zhu, Lingshan Sent: Wednesday, September 20, 2023 1:17 PM This is not live or device migration. This is restoring the device context initiated by the driver owning the device. restore the device context should be done by the hypervisor before

Re: [virtio-dev] Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Zhu, Lingshan
On 9/20/2023 3:35 PM, Parav Pandit wrote: From: Zhu, Lingshan Sent: Wednesday, September 20, 2023 1:00 PM On 9/20/2023 3:24 PM, Chen, Jiqian wrote: Hi Lingshan, It seems you reply to the wrong email thread. They are not related to my patch. These reply to Parva's comments. @Parva, if you

Re: [virtio-dev] Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Zhu, Lingshan
On 9/20/2023 3:32 PM, Parav Pandit wrote: From: Zhu, Lingshan Sent: Wednesday, September 20, 2023 12:58 PM On 9/20/2023 3:10 PM, Parav Pandit wrote: From: Zhu, Lingshan Sent: Wednesday, September 20, 2023 12:37 PM The problem to overcome in [1] is, resume operation needs

Re: [virtio-comment] Re: [virtio-dev] Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Zhu, Lingshan
On 9/20/2023 3:17 PM, Chen, Jiqian wrote: Hi Lingshan, On 2023/9/20 14:58, Zhu, Lingshan wrote: On 9/20/2023 2:33 PM, Chen, Jiqian wrote: Hi Lingshan, On 2023/9/20 13:59, Zhu, Lingshan wrote: On 9/19/2023 8:31 PM, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 07:42:42PM +0800

Re: [virtio-dev] Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Zhu, Lingshan
15:06, Zhu, Lingshan wrote: On 9/20/2023 2:58 PM, Parav Pandit wrote: From: Chen, Jiqian Sent: Wednesday, September 20, 2023 12:03 PM If driver write 0 to reset device, can the SUSPEND bit be cleared? It must as reset operation, resets everything else and so the suspend too. (pci_pm_resume

Re: [virtio-dev] Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Zhu, Lingshan
On 9/20/2023 3:10 PM, Parav Pandit wrote: From: Zhu, Lingshan Sent: Wednesday, September 20, 2023 12:37 PM The problem to overcome in [1] is, resume operation needs to be synchronous as it involves large part of context to resume back, and hence just asynchronously setting DRIVER_OK

Re: [virtio-dev] Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Zhu, Lingshan
On 9/20/2023 2:58 PM, Parav Pandit wrote: From: Chen, Jiqian Sent: Wednesday, September 20, 2023 12:03 PM If driver write 0 to reset device, can the SUSPEND bit be cleared? It must as reset operation, resets everything else and so the suspend too.

Re: [virtio-dev] Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Zhu, Lingshan
On 9/20/2023 2:33 PM, Chen, Jiqian wrote: Hi Lingshan, On 2023/9/20 13:59, Zhu, Lingshan wrote: On 9/19/2023 8:31 PM, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 07:42:42PM +0800, Jiqian Chen wrote: When guest vm does S3, Qemu will reset and clear some things of virtio devices

Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Zhu, Lingshan
ion space. The driver re-write DRIVER_OK to clear SUSPEND, so the device resumes running. This is originally to serve live migration, but I think it can also meet your needs. Thanks, Zhu Lingshan Signed-off-by: Jiqian Chen --- transport-pci.tex | 7 +++ 1 file changed, 7 inserti

Re: [PATCH] vhost: disable VHOST_OPS_DEBUG by default

2023-07-18 Thread Zhu, Lingshan
On 7/17/2023 6:14 PM, Philippe Mathieu-Daudé wrote: Hi, On 17/7/23 19:44, Zhu Lingshan wrote: This commit disables VHOST_OPS_DEBUG by default These information are ususally only required in development environment Signed-off-by: Zhu Lingshan ---   hw/virtio/vhost.c | 7 ++-   1 file

[PATCH] vhost: disable VHOST_OPS_DEBUG by default

2023-07-17 Thread Zhu Lingshan
This commit disables VHOST_OPS_DEBUG by default These information are ususally only required in development environment Signed-off-by: Zhu Lingshan --- hw/virtio/vhost.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index

Re: [PATCH V2] vhost_vdpa: no need to fetch vring base when poweroff

2023-07-12 Thread Zhu, Lingshan
On 7/12/2023 3:22 PM, Jason Wang wrote: On Wed, Jul 12, 2023 at 2:54 PM Zhu, Lingshan wrote: On 7/11/2023 3:34 PM, Jason Wang wrote: On Tue, Jul 11, 2023 at 3:25 PM Eugenio Perez Martin wrote: On Tue, Jul 11, 2023 at 9:05 AM Jason Wang wrote

Re: [PATCH V2] vhost_vdpa: no need to fetch vring base when poweroff

2023-07-12 Thread Zhu, Lingshan
On 7/11/2023 3:34 PM, Jason Wang wrote: On Tue, Jul 11, 2023 at 3:25 PM Eugenio Perez Martin wrote: On Tue, Jul 11, 2023 at 9:05 AM Jason Wang wrote: > > On Tue, Jul 11, 2023 at 12:09 PM Zhu, Lingshan wrote: > > > > > > &

Re: [PATCH V2] vhost_vdpa: no need to fetch vring base when poweroff

2023-07-10 Thread Zhu, Lingshan
On 7/11/2023 10:50 AM, Jason Wang wrote: On Mon, Jul 10, 2023 at 4:53 PM Zhu Lingshan wrote: In the poweroff routine, no need to fetch last available index. This is because there's no concept of shutdown in the vhost layer, it only knows start and stop. This commit also provides

[PATCH V2] vhost_vdpa: no need to fetch vring base when poweroff

2023-07-10 Thread Zhu Lingshan
used idx as a work around, not a failure. Signed-off-by: Zhu Lingshan --- hw/virtio/vhost-vdpa.c | 10 ++ hw/virtio/vhost.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3c575a9a6e..10b445f64e 100644

Re: [PATCH] vhost_vdpa: no need to fetch vring base when poweroff

2023-07-09 Thread Zhu, Lingshan
On 7/7/2023 7:02 PM, Eugenio Perez Martin wrote: On Fri, Jul 7, 2023 at 12:18 PM Zhu Lingshan wrote: In the poweroff routine, no need to fetch last available index. This commit also provides a better debug message in the vhost caller vhost_virtqueue_stop, because if vhost does not fetch

[PATCH] vhost_vdpa: no need to fetch vring base when poweroff

2023-07-07 Thread Zhu Lingshan
used idx as a work around, not a failure. Signed-off-by: Zhu Lingshan --- hw/virtio/vhost-vdpa.c | 4 hw/virtio/vhost.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3c575a9a6e..f62952e1c7 100644 --- a/hw/virtio

Re: [PATCH] vdpa: dont check vhost_vdpa->suspended when unsupported

2023-06-09 Thread Zhu, Lingshan
On 6/9/2023 11:13 AM, Jason Wang wrote: On Wed, Jun 7, 2023 at 11:37 PM Eugenio Perez Martin wrote: On Wed, Jun 7, 2023 at 11:09 AM Zhu Lingshan wrote: When read the state of a virtqueue, vhost_vdpa need to check whether the device is suspended. This commit verifies whether

Re: [PATCH] vdpa: dont check vhost_vdpa->suspended when unsupported

2023-06-08 Thread Zhu, Lingshan
On 6/8/2023 6:59 PM, Eugenio Perez Martin wrote: On Thu, Jun 8, 2023 at 11:34 AM Zhu, Lingshan wrote: On 6/8/2023 4:49 PM, Eugenio Perez Martin wrote: On Thu, Jun 8, 2023 at 9:07 AM Zhu, Lingshan wrote: On 6/7/2023 9:51 PM, Eugenio Perez Martin wrote: On Wed, Jun 7, 2023 at 11:09 AM

Re: [PATCH] vdpa: dont check vhost_vdpa->suspended when unsupported

2023-06-08 Thread Zhu, Lingshan
On 6/8/2023 4:49 PM, Eugenio Perez Martin wrote: On Thu, Jun 8, 2023 at 9:07 AM Zhu, Lingshan wrote: On 6/7/2023 9:51 PM, Eugenio Perez Martin wrote: On Wed, Jun 7, 2023 at 11:09 AM Zhu Lingshan wrote: When read the state of a virtqueue, vhost_vdpa need to check whether the device

Re: [PATCH] vdpa: dont check vhost_vdpa->suspended when unsupported

2023-06-08 Thread Zhu, Lingshan
On 6/7/2023 9:51 PM, Eugenio Perez Martin wrote: On Wed, Jun 7, 2023 at 11:09 AM Zhu Lingshan wrote: When read the state of a virtqueue, vhost_vdpa need to check whether the device is suspended. This commit verifies whether VHOST_BACKEND_F_SUSPEND is negotiated when checking vhost_vdpa

[PATCH] vdpa: dont check vhost_vdpa->suspended when unsupported

2023-06-07 Thread Zhu Lingshan
When read the state of a virtqueue, vhost_vdpa need to check whether the device is suspended. This commit verifies whether VHOST_BACKEND_F_SUSPEND is negotiated when checking vhost_vdpa->suspended. Signed-off-by: Zhu Lingshan --- hw/virtio/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+)

Re: [RFC v2 12/13] vdpa: preemptive kick at enable

2023-01-13 Thread Zhu, Lingshan
right now Thanks Zhu Lingshan Thanks However, that information is not in the migration stream and it should be an edge case anyhow, being resilient to parallel notifications from the guest. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 5 + 1 file changed, 5 insertions

[Qemu-devel] [PATCH] send readcapacity10 when readcapacity16 failed

2015-12-28 Thread Zhu Lingshan
readcapacity16 when readcapacity10 failed. This patch is not harmful to original pathes Signed-off-by: Zhu Lingshan <ls...@suse.com> --- block/iscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index bd1f1bf..c8d167f 100644 --- a

[Qemu-devel] [PATCH] iscsi: fix readcapacity error message

2015-12-15 Thread Zhu Lingshan
fix:The error message for readcapacity 16 incorrectly mentioned a readcapacity 10 failure, fixed the error message. Signed-off-by: Zhu Lingshan <ls...@suse.com> --- block/iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index b

Re: [Qemu-devel] [Qemu-block] [PATCH] iscsi: fix readcapacity error message

2015-12-15 Thread Zhu Lingshan
OK, thanks, I have sent the patch again and CC them On 12/16/2015 04:20 AM, John Snow wrote: CC qemu-trivial, I think this can go in through that tree. On 12/14/2015 10:33 PM, Zhu Lingshan wrote: fix:The error message for readcapacity 16 incorrectly mentioned a readcapacity 10 failure, fixed

[Qemu-devel] [PATCH] iscsi: fix readcapacity error message

2015-12-15 Thread Zhu Lingshan
fix:The error message for readcapacity 16 incorrectly mentioned a readcapacity 10 failure, fixed the error message. Signed-off-by: Zhu Lingshan <ls...@suse.com> --- block/iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index b

[Qemu-devel] [PATCH] fix:readcapacity 10 failure shown even 16 sent

2015-12-10 Thread Zhu Lingshan
This Patch would fix a bug that readcapacity10 failuare would be shown no matter readcapacy10 or readcapacity16 actually sent. Signed-off-by: Zhu Lingshan <ls...@suse.com> --- block/iscsi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/i

Re: [Qemu-devel] [PATCH] fix:readcapacity 10 failure shown even 16 sent

2015-12-10 Thread Zhu Lingshan
Yeah, I assume that is an easy and efficient solution Thanks On 12/10/2015 04:57 PM, Peter Lieven wrote: Am 10.12.2015 um 09:55 schrieb Paolo Bonzini: On 10/12/2015 03:59, Zhu Lingshan wrote: -if (task == NULL || task->status != SCSI_STATUS_GOOD) { +if ((rc16 != NULL) &&