[Qemu-block] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Jason Wang
Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- 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-blk.c index 9acbc3a..1d3f26c 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c

[Qemu-block] [PATCH V3 3/3] virtio-blk: set VIRTIO_F_ANY_LAYOUT when 1.0 is supported

2015-07-22 Thread Jason Wang
...@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/block/virtio-blk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 4716c3e..2e7a190 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -736,6

Re: [Qemu-block] [Qemu-devel] [PATCH 2/5] virtio-blk: disable scsi passthrough for 1.0 device

2015-07-13 Thread Jason Wang
On 07/13/2015 03:46 PM, Michael S. Tsirkin wrote: On Mon, Jul 13, 2015 at 01:46:48PM +0800, Jason Wang wrote: VIRTIO_BLK_F_SCSI was no longer supported in 1.0. So disable it. Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Cc: qemu-block@nongnu.org Signed-off

Re: [Qemu-block] [PATCH V2 2/5] virtio-blk: advertise scsi only when scsi is set

2015-07-15 Thread Jason Wang
On 07/15/2015 03:57 PM, Paolo Bonzini wrote: On 15/07/2015 07:29, Jason Wang wrote: Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/block/virtio-blk.c | 4 +++- 1 file changed, 3

[Qemu-block] [PATCH V2 3/5] virtio-blk: disable scsi passthrough by default

2015-07-14 Thread Jason Wang
Disable scsi passthrough by default since it was incompatible with virtio 1.0. For legacy machine types, keep this on by default. Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/block/virtio

[Qemu-block] [PATCH V2 4/5] virtio-blk: fail the init when both 1.0 and scsi is set

2015-07-14 Thread Jason Wang
Scsi passthrough was no longer supported in 1.0, so fail the initialization when user want both features. Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/block/virtio-blk.c | 4 1 file

[Qemu-block] [PATCH V2 2/5] virtio-blk: advertise scsi only when scsi is set

2015-07-14 Thread Jason Wang
Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/block/virtio-blk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index

[Qemu-block] [PATCH 2/5] virtio-blk: disable scsi passthrough for 1.0 device

2015-07-12 Thread Jason Wang
VIRTIO_BLK_F_SCSI was no longer supported in 1.0. So disable it. Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/block/virtio-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[Qemu-block] [PATCH 3/5] virtio-blk: set VIRTIO_F_ANY_LAYOUT when 1.0 is supported

2015-07-12 Thread Jason Wang
...@redhat.com Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/block/virtio-blk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index f30ad25..0f07e25 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -732,6

[Qemu-block] [RFC PATCH 1/8] virtio: convert to use DMA api

2016-03-25 Thread Jason Wang
@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang <jasow...@redhat.com> --- hw/block/virtio-blk.c | 2 +- hw/char/virtio-serial-bus.c | 3 +- hw/scsi/virtio-scsi.c | 4 ++- hw/virtio/virtio-pci.c| 9 ++ hw

Re: [Qemu-block] [Qemu-devel] [PATCH for 2.8 02/11] virtio: convert to use DMA api

