Re: [RFC 0/8] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-03-21 Thread Dongli Zhang
/byapr18mb2791df7e6c0f61e2d8698e8fa0...@byapr18mb2791.namprd18.prod.outlook.com/ Thank you very much! Dongli Zhang On 3/21/24 08:57, Jonah Palmer wrote: > The goal of these patches is to add support to a variety of virtio and > vhost devices for the VIRTIO_F_IN_ORDER transport feature. This feature > indicates

Re: [PATCH 0/2] scsi: to fix issue on passing host_status to the guest kernel

2022-01-10 Thread Dongli Zhang
ping? Thank you very much! Dongli Zhang On 12/10/21 6:16 AM, Dongli Zhang wrote: > This patchset fixes the issue on passing 'host_status' to the guest kernel. > > The 1st patch fixes the erroneous usage of req->host_status. > > The 2nd patch is to pass the SCSI_HO

[PATCH 1/2] scsi/scsi_bus: use host_status as parameter for scsi_sense_from_host_status()

2021-12-10 Thread Dongli Zhang
CSI drivers") Cc: Joe Jin Signed-off-by: Dongli Zhang --- hw/scsi/scsi-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 77325d8cc7..d46650bd8c 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -1465,7

[PATCH 2/2] scsi/utils: pass host_status = SCSI_HOST_ERROR to guest kernel

2021-12-10 Thread Dongli Zhang
e_IO_ERROR to the guest kernel for host_status = SCSI_HOST_ERROR. (This issue is detected by running a testing code from Rui Loura). Cc: Joe Jin Cc: Adnan Misherfi Cc: Rui Loura Signed-off-by: Dongli Zhang --- scsi/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scsi/utils

[PATCH 0/2] scsi: to fix issue on passing host_status to the guest kernel

2021-12-10 Thread Dongli Zhang
27;Fixes:' because I am not sure if to not pass SCSI_HOST_ERROR was on purpose, especially for security reason. Thank you very much! Dongli Zhang

Re: [PATCH 0/6] Add debug interface to kick/call on purpose

2021-04-07 Thread Dongli Zhang
On 4/6/21 7:20 PM, Jason Wang wrote: > > 在 2021/4/7 上午7:27, Dongli Zhang 写道: >>> This will answer your question that "Can it bypass the masking?". >>> >>> For vhost-scsi, virtio-blk, virtio-scsi and virtio-net, to write to eventfd >>> is

Re: [PATCH 1/6] qdev: introduce qapi/hmp command for kick/call event

2021-04-07 Thread Dongli Zhang
On 4/7/21 6:40 AM, Eduardo Habkost wrote: > On Thu, Mar 25, 2021 at 10:44:28PM -0700, Dongli Zhang wrote: >> The virtio device/driver (e.g., vhost-scsi or vhost-net) may hang due to >> the loss of doorbell kick, e.g., >> >> https://urldefense.com/v3/__https://list

Re: [PATCH 0/6] Add debug interface to kick/call on purpose

2021-04-06 Thread Dongli Zhang
On 4/6/21 1:43 AM, Dongli Zhang wrote: > > > On 4/5/21 6:55 PM, Jason Wang wrote: >> >> 在 2021/4/6 上午4:00, Dongli Zhang 写道: >>> >>> On 4/1/21 8:47 PM, Jason Wang wrote: >>>> 在 2021/3/30 下午3:29, Dongli Zhang 写道: >>>>> On 3/

Re: [PATCH 0/6] Add debug interface to kick/call on purpose

2021-04-06 Thread Dongli Zhang
On 4/5/21 6:55 PM, Jason Wang wrote: > > 在 2021/4/6 上午4:00, Dongli Zhang 写道: >> >> On 4/1/21 8:47 PM, Jason Wang wrote: >>> 在 2021/3/30 下午3:29, Dongli Zhang 写道: >>>> On 3/28/21 8:56 PM, Jason Wang wrote: >>>>> 在 2021/3/27 上午5:16, Dongli Zha

Re: [PATCH 0/6] Add debug interface to kick/call on purpose

2021-04-05 Thread Dongli Zhang
On 4/1/21 8:47 PM, Jason Wang wrote: > > 在 2021/3/30 下午3:29, Dongli Zhang 写道: >> >> On 3/28/21 8:56 PM, Jason Wang wrote: >>> 在 2021/3/27 上午5:16, Dongli Zhang 写道: >>>> Hi Jason, >>>> >>>> On 3/26/21 12:24 AM, Jason Wang wrote: >

Re: [PATCH 0/6] Add debug interface to kick/call on purpose

