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

2024-05-10 Thread Jonah Palmer
On 5/10/24 3:48 AM, Eugenio Perez Martin wrote: On Mon, May 6, 2024 at 5:06 PM Jonah Palmer wrote: Add VIRTIO_F_IN_ORDER feature support for virtqueue_flush operations. The goal of the virtqueue_flush operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to write elements

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

2024-05-10 Thread Jonah Palmer
On 5/9/24 10:08 AM, Eugenio Perez Martin wrote: On Mon, May 6, 2024 at 5:05 PM Jonah Palmer wrote: Add VIRTIO_F_IN_ORDER feature support for virtqueue_fill operations. The goal of the virtqueue_fill operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to search for this now

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

2024-05-10 Thread Jonah Palmer
On 5/9/24 9:13 AM, Eugenio Perez Martin wrote: On Mon, May 6, 2024 at 5:06 PM Jonah Palmer wrote: Add VIRTIO_F_IN_ORDER feature support in virtqueue_split_pop and virtqueue_packed_pop. VirtQueueElements popped from the available/descritpor ring are added to the VirtQueue's used_elems

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

2024-05-10 Thread Jonah Palmer
On 5/9/24 8:32 AM, Eugenio Perez Martin wrote: On Mon, May 6, 2024 at 5:06 PM Jonah Palmer wrote: 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

[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/virtio

[PATCH 5/6] vhost,vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-05-06 Thread Jonah Palmer
not support it. Tested-by: Lei Yang 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

[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 a/hw

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

2024-05-06 Thread Jonah Palmer
. --- v1: Move series from RFC to PATCH for submission. Jonah Palmer (6): virtio: Add bool to VirtQueueElement virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support vhost,vhost-user: Add

[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
. 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 deletion(-) diff

[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: Jonah Palmer

[RFC v3 5/6] vhost,vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-04-08 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 v3 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-04-08 Thread Jonah Palmer
the 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 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 file

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

2024-04-08 Thread Jonah Palmer
. 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/hw/virtio

[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 b/hw

[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/virtio/virtio.h

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

2024-04-08 Thread Jonah Palmer
ement 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: virtqueue_pop - VIRTIO_F_IN_ORD

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

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-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

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 VirtQueueElement's

[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 1/5] virtio: Initialize sequence variables

2024-03-28 Thread Jonah Palmer
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 100644 --- a/hw/virtio/virtio.c +++ b/hw

[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 file

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

2024-03-28 Thread Jonah Palmer
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 VQs virtio: In-order s

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

2024-03-28 Thread Jonah Palmer
, 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 069d96df99..19d3d43816 100644

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

2024-03-28 Thread Jonah Palmer
, 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 index 19d3d43816

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

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 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 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 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

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

2024-03-21 Thread Jonah Palmer
, 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. These patches

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

2024-03-21 Thread Jonah Palmer
-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/virtio.c +++ b

[RFC 3/8] virtio: Define order variables

2024-03-21 Thread Jonah Palmer
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 ring by the device. Signed-off-by: Jonah Palmer

[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 insertions

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

2024-03-21 Thread Jonah Palmer
antee" 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 b/hw/

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

2024-03-21 Thread Jonah Palmer
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 insertions(+), 3

[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 2/8] virtio: Create/destroy/reset VirtQueue In-Order hash table

2024-03-21 Thread Jonah Palmer
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 fb6b4ccd83..d2afeeb59a

[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 virtio: Implem

[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: [PATCH v3 for 9.1 0/6] virtio, vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-18 Thread Jonah Palmer
ault, 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 vhost/v

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

2024-03-15 Thread Jonah Palmer
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: Handle e

[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 --- include/hw

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

2024-03-15 Thread Jonah Palmer
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-off-by: J

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

2024-03-15 Thread Jonah Palmer
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/virtio.c

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

2024-03-15 Thread Jonah Palmer
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-ccw.c b/hw

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

2024-03-15 Thread Jonah Palmer
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/virtio/virtio

[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
if 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

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

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

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's

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

[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 --- include/hw

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

2024-03-13 Thread Jonah Palmer
tain 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): virtio/virtio

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

2024-03-13 Thread Jonah Palmer
if 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
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(-) diff --git

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

2024-03-13 Thread Jonah Palmer
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 bcb9e09df0

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

2024-03-13 Thread Jonah Palmer
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/virtio/vi

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

2024-03-13 Thread Jonah Palmer
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 insertions

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

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-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-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 ZjQcmQ

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

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

2024-03-04 Thread Jonah Palmer
if 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

[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.h | 4

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

2024-03-04 Thread Jonah Palmer
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/virtio/virtio

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

2024-03-04 Thread Jonah Palmer
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/s390x/s390

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

2024-03-04 Thread Jonah Palmer
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-off-by: J

[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 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 0/8] virtio,vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-04 Thread Jonah Palmer
ends. As 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 notification

[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

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

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

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 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

[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 3/8] virtio-mmio: Handle extra notification data

2024-03-01 Thread Jonah Palmer
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/hw/virtio

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

2024-03-01 Thread Jonah Palmer
ends. As 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 notification

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

2024-03-01 Thread Jonah Palmer
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-ccw.c b/hw

[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 changed, 3

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

2024-03-01 Thread Jonah Palmer
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: Jonah Pa

[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 7/8] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits

2024-03-01 Thread Jonah Palmer
if 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 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: [PATCH v15 1/6] qmp: add QMP command x-query-virtio

2022-12-09 Thread Jonah Palmer
On 12/7/22 08:22, Markus Armbruster wrote: Jonah Palmer writes: On 12/2/22 10:21, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 2/12/22 13:23, Jonah Palmer wrote: On 11/30/22 11:16, Philippe Mathieu-Daudé wrote: Hi, On 11/8/22 14:24, Jonah Palmer wrote: From: Laurent

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

2022-12-07 Thread Jonah Palmer
On 12/2/22 10:21, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 2/12/22 13:23, Jonah Palmer wrote: 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

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

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

2022-09-27 Thread Jonah Palmer
Hey Michael, when you get the chance, could you review these patches for me? Specifically patch 3/6, as that has the majority of the changes made for this series. Thanks! Jonah From: Jonah Palmer Sent: Thursday, August 11, 2022 8:26 AM To: qemu-de...@nongnu.org

[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

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

2022-08-11 Thread Jonah Palmer
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/virtio/virtio.c

[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 | 103

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

2022-08-11 Thread Jonah Palmer
. By 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 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 that are defi

[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

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

2022-08-11 Thread Jonah Palmer
-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 | 68

  1   2   3   >