2016-09-06 Thread Jason Wang
On 2016年09月05日 10:26, Wei Xu wrote: On 2016年08月30日 11:06, Jason Wang wrote: @@ -1587,6 +1595,11 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp) } if (legacy) { +if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) { +error_setg

[Qemu-block] [PATCH for 2.8 02/11] virtio: convert to use DMA api

2016-08-29 Thread Jason Wang
@redhat.com> Cc: Amit Shah <amit.s...@redhat.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang <jasow...@redhat.com> --- hw/block/virtio-blk.c | 2 +- hw/char/virtio-serial-bus.c | 3 +- hw/scsi/virtio-scsi.c

Re: [Qemu-block] [PATCH for 2.8 02/11] virtio: convert to use DMA api

2016-08-30 Thread Jason Wang
On 2016年08月30日 15:31, Cornelia Huck wrote: On Tue, 30 Aug 2016 11:06:50 +0800 Jason Wang <jasow...@redhat.com> wrote: Currently, all virtio devices bypass IOMMU completely. This is because address_space_memory is assumed and used during DMA emulation. This patch converts the virtio co

[Qemu-block] [PATCH V3 01/10] virtio: convert to use DMA api

2016-11-06 Thread Jason Wang
@redhat.com> Cc: Amit Shah <amit.s...@redhat.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang <jasow...@redhat.com> --- hw/block/virtio-blk.c | 2 +- hw/char/virtio-serial-bus.c | 3 ++- hw/scsi/virtio-scsi.c

[Qemu-block] [PATCH V2 02/11] virtio: convert to use DMA api

2016-11-03 Thread Jason Wang
@redhat.com> Cc: Amit Shah <amit.s...@redhat.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang <jasow...@redhat.com> --- hw/block/virtio-blk.c | 2 +- hw/char/virtio-serial-bus.c | 3 ++- hw/scsi/virtio-scsi.c

Re: [Qemu-block] [PATCH V2 02/11] virtio: convert to use DMA api

2016-11-04 Thread Jason Wang
On 2016年11月04日 03:46, Michael S. Tsirkin wrote: @@ -244,6 +245,7 @@ int virtio_queue_empty(VirtQueue *vq) > static void virtqueue_unmap_sg(VirtQueue *vq, const VirtQueueElement *elem, > unsigned int len) > { >+AddressSpace *dma_as =

[Qemu-block] [PATCH V4 01/10] virtio: convert to use DMA api

2016-12-30 Thread Jason Wang
@redhat.com> Cc: Amit Shah <amit.s...@redhat.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang <jasow...@redhat.com> --- hw/block/virtio-blk.c | 2 +- hw/char/virtio-serial-bus.c | 3 ++- hw/scsi/virtio-scsi.c

Re: [PATCH v6 0/9] Packed virtqueue for virtio

2019-10-24 Thread Jason Wang
vdev->broken check between split and packet version. Eugenio Pérez (3): virtio: Free rng and blk virqueues virtio: add some rcu comments virtio: Move vdev->broken check to dispatch drop_all Jason Wang (4): virtio: basic packed virtqueue support virtio: event suppression s

Re: [PATCH v7 0/4] colo: Add support for continuous replication

2019-11-19 Thread Jason Wang
On 2019/11/19 下午8:28, Zhang, Chen wrote: -Original Message- From: Lukas Straub Sent: Thursday, November 14, 2019 12:36 AM To: qemu-devel Cc: Zhang, Chen ; Jason Wang ; Wen Congyang ; Xie Changlong ; Kevin Wolf ; Max Reitz ; qemu-block Subject: Re: [PATCH v7 0/4] colo: Add support

Re: [PATCH v7 0/4] colo: Add support for continuous replication

2020-02-19 Thread Jason Wang
On 2020/2/20 上午9:38, Zhang, Chen wrote: Hi Jason, I noticed this series can't be merged or queued, do you met some problem about it? Thanks Zhang Chen Not, I've queued this. Thanks

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-12 Thread Jason Wang
On 2020/5/12 下午5:08, Dima Stepanov wrote: On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: On 2020/5/11 下午5:11, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: On 2020/4/30 下午9:36, Dima Stepanov wrote: Since disconnect can happen at any time

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-11 Thread Jason Wang
On 2020/5/11 下午5:11, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: On 2020/4/30 下午9:36, Dima Stepanov wrote: Since disconnect can happen at any time during initialization not all vring buffers (for instance used vring) can be intialized successfully

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-11 Thread Jason Wang
On 2020/5/11 下午5:25, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:15:53AM +0800, Jason Wang wrote: On 2020/4/30 下午9:36, Dima Stepanov wrote: If vhost-user daemon is used as a backend for the vhost device, then we should consider a possibility of disconnect at any moment

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-12 Thread Jason Wang
On 2020/5/13 下午12:15, Michael S. Tsirkin wrote: On Tue, May 12, 2020 at 12:35:30PM +0300, Dima Stepanov wrote: On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: On 2020/5/11 下午5:25, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:15:53AM +0800, Jason Wang wrote: On 2020/4/30 下午9

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-12 Thread Jason Wang
On 2020/5/12 下午5:35, Dima Stepanov wrote: On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: On 2020/5/11 下午5:25, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:15:53AM +0800, Jason Wang wrote: On 2020/4/30 下午9:36, Dima Stepanov wrote: If vhost-user daemon is used as a backend

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-17 Thread Jason Wang
be a solution or we may ask David for more suggestion. Another thing that might be useful is to block re connection during migration. Thanks Thanks, Feng Li Dima Stepanov 于2020年5月16日周六 上午12:55写道: On Thu, May 14, 2020 at 03:34:24PM +0800, Jason Wang wrote: On 2020/5/13 下午5:47, Dima Stepanov wrote

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-17 Thread Jason Wang
On 2020/5/16 上午12:54, Dima Stepanov wrote: On Thu, May 14, 2020 at 03:34:24PM +0800, Jason Wang wrote: On 2020/5/13 下午5:47, Dima Stepanov wrote: case CHR_EVENT_CLOSED: /* a close event may happen during a read/write, but vhost * code assumes the vhost_dev remains

Re: [RFC v3 4/6] qmp: add QMP command x-debug-virtio-queue-status

2020-05-17 Thread Jason Wang
On 2020/5/15 下午11:16, Laurent Vivier wrote: On 08/05/2020 04:57, Jason Wang wrote: On 2020/5/7 下午7:49, Laurent Vivier wrote: This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier It looks to me that packed virtqueue is not supported

Re: [PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for virtio device

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: Introduce new wrappers to set/reset guest notifiers for the virtio device in the vhost device module: vhost_dev_assign_guest_notifiers ->set_guest_notifiers(..., ..., true); vhost_dev_drop_guest_notifiers ->set_guest_notifiers(..., ...,

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: If vhost-user daemon is used as a backend for the vhost device, then we should consider a possibility of disconnect at any moment. If such disconnect happened in the vhost_migration_log() routine the vhost device structure will be clean up. At the

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: Since disconnect can happen at any time during initialization not all vring buffers (for instance used vring) can be intialized successfully. If the buffer was not initialized then vhost_memory_unmap call will lead to SIGSEGV. Add checks for the vring

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-14 Thread Jason Wang
On 2020/5/13 下午5:36, Dima Stepanov wrote: On Wed, May 13, 2020 at 11:00:38AM +0800, Jason Wang wrote: On 2020/5/12 下午5:08, Dima Stepanov wrote: On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: On 2020/5/11 下午5:11, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:05:58AM +0800

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-14 Thread Jason Wang
On 2020/5/13 下午5:47, Dima Stepanov wrote: case CHR_EVENT_CLOSED: /* a close event may happen during a read/write, but vhost * code assumes the vhost_dev remains setup, so delay the * stop & clear to idle. * FIXME: better handle failure in vhost code,

Re: [RFC v3 5/6] qmp: add QMP command x-debug-virtio-queue-element

2020-05-07 Thread Jason Wang
On 2020/5/7 下午7:49, Laurent Vivier wrote: This new command shows the information of a VirtQueue element. Signed-off-by: Laurent Vivier --- hw/virtio/virtio-stub.c | 9 +++ hw/virtio/virtio.c | 130 qapi/virtio.json| 94

Re: [RFC v3 3/6] qmp: decode feature bits in virtio-status

2020-05-07 Thread Jason Wang
On 2020/5/7 下午7:49, Laurent Vivier wrote: Display feature names instead of a features bitmap for host, guest and backend. Decode features according device type, transport features are on the first line. Undecoded bits (if any) are stored in a separate field. Signed-off-by: Laurent Vivier

Re: [RFC v3 4/6] qmp: add QMP command x-debug-virtio-queue-status

2020-05-07 Thread Jason Wang
On 2020/5/7 下午7:49, Laurent Vivier wrote: This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier It looks to me that packed virtqueue is not supported. It's better to add them in the future. --- hw/virtio/virtio-stub.c | 6 +++

Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions

2020-09-03 Thread Jason Wang
On 2020/9/4 上午3:46, Edgar E. Iglesias wrote: On Thu, Sep 03, 2020 at 07:53:33PM +0200, Paolo Bonzini wrote: On 03/09/20 17:50, Edgar E. Iglesias wrote: Hmm, I guess it would make sense to have a configurable option in KVM to isolate passthrough devices so they only can DMA to guest RAM...

Re: [PATCH v2 0/2] util/hexdump: Cleanup qemu_hexdump()

2020-08-31 Thread Jason Wang
On 2020/8/23 上午2:09, Philippe Mathieu-Daudé wrote: - Pass const void* buffer - Reorder arguments Supersedes: <20200822150457.1322519-1-f4...@amsat.org> Philippe Mathieu-Daudé (2): util/hexdump: Convert to take a void pointer argument util/hexdump: Reorder qemu_hexdump() arguments

Re: [PATCH v3 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-05-24 Thread Jason Wang
On 2020/5/20 下午11:53, Dima Stepanov wrote: A socket write during vhost-user communication may trigger a disconnect event, calling vhost_user_blk_disconnect() and clearing all the vhost_dev structures holding data that vhost-user functions expect to remain valid to roll back initialization

Re: [PATCH 2/5] vhost: involve device backends in feature negotiation

2020-05-29 Thread Jason Wang
On 2020/5/23 上午1:17, Stefan Hajnoczi wrote: Many vhost devices in QEMU currently do not involve the device backend in feature negotiation. This seems fine at first glance for device types without their own feature bits (virtio-net has many but other device types have none). This overlooks the

Re: [PATCH 5/5] virtio: enable VIRTIO_F_RING_PACKED for all devices

2020-05-29 Thread Jason Wang
On 2020/5/23 上午1:17, Stefan Hajnoczi wrote: The packed virtqueue layout was introduced in VIRTIO 1.1. It is a single ring instead of a split avail/used ring design. There are CPU cache advantages to this layout and it is also suited better to hardware implementation. The vhost-net backend has

Re: [PATCH 2/5] vhost: involve device backends in feature negotiation

2020-06-01 Thread Jason Wang
On 2020/5/29 下午9:56, Stefan Hajnoczi wrote: On Fri, May 29, 2020 at 03:04:54PM +0800, Jason Wang wrote: On 2020/5/23 上午1:17, Stefan Hajnoczi wrote: Many vhost devices in QEMU currently do not involve the device backend in feature negotiation. This seems fine at first glance for device types

Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation

2020-06-10 Thread Jason Wang
On 2020/6/10 下午2:11, Michael S. Tsirkin wrote: On Wed, Jun 10, 2020 at 01:53:57PM +0800, Jason Wang wrote: On 2020/6/10 下午12:15, Michael S. Tsirkin wrote: On Wed, Jun 10, 2020 at 11:21:50AM +0800, Jason Wang wrote: On 2020/6/10 上午2:07, Michael S. Tsirkin wrote: +/* + * Default

Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation

2020-06-09 Thread Jason Wang
On 2020/6/10 上午2:07, Michael S. Tsirkin wrote: +/* + * Default vhost_get_features() feature bits for existing device types that do + * not define their own. + * + * This is a workaround for existing device types, do not use this in new vhost + * device types. Explicitly define a list of

Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation

2020-06-10 Thread Jason Wang
On 2020/6/10 下午12:15, Michael S. Tsirkin wrote: On Wed, Jun 10, 2020 at 11:21:50AM +0800, Jason Wang wrote: On 2020/6/10 上午2:07, Michael S. Tsirkin wrote: +/* + * Default vhost_get_features() feature bits for existing device types that do + * not define their own

Re: [PATCH 2/3] virtio-blk: Constify VirtIOFeature feature_sizes[]

2021-05-11 Thread Jason Wang
<< VIRTIO_BLK_F_DISCARD, .end = endof(struct virtio_blk_config, discard_sector_alignment)}, {.flags = 1ULL << VIRTIO_BLK_F_WRITE_ZEROES, Acked-by: Jason Wang

Re: [PATCH 3/3] virtio-net: Constify VirtIOFeature feature_sizes[]

2021-05-11 Thread Jason Wang
= 1ULL << VIRTIO_NET_F_MAC, .end = endof(struct virtio_net_config, mac)}, {.flags = 1ULL << VIRTIO_NET_F_STATUS, Acked-by: Jason Wang

Re: [PATCH 1/3] hw/virtio: Pass virtio_feature_get_config_size() a const argument

2021-05-11 Thread Jason Wang
在 2021/5/11 下午6:41, Philippe Mathieu-Daudé 写道: The VirtIOFeature structure isn't modified, mark it const. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang --- include/hw/virtio/virtio.h | 2 +- hw/virtio/virtio.c | 2 +- 2 files changed, 2 insertions(+), 2

Re: [PATCH 15/23] net: Avoid dynamic stack allocation

2021-05-06 Thread Jason Wang
在 2021/5/6 上午5:10, Philippe Mathieu-Daudé 写道: Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang --- hw/net/fsl_etsec/rings.c | 9 - hw/net/rocker/rocker_of_dpa.c | 2 +- net/dump.c

Re: [PATCH 09/23] hw/net/e1000e_core: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Jason Wang
在 2021/5/6 上午5:10, Philippe Mathieu-Daudé 写道: The compiler isn't clever enough to figure 'min_buf_size' is a constant, so help it by using a definitions instead. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang --- hw/net/e1000e_core.c | 7 --- 1 file changed, 4

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

2021-03-28 Thread Jason Wang
在 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 hang due to the loss of doorbell kick, e.g., https://urldefense.com/v3/__https://lists.gnu.org/archive

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

2021-04-01 Thread Jason Wang
在 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: 在 2021/3/26 下午1:44, Dongli Zhang 写道: The virtio device/driver (e.g., vhost-scsi or vhost-net) may hang due to the loss

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

2021-04-05 Thread Jason Wang
在 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 Zhang 写道: Hi Jason, On 3/26/21 12:24 AM, Jason Wang wrote: 在 2021/3/26 下午1:44, Dongli Zhang 写道: The virtio

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

2021-04-06 Thread Jason Wang
在 2021/4/6 下午4:43, 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 Zhang 写道: Hi Jason, On 3/26/21 12:24

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

2021-04-06 Thread Jason Wang
在 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 not able to bypass masking because masking is to unregister the eventfd. To write to eventfd does not take

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

2021-03-26 Thread Jason Wang
在 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://lists.gnu.org/archive/html/qemu-devel/2018-12/msg01711.html ... or due to the loss of IRQ, e.g., as fixed by linux kernel commit fe200ae48ef5

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

2021-04-08 Thread Jason Wang
在 2021/4/8 下午1:51, 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 not able to bypass maski

Re: [PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-08-26 Thread Jason Wang
在 2021/8/26 下午2:25, Jonah Palmer 写道: Hi Jason, could I get your thoughts on this implementation question below? I'm not too sure on how I should proceed determining if vhost is active or not. Thank you! Jonah On 7/26/21 5:33 AM, Jonah Palmer wrote: On 7/22/21 5:22 AM, Jason Wang

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-02 Thread Jason Wang
ernel support for kTLS and multipath-TCP, both of which we want to be able to use with migration. Copying Jason Wang for net implications between these features on kernel side Note that the MSG_ZEROCOPY is contributed by Google :) and whether they can be enabled together (MSG_ZEROCOPY, mp

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-08 Thread Jason Wang
On Wed, Sep 8, 2021 at 11:19 PM Peter Xu wrote: > > On Wed, Sep 08, 2021 at 09:19:27AM +0100, Dr. David Alan Gilbert wrote: > > * Jason Wang (jasow...@redhat.com) wrote: > > > On Wed, Sep 8, 2021 at 2:32 AM Peter Xu wrote: > > > > > > > > On Thu, Se

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-07 Thread Jason Wang
On Wed, Sep 8, 2021 at 11:24 AM Peter Xu wrote: > > On Wed, Sep 08, 2021 at 10:59:57AM +0800, Jason Wang wrote: > > On Wed, Sep 8, 2021 at 2:32 AM Peter Xu wrote: > > > > > > On Thu, Sep 02, 2021 at 04:22:55AM -0300, Leonardo Bras Soares Passos > > > wro

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-07 Thread Jason Wang
On Wed, Sep 8, 2021 at 2:32 AM Peter Xu wrote: > > On Thu, Sep 02, 2021 at 04:22:55AM -0300, Leonardo Bras Soares Passos wrote: > > > I don't think it is valid to unconditionally enable this feature due to > > > the > > > resource usage implications > > > > > >

Re: [PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-07-13 Thread Jason Wang
在 2021/7/12 下午6:35, Jonah Palmer 写道: From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 6 +++ hw/virtio/virtio.c | 37 ++

Re: [PATCH v6 6/6] hmp: add virtio commands

2021-07-13 Thread Jason Wang
在 2021/7/12 下午6:35, Jonah Palmer 写道: +void hmp_virtio_queue_status(Monitor *mon, const QDict *qdict) +{ +Error *err = NULL; +const char *path = qdict_get_try_str(qdict, "path"); +int queue = qdict_get_int(qdict, "queue"); +VirtQueueStatus *s =

Re: [PATCH v6 0/6] hmp, qmp: Add some commands to introspect virtio devices

2021-07-13 Thread Jason Wang
在 2021/7/12 下午6:35, Jonah Palmer 写道: Dump the information of the head element of the third queue of virtio-scsi: (qemu) virtio queue-element /machine/peripheral-anon/device[3]/virtio-backend 3 index: 122 ndescs: 3 descs: addr 0x7302d000 len 4096

Re: [PATCH v2 03/15] net/vhost-vdpa: Fix device compatibility check

2021-10-13 Thread Jason Wang
dependency on the legacy QemuOpts infrastructure and even reduces the code size. Signed-off-by: Kevin Wolf Acked-by: Jason Wang --- net/vhost-vdpa.c | 37 ++--- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c

Re: [PATCH v2 02/15] net/vhost-user: Fix device compatibility check

2021-10-13 Thread Jason Wang
dependency on the legacy QemuOpts infrastructure and even reduces the code size. Signed-off-by: Kevin Wolf Acked-by: Jason Wang --- net/vhost-user.c | 41 ++--- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/net/vhost-user.c b/net/vhost

Re: [PATCH v2 01/15] net: Introduce NetClientInfo.check_peer_type()

2021-10-13 Thread Jason Wang
tries to attach, even on hotplug. Signed-off-by: Kevin Wolf Acked-by: Jason Wang --- include/net/net.h| 2 ++ hw/core/qdev-properties-system.c | 6 ++ 2 files changed, 8 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 5d1508081f..986288eb07

Re: [RFC PATCH 2/3] hw/sd/sdhci: Prohibit DMA accesses to devices

2021-12-15 Thread Jason Wang
On Thu, Dec 16, 2021 at 4:57 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > The issue reported by OSS-Fuzz produces the following backtrace: > > ==447470==ERROR: AddressSanitizer: heap-buffer-overflow > READ of size 1 at 0x6152a080 thread T0 > #0 0x71766d47

Re: [PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-07-22 Thread Jason Wang
在 2021/7/21 下午4:59, Jonah Palmer 写道: On 7/13/21 10:37 PM, Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer ---   hw/virtio

Re: [PATCH v6 0/6] hmp, qmp: Add some commands to introspect virtio devices

2021-07-22 Thread Jason Wang
patches): On 7/13/21 10:42 PM, Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: Dump the information of the head element of the third queue of virtio-scsi: (qemu) virtio queue-element /machine/peripheral-anon/device[3]/virtio-backend 3 index: 122 ndescs

Re: [PATCH v6 6/6] hmp: add virtio commands

2021-07-22 Thread Jason Wang
在 2021/7/21 下午5:11, Jonah Palmer 写道: On 7/13/21 10:40 PM, Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: +void hmp_virtio_queue_status(Monitor *mon, const QDict *qdict) +{ +    Error *err = NULL; +    const char *path = qdict_get_try_str(qdict, "path"); +   

Re: [PATCH] aio-posix: fix spurious ->poll_ready() callbacks in main loop

2022-02-24 Thread Jason Wang
t;aio-posix: split poll check from ready handler") Signed-off-by: Stefan Hajnoczi Reported-by: Jason Wang Tested-by: Jason Wang Thanks --- util/aio-posix.h | 1 + util/aio-posix.c | 32 ++-- 2 files changed, 19 insertions(+), 14 deletions(-) diff --g

Re: [PATCH v3 05/21] block/vhost-user-blk-server: don't expose VHOST_USER_F_PROTOCOL_FEATURES

2022-07-28 Thread Jason Wang
在 2022/7/27 03:21, Alex Bennée 写道: This bit is unused in actual VirtIO feature negotiation and should only appear in the vhost-user messages between master and slave. I might be wrong, but this is actually used between master and slave not the device and driver? Thanks [AJB:

Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread Jason Wang
On Fri, Sep 23, 2022 at 11:33 AM 陈浩 wrote: > > > On 2022/9/22 17:56, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 09:34:41AM +0800, Jason Wang wrote: > >> On Thu, Sep 22, 2022 at 1:58 AM Raphael Norwitz > >> wrote: > >>> If I read your respon

Re: Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread Jason Wang
On Fri, Sep 23, 2022 at 11:55 AM ho...@yusur.tech wrote: > > On Thu, 22 Sep 2022 09:34:41 +0800 Jason Wang wrote: > > > >On Thu, Sep 22, 2022 at 1:58 AM Raphael Norwitz > > wrote: > >> > >> If I read your response on the other threa

Re: [PATCH] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-19 Thread Jason Wang
On Tue, Sep 13, 2022 at 5:13 PM Hao Chen wrote: > > When use dpdk-vdpa tests vdpa device. You need to specify the mac address to > start the virtual machine through libvirt or qemu, but now, the libvirt or > qemu can call dpdk vdpa vendor driver's ops .get_config through > vhost_net_get_config >

Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-21 Thread Jason Wang
On Thu, Sep 22, 2022 at 1:58 AM Raphael Norwitz wrote: > > If I read your response on the other thread correctly, this change is intended > > to prioritize the MAC address exposed by DPDK over the one provided by the > > QEMU command line? Sounds reasonable in principle, but I would get >

Re: [PATCH] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

2022-11-21 Thread Jason Wang
_RING_RESET is negotiated > by the guest (Linux >= v6.0), but not supported by the device. > > Fixes: 69e1c14aa2 ("virtio: core: vq reset feature negotation support") > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1318 > Signed-off-by: Stefano Garzarella Acked-

Re: [PATCH v3 09/14] hw/net/tulip: Finish QOM conversion

2023-03-05 Thread Jason Wang
On Tue, Feb 28, 2023 at 9:39 PM Philippe Mathieu-Daudé wrote: > > Hi Jason, do you Ack this patch? Yes. Acked-by: Jason Wang Thanks > > On 13/2/23 19:43, Philippe Mathieu-Daudé wrote: > > Use the TULIP() and DEVICE() QOM type-checking macros. > > Remove uses of DO_

Re: Re: [PATCH] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-02-06 Thread Jason Wang
On Tue, Feb 6, 2024 at 4:31 PM Stefano Garzarella wrote: > > On Tue, Feb 06, 2024 at 10:47:40AM +0800, Jason Wang wrote: > >On Mon, Feb 5, 2024 at 6:51 PM Stefano Garzarella > >wrote: > >> > >> On Fri, Feb 02, 2024 at 02:25:21PM +0100, Kevin Wolf wrote:

Re: Re: Re: [PATCH] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-02-07 Thread Jason Wang
On Wed, Feb 7, 2024 at 4:47 PM Stefano Garzarella wrote: > > On Wed, Feb 07, 2024 at 11:17:34AM +0800, Jason Wang wrote: > >On Tue, Feb 6, 2024 at 4:31 PM Stefano Garzarella > >wrote: > >> > >> On Tue, Feb 06, 2024 at 10:47:40AM +0800, Jason Wang wrote:

Re: [PATCH RFC v2 00/12] virtio-net: add support for SR-IOV emulation

2023-12-10 Thread Jason Wang
On Sun, Dec 10, 2023 at 12:06 PM Akihiko Odaki wrote: > > Introduction > > > This series is based on the RFC series submitted by Yui Washizu[1]. > See also [2] for the context. > > This series enables SR-IOV emulation for virtio-net. It is useful > to test SR-IOV support on the

Re: [PATCH RFC v2 00/12] virtio-net: add support for SR-IOV emulation

2023-12-10 Thread Jason Wang
On Mon, Dec 11, 2023 at 1:30 PM Akihiko Odaki wrote: > > On 2023/12/11 11:52, Jason Wang wrote: > > On Sun, Dec 10, 2023 at 12:06 PM Akihiko Odaki > > wrote: > >> > >> Introduction > >> > >> > >> This series is based

Re: [PATCH RFC v2 00/12] virtio-net: add support for SR-IOV emulation

2023-12-11 Thread Jason Wang
On Mon, Dec 11, 2023 at 4:29 PM Akihiko Odaki wrote: > > On 2023/12/11 16:26, Jason Wang wrote: > > On Mon, Dec 11, 2023 at 1:30 PM Akihiko Odaki > > wrote: > >> > >> On 2023/12/11 11:52, Jason Wang wrote: > >>> On Sun, Dec

Re: [PATCH] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-02-05 Thread Jason Wang
On Mon, Feb 5, 2024 at 6:51 PM Stefano Garzarella wrote: > > On Fri, Feb 02, 2024 at 02:25:21PM +0100, Kevin Wolf wrote: > >VDUSE requires that virtqueues are first enabled before the DRIVER_OK > >status flag is set; with the current API of the kernel module, it is > >impossible to enable the

Re: [PATCH for-9.0 v3] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-17 Thread Jason Wang
On Fri, Mar 15, 2024 at 11:59 PM Kevin Wolf wrote: > > VDUSE requires that virtqueues are first enabled before the DRIVER_OK > status flag is set; with the current API of the kernel module, it is > impossible to enable the opposite order in our block export code because > userspace is not

Re: [PATCH v1 0/8] virtio,vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-05 Thread Jason Wang
On Tue, Mar 5, 2024 at 3:46 AM Jonah Palmer wrote: > > The goal of these patches are to add support to a variety of virtio and > vhost devices for the VIRTIO_F_NOTIFICATION_DATA transport feature. This > feature indicates that a driver will pass extra data (instead of just a > virtqueue's index)

Re: [PATCH v2 1/6] virtio/virtio-pci: Handle extra notification data

2024-03-13 Thread Jason Wang
On Wed, Mar 13, 2024 at 7:55 PM Jonah Palmer wrote: > > Add support to virtio-pci devices for handling the extra data sent > from the driver to the device when the VIRTIO_F_NOTIFICATION_DATA > transport feature has been negotiated. > > The extra data that's passed to the virtio-pci device when