2021-03-30 Thread Dongli Zhang
On 3/28/21 8:56 PM, Jason Wang wrote: > > 在 2021/3/27 上午5:16, Dongli Zhang 写道: >> Hi Jason, >> >> On 3/26/21 12:24 AM, Jason Wang wrote: >>> 在 2021/3/26 下午1:44, Dongli Zhang 写道: >>>> The virtio device/driver (e.g., vhost-scsi or vhost-net) may ha

Re: [PATCH 0/6] Add debug interface to kick/call on purpose

2021-03-26 Thread Dongli Zhang
Hi Jason, On 3/26/21 12:24 AM, Jason Wang wrote: > > 在 2021/3/26 下午1:44, Dongli Zhang 写道: >> The virtio device/driver (e.g., vhost-scsi or vhost-net) may hang due to >> the loss of doorbell kick, e.g., >> >> https://urldefense.com/v3/__https://lists.gnu.org/a

[PATCH 1/6] qdev: introduce qapi/hmp command for kick/call event

2021-03-25 Thread Dongli Zhang
) may implement the interface (e.g., via eventfd, MSI-X or legacy IRQ). The 'call' is to inject irq on purpose by admin for a specific device (e.g., vhost-scsi) from QEMU/host to VM, while the 'kick' is to kick the doorbell on purpose by admin at QEMU/host side for a specifi

[PATCH 3/6] virtio-blk-pci: implement device event interface for kick/call

2021-03-25 Thread Dongli Zhang
This is to implement the device event interface for virtio-blk-pci. Signed-off-by: Dongli Zhang --- hw/block/virtio-blk.c | 9 + hw/virtio/virtio-blk-pci.c | 10 ++ include/hw/virtio/virtio-blk.h | 2 ++ 3 files changed, 21 insertions(+) diff --git a/hw/block

[PATCH 5/6] vhost-scsi-pci: implement device event interface for kick/call

2021-03-25 Thread Dongli Zhang
This is to implement the device event interface for vhost-scsi-pci. Signed-off-by: Dongli Zhang --- hw/scsi/vhost-scsi.c | 6 ++ hw/virtio/vhost-scsi-pci.c | 10 ++ include/hw/virtio/vhost-scsi.h | 3 +++ 3 files changed, 19 insertions(+) diff --git a/hw/scsi/vhost

[PATCH 4/6] virtio-scsi-pci: implement device event interface for kick/call

2021-03-25 Thread Dongli Zhang
This is to implement the device event interface for virtio-scsi-pci. Signed-off-by: Dongli Zhang --- hw/scsi/virtio-scsi.c | 9 + hw/virtio/virtio-scsi-pci.c | 10 ++ include/hw/virtio/virtio-scsi.h | 3 +++ 3 files changed, 22 insertions(+) diff --git a/hw/scsi

[PATCH 2/6] virtio: introduce helper function for kick/call device event

2021-03-25 Thread Dongli Zhang
This is to introduce the helper function for virtio device to kick or call. Signed-off-by: Dongli Zhang --- hw/virtio/virtio.c | 64 ++ include/hw/virtio/virtio.h | 3 ++ 2 files changed, 67 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio

[PATCH 6/6] virtio-net-pci: implement device event interface for kick/call

2021-03-25 Thread Dongli Zhang
This is to implement the device event interface for virtio-net-pci. Signed-off-by: Dongli Zhang --- hw/net/virtio-net.c| 9 + hw/virtio/virtio-net-pci.c | 10 ++ include/hw/virtio/virtio-net.h | 3 +++ 3 files changed, 22 insertions(+) diff --git a/hw/net

[PATCH 0/6] Add debug interface to kick/call on purpose

2021-03-25 Thread Dongli Zhang
36 } Original RFC link: https://lists.nongnu.org/archive/html/qemu-devel/2021-01/msg03441.html Changed since RFC: - add support for more virtio/vhost pci devices - add log (toggled by DEBUG_VIRTIO_EVENT) to virtio.c to say that this mischeivous command had been used - fix grammer error

Re: [Qemu-block] [Qemu-devel] megasas: Unexpected response from lun 1 while scanning, scan aborted

2019-03-27 Thread Dongli Zhang
On 3/27/19 7:31 PM, Hannes Reinecke wrote: > On 3/26/19 5:47 PM, Dongli Zhang wrote: >> I am reporting an error that the scsi lun cannot initialize successfully >> when I >> am emulating megasas scsi controller with qemu. >> >> I am not sure if this is issue in

[Qemu-block] megasas: Unexpected response from lun 1 while scanning, scan aborted

