Re: [PATCH v15 1/6] qmp: add QMP command x-query-virtio

2022-12-02 Thread Jonah Palmer
On 11/30/22 11:16, Philippe Mathieu-Daudé wrote: Hi, On 11/8/22 14:24, Jonah Palmer wrote: From: Laurent Vivier This new command lists all the instances of VirtIODevices with their canonical QOM path and name. [Jonah: @virtio_list duplicates information that already exists in   the QOM

[PATCH v15 1/6] qmp: add QMP command x-query-virtio

2022-08-11 Thread Jonah Palmer
Signed-off-by: Jonah Palmer --- hw/virtio/meson.build | 2 ++ hw/virtio/virtio-stub.c| 14 hw/virtio/virtio.c | 44 include/hw/virtio/virtio.h | 1 + qapi/meson.build | 1 + qapi/qapi-schema.json | 1 + qapi/virtio.json

[PATCH v15 5/6] qmp: add QMP command x-query-virtio-queue-element

2022-08-11 Thread Jonah Palmer
doing this we get (1) simpler schema, (2) smaller generated code, and (3) less maintenance burden for when new things are added (e.g. devices, device features, etc.).] Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 9 ++ hw/virtio/virtio.c | 154

[PATCH v15 2/6] qmp: add QMP command x-query-virtio-status

2022-08-11 Thread Jonah Palmer
ill decode status bits of a VirtIODevice. [Jonah: From patch v12; added a check to @virtio_device_find to ensure synchronicity between @virtio_list and the devices in the QOM composition tree.] Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 5 + hw/virti

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

2022-08-11 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing from previous patchset from Apr. 1 (v14). Original patches are by Laurent Vivier from May 2020. I sincerely apologize for the *massive* delay in getting this latest v15 serie

[PATCH v15 4/6] qmp: add QMP commands for virtio/vhost queue-status

2022-08-11 Thread Jonah Palmer
From: Laurent Vivier These new commands show the internal status of a VirtIODevice's VirtQueue and a vhost device's vhost_virtqueue (if active). Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 14 +++ hw/virtio/virtio.c

[PATCH v15 3/6] qmp: decode feature & status bits in virtio-status

2022-08-11 Thread Jonah Palmer
ned-off-by: Jonah Palmer --- As mentioned in the cover letter, there's a bit of confusion for me here regarding a 30 feature bit that I've been seeing in all of the PCI virtio devices that I've defined when bringing up a guest. The only 30 feature bits th

[PATCH v15 6/6] hmp: add virtio commands

2022-08-11 Thread Jonah Palmer
From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. [Jonah: Adjusted hmp monitor output format for features / statuses with their descriptions.] Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hmp-commands-info.hx | 70

Re: [PATCH v2 1/2] qmp: remove virtio_list, search QOM tree instead

2023-07-27 Thread Jonah Palmer
On 6/27/23 07:23, Jonah Palmer wrote: On 6/26/23 08:16, Michael S. Tsirkin wrote: On Mon, Jun 26, 2023 at 08:08:28AM -0400, Jonah Palmer wrote: On 6/23/23 01:47, Michael S. Tsirkin wrote: On Fri, Jun 09, 2023 at 09:20:39AM -0400, Jonah Palmer wrote: The virtio_list duplicates

Re: [PATCH v2 1/2] qmp: remove virtio_list, search QOM tree instead

2023-07-27 Thread Jonah Palmer
On 7/27/23 07:46, Daniel P. Berrangé wrote: On Fri, Jun 09, 2023 at 09:20:39AM -0400, Jonah Palmer wrote: The virtio_list duplicates information about virtio devices that already exist in the QOM composition tree. Instead of creating this list of realized virtio devices, search the QOM

[PATCH v3 0/3] qmp, vhost-user: Remove virtio_list & update virtio introspection

2023-08-03 Thread Jonah Palmer
evices via. 'TYPE_VIRTIO_DEVICES' verify path is a virtio device before checking if it's realized remove 'VIRTIO_BLK_F_ZONED' update (already exists) add cover letter Jonah Palmer (3): qmp: remove virtio_list, search QOM tree instead qmp: update virtio featu

[PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-03 Thread Jonah Palmer
pdated to simplify the method of determining if a path is to a valid and realized virtio device.] Signed-off-by: Jonah Palmer --- hw/virtio/virtio-qmp.c | 96 ++ hw/virtio/virtio-qmp.h | 7 --- hw/virtio/virtio.c | 6 --- 3 files changed, 40 insert

[PATCH v3 2/3] qmp: update virtio feature maps, vhost-user-gpio introspection

2023-08-03 Thread Jonah Palmer
-user-gpio devices. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-user-gpio.c | 7 +++ hw/virtio/virtio-qmp.c | 38 - 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c index

[PATCH v3 3/3] vhost-user: move VhostUserProtocolFeature definition to header file

2023-08-03 Thread Jonah Palmer
this will be present for these 3 files. Signed-off-by: Jonah Palmer --- hw/scsi/vhost-user-scsi.c | 4 hw/virtio/vhost-user.c | 21 - hw/virtio/virtio-qmp.c | 22 +- include/hw/virtio/vhost-user.h | 21 + 4

Re: [PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-04 Thread Jonah Palmer
On 8/3/23 11:05, Daniel P. Berrangé wrote: On Thu, Aug 03, 2023 at 10:54:58AM -0400, Jonah Palmer wrote: The virtio_list duplicates information about virtio devices that already exist in the QOM composition tree. Instead of creating this list of realized virtio devices, search the QOM

Re: [PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-04 Thread Jonah Palmer
On 8/3/23 12:40, Manos Pitsidianakis wrote: On Thu, 03 Aug 2023 17:54, Jonah Palmer wrote: -VirtioInfoList *qmp_x_query_virtio(Error **errp) +static int query_dev_child(Object *child, void *opaque) { -    VirtioInfoList *list = NULL; -    VirtioInfo *node; -    VirtIODevice *vdev

Re: [PATCH v3 0/3] qmp, vhost-user: Remove virtio_list & update virtio introspection

2023-08-04 Thread Jonah Palmer
On 8/3/23 15:50, Michael S. Tsirkin wrote: On Thu, Aug 03, 2023 at 10:54:57AM -0400, Jonah Palmer wrote: These patches update a few things related to virtio introspection via. QMP/HMP commands. 1. Remove 'virtio_list' and instead query the QOM composition tree to find any active

[RFC 1/8] virtio/virtio-pci: Handle extra notification data

2024-03-01 Thread Jonah Palmer
virtqueue layout. In a split virtqueue layout, this data includes: - upper 16 bits: last_avail_idx - lower 16 bits: virtqueue index In a packed virtqueue layout, this data includes: - upper 16 bits: 1-bit wrap counter & 15-bit last_avail_idx - lower 16 bits: virtqueue index Signed-off-by

[RFC 5/8] virtio-ccw: Handle extra notification data

2024-03-01 Thread Jonah Palmer
virtqueue layout. That data passed to the virtio-ccw device is in the same format as the data passed to virtio-pci devices. Signed-off-by: Jonah Palmer --- hw/s390x/s390-virtio-ccw.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio-

[RFC 8/8] virtio: Add VIRTIO_F_NOTIFICATION_DATA property definition

2024-03-01 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_NOTIFICATION_DATA feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 4 +++- 1 file chang

[RFC 7/8] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits

2024-03-01 Thread Jonah Palmer
the backend does not support it. Signed-off-by: Jonah Palmer --- hw/block/vhost-user-blk.c| 1 + hw/net/vhost_net.c | 2 ++ hw/scsi/vhost-scsi.c | 1 + hw/scsi/vhost-user-scsi.c| 1 + hw/virtio/vhost-user-fs.c| 2 +- hw/virtio/vhost-user-vsock.c | 1 + net/vhost

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

2024-03-01 Thread Jonah Palmer
such, the feature is offered by backend devices only when supported, with fallback mechanisms where backend support is absent. Jonah Palmer (8): virtio/virtio-pci: Handle extra notification data virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA virtio-mmio: Handle extra notifica

[RFC 6/8] virtio-ccw: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-01 Thread Jonah Palmer
-ccw devices using this feature. Signed-off-by: Jonah Palmer --- hw/s390x/virtio-ccw.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index b4676909dd..936ba78fda 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c

[RFC 4/8] virtio-mmio: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-01 Thread Jonah Palmer
devices using this feature. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-mmio.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 2bac77460e..fc780a03b2 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio

[RFC 3/8] virtio-mmio: Handle extra notification data

2024-03-01 Thread Jonah Palmer
ice's virtqueue layout. The data passed to the virtio-mmio device is in the same format as the data passed to virtio-pci devices. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-mmio.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b

[RFC 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-01 Thread Jonah Palmer
devices using this feature. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-pci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c7c577b177..fd9717a0f5 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c

Re: [RFC 1/8] virtio/virtio-pci: Handle extra notification data

2024-03-04 Thread Jonah Palmer
On 3/1/24 2:55 PM, Eugenio Perez Martin wrote: On Fri, Mar 1, 2024 at 2:44 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

Re: [RFC 1/8] virtio/virtio-pci: Handle extra notification data

2024-03-04 Thread Jonah Palmer
On 3/1/24 2:31 PM, Eugenio Perez Martin wrote: On Fri, Mar 1, 2024 at 2:44 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

Re: [RFC 7/8] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits

2024-03-04 Thread Jonah Palmer
On 3/1/24 3:04 PM, Eugenio Perez Martin wrote: On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: Add support for the VIRTIO_F_NOTIFICATION_DATA feature across a variety of vhost devices. The inclusion of VIRTIO_F_NOTIFICATION_DATA in the feature bits arrays for these devices ensures that

Re: [RFC 1/8] virtio/virtio-pci: Handle extra notification data

2024-03-04 Thread Jonah Palmer
On 3/4/24 12:24 PM, Eugenio Perez Martin wrote: On Mon, Mar 4, 2024 at 6:09 PM Jonah Palmer wrote: On 3/1/24 2:31 PM, Eugenio Perez Martin wrote: On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: Add support to virtio-pci devices for handling the extra data sent from the driver to

[PATCH v1 4/8] virtio-mmio: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-04 Thread Jonah Palmer
devices using this feature. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-mmio.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index f99d5851a2..f42ed5c512 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio

[PATCH v1 8/8] virtio: Add VIRTIO_F_NOTIFICATION_DATA property definition

2024-03-04 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_NOTIFICATION_DATA feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.

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

2024-03-04 Thread Jonah Palmer
such, the feature is offered by backend devices only when supported, with fallback mechanisms where backend support is absent. Jonah Palmer (8): virtio/virtio-pci: Handle extra notification data virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA virtio-mmio: Handle extra notifica

[PATCH v1 1/8] virtio/virtio-pci: Handle extra notification data

2024-03-04 Thread Jonah Palmer
virtqueue layout. In a split virtqueue layout, this data includes: - upper 16 bits: shadow_avail_idx - lower 16 bits: virtqueue index In a packed virtqueue layout, this data includes: - upper 16 bits: 1-bit wrap counter & 15-bit shadow_avail_idx - lower 16 bits: virtqueue index Signed

[PATCH v1 6/8] virtio-ccw: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-04 Thread Jonah Palmer
-ccw devices using this feature. Acked-by: Thomas Huth Signed-off-by: Jonah Palmer --- hw/s390x/virtio-ccw.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index b4676909dd..936ba78fda 100644 --- a/hw/s390x/virtio-ccw.c +++ b

[PATCH v1 3/8] virtio-mmio: Handle extra notification data

2024-03-04 Thread Jonah Palmer
ice's virtqueue layout. The data passed to the virtio-mmio device is in the same format as the data passed to virtio-pci devices. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-mmio.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/vir

[PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-04 Thread Jonah Palmer
devices using this feature. Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/virtio/virtio-pci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index d12edc567f..287b8f7720 100644 --- a/hw/virtio/virtio-pci.c

[PATCH v1 5/8] virtio-ccw: Handle extra notification data

2024-03-04 Thread Jonah Palmer
virtqueue layout. That data passed to the virtio-ccw device is in the same format as the data passed to virtio-pci devices. Acked-by: Thomas Huth Signed-off-by: Jonah Palmer --- hw/s390x/s390-virtio-ccw.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/

[PATCH v1 7/8] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits

2024-03-04 Thread Jonah Palmer
the backend does not support it. Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/block/vhost-user-blk.c| 1 + hw/net/vhost_net.c | 2 ++ hw/scsi/vhost-scsi.c | 1 + hw/scsi/vhost-user-scsi.c| 1 + hw/virtio/vhost-user-fs.c| 2 +- hw/virtio/vhost-user

[RFC 7/8] vhost/vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-03-21 Thread Jonah Palmer
not support it. Signed-off-by: Jonah Palmer --- hw/block/vhost-user-blk.c| 1 + hw/net/vhost_net.c | 2 ++ hw/scsi/vhost-scsi.c | 1 + hw/scsi/vhost-user-scsi.c| 1 + hw/virtio/vhost-user-fs.c| 1 + hw/virtio/vhost-user-vsock.c | 1 + net/vhost-vdpa.c | 1

[RFC 4/8] virtio: Implement in-order handling for virtio devices

2024-03-21 Thread Jonah Palmer
ned-off-by: Jonah Palmer --- hw/virtio/virtio.c | 70 -- include/hw/virtio/virtio.h | 8 + 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 40124545d6..40e4377f1e 100644 --- a/hw/virtio/virt

[RFC 2/8] virtio: Create/destroy/reset VirtQueue In-Order hash table

2024-03-21 Thread Jonah Palmer
d, out-of-order VirtQueueElements until they can be used in the same order in which they were made available to the device. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index fb6b4cc

[RFC 3/8] virtio: Define order variables

2024-03-21 Thread Jonah Palmer
he device puts these elements on the used ring. A VirtQueueElement's order_key is value of a VirtQueue's current_order_key at the time of the VirtQueueElement's creation. This value must match with the VirtQueue's current_order_idx before it's able to be put on the used rin

[RFC 6/8] vhost-svq: in-order handling

2024-03-21 Thread Jonah Palmer
ar if this implementation is really necessary to "guarantee" in-order handling since, by design, the vhost_svq_flush function puts used VirtQueueElements in-order already. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-shadow-virtqueue.c | 15 --- 1 file changed, 12 insert

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

2024-03-21 Thread Jonah Palmer
exp-seq-num = 3: lookup(table, exp-seq-num) != NULL ? --> No, done - Jonah Palmer (8): virtio: Define InOrderVQElement virtio: Create/destroy/reset VirtQueue In-Order hash table virtio: Define order variables

[RFC 5/8] virtio-net: in-order handling

2024-03-21 Thread Jonah Palmer
;guarantee" that used VirtQueueElements are put on the used ring in-order since, by design, virtio-net already does this with its Rx VirtQueue. Signed-off-by: Jonah Palmer --- hw/net/virtio-net.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c

[RFC 8/8] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-03-21 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 4 +++- 1 file changed, 3 inser

[RFC 1/8] virtio: Define InOrderVQElement

2024-03-21 Thread Jonah Palmer
(len) - VirtQueueElement array index (idx) - Number of processed VirtQueueElements (count) InOrderVQElements will be stored in a buffering mechanism until an order can be achieved. Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 7 +++ 1 file changed, 7 insertions(+) diff

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

2024-03-21 Thread Jonah Palmer
1/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 that all buffers are used by the device in the same order in which they were made available by the driver. The

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

2024-03-25 Thread Jonah Palmer
On 3/22/24 7:18 AM, Eugenio Perez Martin wrote: On Thu, Mar 21, 2024 at 4:57 PM 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 that all buffers are used by the

Re: [RFC 1/8] virtio: Define InOrderVQElement

2024-03-25 Thread Jonah Palmer
On 3/22/24 5:45 AM, Eugenio Perez Martin wrote: On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: Define the InOrderVQElement structure for the VIRTIO_F_IN_ORDER transport feature implementation. The InOrderVQElement structure is used to encapsulate out-of-order VirtQueueElement data

Re: [RFC 4/8] virtio: Implement in-order handling for virtio devices

2024-03-25 Thread Jonah Palmer
On 3/22/24 6:46 AM, Eugenio Perez Martin wrote: On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: Implements in-order handling for most virtio devices using the VIRTIO_F_IN_ORDER transport feature, specifically those who call virtqueue_push to push their used elements onto the used ring

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

2024-03-26 Thread Jonah Palmer
On 3/25/24 4:33 PM, Eugenio Perez Martin wrote: On Mon, Mar 25, 2024 at 5:52 PM Jonah Palmer wrote: On 3/22/24 7:18 AM, Eugenio Perez Martin wrote: On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: The goal of these patches is to add support to a variety of virtio and vhost devices

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

2024-03-26 Thread Jonah Palmer
On 3/26/24 2:34 PM, Eugenio Perez Martin wrote: On Tue, Mar 26, 2024 at 5:49 PM Jonah Palmer wrote: On 3/25/24 4:33 PM, Eugenio Perez Martin wrote: On Mon, Mar 25, 2024 at 5:52 PM Jonah Palmer wrote: On 3/22/24 7:18 AM, Eugenio Perez Martin wrote: On Thu, Mar 21, 2024 at 4:57 PM

[RFC v2 5/5] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-03-28 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 4 +++- 1

[RFC v2 1/5] virtio: Initialize sequence variables

2024-03-28 Thread Jonah Palmer
element can be put on the used ring by the device. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 18 ++ include/hw/virtio/virtio.h | 1 + 2 files changed, 19 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index fb6b4ccd83..069d96df99 10064

[RFC v2 4/5] vhost, vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-03-28 Thread Jonah Palmer
not support it. Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/block/vhost-user-blk.c| 1 + hw/net/vhost_net.c | 2 ++ hw/scsi/vhost-scsi.c | 1 + hw/scsi/vhost-user-scsi.c| 1 + hw/virtio/vhost-user-fs.c| 1 + hw/virtio/vhost-user-vsock.c | 1 + net

[RFC v2 3/5] virtio: In-order support for packed VQs

2024-03-28 Thread Jonah Palmer
elements exist, separate logic is required for the flushing operation of packed virtqueues. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 50 +++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c i

[RFC v2 2/5] virtio: In-order support for split VQs

2024-03-28 Thread Jonah Palmer
written to the used ring, no update to the used ring's index is needed. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 50 ++ 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 069d9

[RFC v2 0/5] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-03-28 Thread Jonah Palmer
tor ring, we set these two values to 0 to indicate that it's been used. --- v2: Use a VirtQueue's used_elems array as a buffer mechanism v1: Implement custom GLib GHashTable as a buffer mechanism Jonah Palmer (5): virtio: Initialize sequence variables virtio: In-order support for split

Re: [RFC v2 1/5] virtio: Initialize sequence variables

2024-04-03 Thread Jonah Palmer
On 4/3/24 6:18 AM, Eugenio Perez Martin wrote: On Thu, Mar 28, 2024 at 5:22 PM Jonah Palmer wrote: Initialize sequence variables for VirtQueue and VirtQueueElement structures. A VirtQueue's sequence variables are initialized when a VirtQueue is being created or reset. A VirtQueueElem

Re: [RFC v2 1/5] virtio: Initialize sequence variables

2024-04-04 Thread Jonah Palmer
On 4/4/24 7:35 AM, Eugenio Perez Martin wrote: On Wed, Apr 3, 2024 at 6:51 PM Jonah Palmer wrote: On 4/3/24 6:18 AM, Eugenio Perez Martin wrote: On Thu, Mar 28, 2024 at 5:22 PM Jonah Palmer wrote: Initialize sequence variables for VirtQueue and VirtQueueElement structures. A

Re: [RFC v2 1/5] virtio: Initialize sequence variables

2024-04-05 Thread Jonah Palmer
On 4/4/24 12:33 PM, Eugenio Perez Martin wrote: On Thu, Apr 4, 2024 at 4:42 PM Jonah Palmer wrote: On 4/4/24 7:35 AM, Eugenio Perez Martin wrote: On Wed, Apr 3, 2024 at 6:51 PM Jonah Palmer wrote: On 4/3/24 6:18 AM, Eugenio Perez Martin wrote: On Thu, Mar 28, 2024 at 5:22 PM Jonah

Re: [RFC v2 1/5] virtio: Initialize sequence variables

2024-04-05 Thread Jonah Palmer
On 4/5/24 11:04 AM, Eugenio Perez Martin wrote: On Fri, Apr 5, 2024 at 3:59 PM Jonah Palmer wrote: On 4/4/24 12:33 PM, Eugenio Perez Martin wrote: On Thu, Apr 4, 2024 at 4:42 PM Jonah Palmer wrote: On 4/4/24 7:35 AM, Eugenio Perez Martin wrote: On Wed, Apr 3, 2024 at 6:51 PM Jonah

[RFC v3 1/6] virtio: Add bool to VirtQueueElement

2024-04-08 Thread Jonah Palmer
Add the boolean 'filled' member to the VirtQueueElement structure. The use of this boolean will signify if the element has been written to the used / descriptor ring or not. This boolean is used to support the VIRTIO_F_IN_ORDER feature. Signed-off-by: Jonah Palmer --- include/hw/virti

[RFC v3 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-04-08 Thread Jonah Palmer
VirtQueueElement used_elems array in-order starting at vq->used_idx. If the element is valid (filled), the element is written to the used/descriptor ring. This process continues until we find an invalid (not filled) element. If any elements were written, the used_idx is updated. Signed-off-by: Jonah Pal

[RFC v3 2/6] virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

2024-04-08 Thread Jonah Palmer
ively. This will allow us to keep track of the current order, what elements have been written, as well as an element's essential data after being processed. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a

[RFC v3 6/6] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-04-08 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 4 +++- 1

[RFC v3 0/6] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-04-08 Thread Jonah Palmer
Element to signal element status Add virtqueue_ordered_fill/flush functions for ordering v2: Use a VirtQueue's used_elems array as a buffer mechanism v1: Implement custom GLib GHashTable as a buffer mechanism Jonah Palmer (6): virtio: Add bool to VirtQueueElement virtio: virtqu

[RFC v3 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-04-08 Thread Jonah Palmer
. By marking the element as filled, it will indicate that this element is ready to be flushed, so long as the element is in-order. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c

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

2024-03-08 Thread Jonah Palmer
kin wrote: On Wed, Mar 06, 2024 at 08:07:31AM +0100, Eugenio Perez Martin wrote: On Wed, Mar 6, 2024 at 6:34 AM Jason Wang wrote: 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

Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-08 Thread Jonah Palmer
On 3/8/24 12:36 PM, Eugenio Perez Martin wrote: On Fri, Mar 8, 2024 at 6: 01 PM Michael S. Tsirkin wrote: > > On Mon, Mar 04, 2024 at 02: 46: 06PM -0500, Jonah Palmer wrote: > > Prevent ioeventfd from being enabled/disabled when a virtio-pci > > device ZjQcmQRYFpf

Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-11 Thread Jonah Palmer
On 3/8/24 2:19 PM, Michael S. Tsirkin wrote: On Fri, Mar 08, 2024 at 12:45:13PM -0500, Jonah Palmer wrote: On 3/8/24 12:36 PM, Eugenio Perez Martin wrote: On Fri, Mar 8, 2024 at 6: 01 PM Michael S. Tsirkin wrote: > > On Mon, Mar 04, 2024 at 02: 46: 06PM -0500, Jonah Palmer

Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-12 Thread Jonah Palmer
On 3/11/24 11:47 AM, Michael S. Tsirkin wrote: On Mon, Mar 11, 2024 at 10:53:25AM -0400, Jonah Palmer wrote: On 3/8/24 2:19 PM, Michael S. Tsirkin wrote: On Fri, Mar 08, 2024 at 12:45:13PM -0500, Jonah Palmer wrote: On 3/8/24 12:36 PM, Eugenio Perez Martin wrote: On Fri, Mar 8, 2024

Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-12 Thread Jonah Palmer
On 3/12/24 10:58 AM, Michael S. Tsirkin wrote: On Tue, Mar 12, 2024 at 10:33:51AM -0400, Jonah Palmer wrote: On 3/11/24 11:47 AM, Michael S. Tsirkin wrote: On Mon, Mar 11, 2024 at 10:53:25AM -0400, Jonah Palmer wrote: On 3/8/24 2:19 PM, Michael S. Tsirkin wrote: On Fri, Mar 08, 2024

[PATCH v2 4/6] virtio-ccw: Handle extra notification data

2024-03-13 Thread Jonah Palmer
virtqueue layout. That data passed to the virtio-ccw device is in the same format as the data passed to virtio-pci devices. Tested-by: Lei Yang Acked-by: Eric Farman Acked-by: Thomas Huth Signed-off-by: Jonah Palmer --- hw/s390x/s390-virtio-ccw.c | 16 1 file changed, 12

[PATCH v2 6/6] virtio: Add VIRTIO_F_NOTIFICATION_DATA property definition

2024-03-13 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_NOTIFICATION_DATA feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Tested-by: Lei Yang Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- inclu

[PATCH v2 2/6] virtio: Prevent creation of device using notification-data with ioeventfd

2024-03-13 Thread Jonah Palmer
extra notification data in the future, this compatibility check can be removed. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 22 ++ include/hw/virtio/virtio.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index bcb9e

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

2024-03-13 Thread Jonah Palmer
d-by: Lei Yang Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/virtio/virtio-pci.c | 10 +++--- hw/virtio/virtio.c | 18 ++ include/hw/virtio/virtio.h | 1 + 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw

[PATCH v2 5/6] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits

2024-03-13 Thread Jonah Palmer
the backend does not support it. Tested-by: Lei Yang Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/block/vhost-user-blk.c| 1 + hw/net/vhost_net.c | 2 ++ hw/scsi/vhost-scsi.c | 1 + hw/scsi/vhost-user-scsi.c| 1 + hw/virtio/vhost-user-fs.c| 2

[PATCH v2 3/6] virtio-mmio: Handle extra notification data

2024-03-13 Thread Jonah Palmer
ice's virtqueue layout. The data passed to the virtio-mmio device is in the same format as the data passed to virtio-pci devices. Tested-by: Lei Yang Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/virtio/virtio-mmio.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) di

[PATCH v2 0/6] virtio,vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-13 Thread Jonah Palmer
maintain compatibility across different backends. As such, the feature is offered by backend devices only when supported, with fallback mechanisms where backend support is absent. v2: Don't disable ioeventfd by default, user must disable it Drop tags on patch 2/6 Jonah Palmer (6): vir

Re: [PATCH v2 2/6] virtio: Prevent creation of device using notification-data with ioeventfd

2024-03-13 Thread Jonah Palmer
On 3/13/24 10:35 AM, Eugenio Perez Martin wrote: On Wed, Mar 13, 2024 at 12:55 PM Jonah Palmer wrote: Prevent the realization of a virtio device that attempts to use the VIRTIO_F_NOTIFICATION_DATA transport feature without disabling ioeventfd. Due to ioeventfd not being able to carry the

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

2024-03-14 Thread Jonah Palmer
On 3/13/24 11:01 PM, Jason Wang wrote: 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&#

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

2024-03-14 Thread Jonah Palmer
On 3/14/24 10:55 AM, Eugenio Perez Martin wrote: On Thu, Mar 14, 2024 at 1:16 PM Jonah Palmer wrote: On 3/13/24 11:01 PM, Jason Wang wrote: 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

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

2024-03-14 Thread Jonah Palmer
On 3/14/24 3:05 PM, Eugenio Perez Martin wrote: On Thu, Mar 14, 2024 at 5:06 PM Jonah Palmer wrote: On 3/14/24 10:55 AM, Eugenio Perez Martin wrote: On Thu, Mar 14, 2024 at 1:16 PM Jonah Palmer wrote: On 3/13/24 11:01 PM, Jason Wang wrote: On Wed, Mar 13, 2024 at 7:55 PM Jonah

[PATCH v3 for 9.1 3/6] virtio-mmio: Handle extra notification data

2024-03-15 Thread Jonah Palmer
ice's virtqueue layout. The data passed to the virtio-mmio device is in the same format as the data passed to virtio-pci devices. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-mmio.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/vir

[PATCH v3 for 9.1 2/6] virtio: Prevent creation of device using notification-data with ioeventfd

2024-03-15 Thread Jonah Palmer
extra notification data in the future, this compatibility check can be removed. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 463426ca92..f9cb8d1e5c 100644 --- a/hw/virtio/vir

[PATCH v3 for 9.1 1/6] virtio/virtio-pci: Handle extra notification data

2024-03-15 Thread Jonah Palmer
virtqueue layout. In a split virtqueue layout, this data includes: - upper 16 bits: shadow_avail_idx - lower 16 bits: virtqueue index In a packed virtqueue layout, this data includes: - upper 16 bits: 1-bit wrap counter & 15-bit shadow_avail_idx - lower 16 bits: virtqueue index Signed

[PATCH v3 for 9.1 4/6] virtio-ccw: Handle extra notification data

2024-03-15 Thread Jonah Palmer
virtqueue layout. That data passed to the virtio-ccw device is in the same format as the data passed to virtio-pci devices. Signed-off-by: Jonah Palmer --- hw/s390x/s390-virtio-ccw.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio-

[PATCH v3 for 9.1 0/6] virtio, vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-15 Thread Jonah Palmer
y pass in upper 16 bits of 32-bit extra data (was redundant) Make notification compatibility check function static Drop tags on patches 1/6, 3/6, and 4/6 v2: Don't disable ioeventfd by default, user must disable it Drop tags on patch 2/6 Jonah Palmer (6): virtio/virtio-pci

[PATCH v3 for 9.1 5/6] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits

2024-03-15 Thread Jonah Palmer
the backend does not support it. Tested-by: Lei Yang Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/block/vhost-user-blk.c| 1 + hw/net/vhost_net.c | 2 ++ hw/scsi/vhost-scsi.c | 1 + hw/scsi/vhost-user-scsi.c| 1 + hw/virtio/vhost-user-fs.c| 2

[PATCH v3 for 9.1 6/6] virtio: Add VIRTIO_F_NOTIFICATION_DATA property definition

2024-03-15 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_NOTIFICATION_DATA feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Tested-by: Lei Yang Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- inclu

Re: [PATCH v3 for 9.1 0/6] virtio, vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-18 Thread Jonah Palmer
tfd by default, user must disable it Drop tags on patch 2/6 Jonah Palmer (6): virtio/virtio-pci: Handle extra notification data virtio: Prevent creation of device using notification-data with ioeventfd virtio-mmio: Handle extra notification data virtio-ccw: Handle extra notification data

Re: [RFC 1/2] iova_tree: add an id member to DMAMap

2024-04-29 Thread Jonah Palmer
On 4/29/24 4:14 AM, Eugenio Perez Martin wrote: On Thu, Apr 25, 2024 at 7:44 PM Si-Wei Liu wrote: On 4/24/2024 12:33 AM, Eugenio Perez Martin wrote: On Wed, Apr 24, 2024 at 12:21 AM Si-Wei Liu wrote: On 4/22/2024 1:49 AM, Eugenio Perez Martin wrote: On Sat, Apr 20, 2024 at 1:50 AM S

[PATCH 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-05-06 Thread Jonah Palmer
ned-off-by: Jonah Palmer --- hw/virtio/virtio.c | 75 +- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 064046b5e2..0efed2c88e 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -100

[PATCH 2/6] virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

2024-05-06 Thread Jonah Palmer
ively. This will allow us to keep track of the current order, what elements have been written, as well as an element's essential data after being processed. Tested-by: Lei Yang Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 17 - 1 file changed, 16 insertions(+), 1 deletio

[PATCH 6/6] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-05-06 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Tested-by: Lei Yang Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/v

[PATCH 1/6] virtio: Add bool to VirtQueueElement

2024-05-06 Thread Jonah Palmer
Add the boolean 'filled' member to the VirtQueueElement structure. The use of this boolean will signify if the element has been written to the used / descriptor ring or not. This boolean is used to support the VIRTIO_F_IN_ORDER feature. Tested-by: Lei Yang Signed-off-by: Jo

[PATCH 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-05-06 Thread Jonah Palmer
. By marking the element as filled, it will indicate that this element is ready to be flushed, so long as the element is in-order. Tested-by: Lei Yang Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git

  1   2   3   4   >