2019-03-26 Thread Dongli Zhang
0:2:0:0: Unexpected response from lun 1 while scanning, scan aborted [0.540364] scsi host1: ata_piix [0.540780] scsi host2: ata_piix [0.702396] scsi 1:0:0:0: Direct-Access ATA QEMU HARDDISK2.5+ PQ: 0 ANSI: 5 When 'lun=1' is changed to 'lun=0', there is no issue. Thank you very much! Dongli Zhang

[Qemu-block] When AioHandler->is_external=true?

2018-11-20 Thread Dongli Zhang
Hi, Would you please help explain in which case AioHandler->is_external is true, and when it is false? I read about iothread and mainloop and I am little bit confused about it. Thank you very much! Dongli Zhang

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] virtio-blk: rename iov to out_iov in virtio_blk_handle_request()

2018-11-14 Thread Dongli Zhang
Ping? Thanks! Dongli Zhang On 11/07/2018 12:09 AM, Dongli Zhang wrote: > In virtio_blk_handle_request(), in_iov is used for input header while iov > is used for output header. Rename iov to out_iov to pair output header's > name with in_iov to avoid confusing people when readi

Re: [Qemu-block] [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-12 Thread Dongli Zhang
On 11/13/2018 06:52 AM, Marc Olson via Qemu-devel wrote: > On 11/11/18 11:36 PM, Dongli Zhang wrote: >> On 11/12/2018 03:13 PM, Marc Olson via Qemu-devel wrote: >>> On 11/3/18 10:24 AM, Dongli Zhang wrote: >>>> The 'write' latency of sector=40960 is set t

Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/3] blkdebug: fix one shot rule processing

2018-11-12 Thread Dongli Zhang
drive,serial=deadbeaf1 \ -drive file=blkdebug:blkdebug.config:nvme.img,format=raw,if=none,id=nvmedrive \ -net nic -net user,hostfwd=tcp::5022-:22 I will debug where it hangs. Dongli Zhang On 11/12/2018 03:06 PM, Marc Olson via Qemu-devel wrote: > If 'once' is specified, the rule

Re: [Qemu-block] [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-11 Thread Dongli Zhang
On 11/12/2018 03:13 PM, Marc Olson via Qemu-devel wrote: > On 11/3/18 10:24 AM, Dongli Zhang wrote: >> Hi all, >> >> I tried with the patch at: >> >> https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00394.html >> >> The patch is applied t

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1 V2] Add vhost-pci-blk driver

2018-11-08 Thread Dongli Zhang
On 11/09/2018 12:47 AM, Michael S. Tsirkin wrote: > On Thu, Nov 08, 2018 at 10:09:00PM +0800, Dongli Zhang wrote: >> It looks the kernel space vhost-blk can only process raw image. >> >> How about to verify that only raw image is used in the drive command line >&g

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1 V2] Add vhost-pci-blk driver

2018-11-08 Thread Dongli Zhang
It looks the kernel space vhost-blk can only process raw image. How about to verify that only raw image is used in the drive command line when vhost-blk-pci is paired with it? Otherwise, vhost-blk-pci might be working with qcow2 image without any warning on qemu side. Dongli Zhang On 11/06

[Qemu-block] [PATCH 1/1] virtio-blk: rename iov to out_iov in virtio_blk_handle_request()

2018-11-06 Thread Dongli Zhang
In virtio_blk_handle_request(), in_iov is used for input header while iov is used for output header. Rename iov to out_iov to pair output header's name with in_iov to avoid confusing people when reading source code. Signed-off-by: Dongli Zhang --- hw/block/virtio-blk.c | 8 1

[Qemu-block] [PATCH 1/1] virtio-blk: fix comment for virtio_blk_rw_complete as nalloc is initially -1

2018-11-05 Thread Dongli Zhang
The initial value of nalloc is -1, but not 1. Signed-off-by: Dongli Zhang --- This is based on git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio

Re: [Qemu-block] [Qemu-devel] [PULL 05/33] virtio-blk: fix comment for virtio_blk_rw_complete

2018-11-05 Thread Dongli Zhang
ernal iovec. It was allocated in submit_merged_requests > - * to be able to merge requests. */ > + * external iovec. It was allocated in submit_requests to be > + * able to merge requests. */ > qemu_iovec_destroy(&req->qiov); > } > > Dongli Zhang

Re: [Qemu-block] [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-03 Thread Dongli Zhang
re disk when I input some command via qemu monitor. Dongli Zhang On 11/03/2018 02:17 AM, John Snow wrote: > > > On 11/02/2018 01:55 PM, Marc Olson wrote: >> On 11/2/18 10:49 AM, John Snow wrote: >>> On 11/02/2018 04:11 AM, Dongli Zhang wrote: >>>> Hi, >&