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

2024-05-23 Thread Eugenio Perez Martin
On Thu, May 23, 2024 at 12:30 PM Jonah Palmer wrote: > > > > On 5/22/24 12:07 PM, Eugenio Perez Martin wrote: > > On Mon, May 20, 2024 at 3:01 PM Jonah Palmer > > wrote: > >> > >> Add VIRTIO_F_IN_ORDER feature support for the vi

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

2024-05-22 Thread Eugenio Perez Martin
On Mon, May 20, 2024 at 3:01 PM Jonah Palmer wrote: > > Add VIRTIO_F_IN_ORDER feature support for the virtqueue_fill operation. > > The goal of the virtqueue_ordered_fill operation when the > VIRTIO_F_IN_ORDER feature has been negotiated is to search for this > now-used element, set its length,

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

2024-05-22 Thread Eugenio Perez Martin
On Mon, May 20, 2024 at 3:01 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 array in-order and in the same fashion as >

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

2024-05-22 Thread Eugenio Perez Martin
On Mon, May 20, 2024 at 3:01 PM Jonah Palmer wrote: > > Add the boolean 'in_order_filled' member to the VirtQueueElement structure. > The use of this boolean will signify whether the element has been processed > and is ready to be flushed (so long as the element is in-order). This > boolean is

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

2024-05-10 Thread Eugenio Perez Martin
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 to the used/descriptor > ring in-order and then

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

2024-05-09 Thread Eugenio Perez Martin
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-used element, > set its length, and mark the

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

2024-05-09 Thread Eugenio Perez Martin
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 array in-order and in the same fashion as >

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

2024-05-09 Thread Eugenio Perez Martin
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 is used to support the > VIRTIO_F_IN_ORDER feature.

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

2024-04-05 Thread Eugenio Perez Martin
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: > >

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

2024-04-04 Thread Eugenio Perez Martin
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: > >&

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

2024-04-04 Thread Eugenio Perez Martin
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 > &g

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

2024-04-03 Thread Eugenio Perez Martin
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 sequence > variable is initialized when a

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

2024-03-26 Thread Eugenio Perez Martin
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 Mart

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

2024-03-25 Thread Eugenio Perez Martin
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 &g

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

2024-03-25 Thread Eugenio Perez Martin
On Mon, Mar 25, 2024 at 6:35 PM Jonah Palmer wrote: > > > > 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 > >>

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

2024-03-25 Thread Eugenio Perez Martin
On Mon, Mar 25, 2024 at 6:08 PM Jonah Palmer wrote: > > > > 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_O

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

2024-03-22 Thread Eugenio Perez Martin
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 device in the same order in > which they were made

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

2024-03-22 Thread Eugenio Perez Martin
On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: > > 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 Thanks! >

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

2024-03-22 Thread Eugenio Perez Martin
On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: > > Add support for the VIRTIO_F_IN_ORDER feature across a variety of vhost > devices. > > The inclusion of VIRTIO_F_IN_ORDER in the feature bits arrays for these > devices ensures that the backend is capable of offering and providing > support

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

2024-03-22 Thread Eugenio Perez Martin
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. > > The logic behind this implementation is as

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

2024-03-22 Thread Eugenio Perez Martin
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 that was processed by the host. This data >

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

2024-03-19 Thread Eugenio Perez Martin
On Tue, Mar 19, 2024 at 11:00 AM Kevin Wolf wrote: > > Am 18.03.2024 um 20:27 hat Eugenio Perez Martin geschrieben: > > On Mon, Mar 18, 2024 at 10:02 AM Michael S. Tsirkin wrote: > > > > > > On Mon, Mar 18, 2024 at 12:31:26PM +0800, Jason Wang wrote: > >

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

2024-03-18 Thread Eugenio Perez Martin
On Mon, Mar 18, 2024 at 10:02 AM Michael S. Tsirkin wrote: > > On Mon, Mar 18, 2024 at 12:31:26PM +0800, Jason Wang wrote: > > 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

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

2024-03-15 Thread Eugenio Perez Martin
On Fri, Mar 15, 2024 at 5:57 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

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

2024-03-15 Thread Eugenio Perez Martin
On Thu, Mar 14, 2024 at 9:24 PM Jonah Palmer wrote: > > > > 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 Mart

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

2024-03-14 Thread Eugenio Perez Martin
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: >

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

2024-03-14 Thread Eugenio Perez Martin
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 device when the

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

2024-03-13 Thread Eugenio Perez Martin
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 extra data associated with > this feature,

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

2024-03-08 Thread Eugenio Perez Martin
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 has negotiated the VIRTIO_F_NOTIFICATION_DATA transport > > feature. > > > > Due to ioeventfd

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

2024-03-07 Thread Eugenio Perez Martin
On Wed, Mar 6, 2024 at 8:34 AM Michael S. Tsirkin 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: &g

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

2024-03-05 Thread Eugenio Perez Martin
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_F_NOTIFICATION_DATA transport feature. This > > feature indicates that a driver

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

2024-03-05 Thread Eugenio Perez Martin
40301134330.4191007-1-jonah.pal...@oracle.com>" (untested). https://pypi.org/project/b4/ Thanks! > Thanks, > Xinying > > > [1] https://lists.nongnu.org/archive/html/qemu-devel/2024-03/msg00090.html > > > From: Eugenio Perez

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

2024-03-05 Thread Eugenio Perez Martin
On Mon, Mar 4, 2024 at 8:46 PM Jonah Palmer wrote: > > Prevent ioeventfd from being enabled/disabled when a virtio-mmio device > has negotiated the VIRTIO_F_NOTIFICATION_DATA transport feature. > > Due to ioeventfd not being able to carry the extra data associated with > this feature, the

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

2024-03-05 Thread Eugenio Perez Martin
On Mon, Mar 4, 2024 at 8:46 PM Jonah Palmer wrote: > > Add support to virtio-mmio 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-mmio device when

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

2024-03-05 Thread Eugenio Perez Martin
On Mon, Mar 4, 2024 at 8:46 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

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

2024-03-04 Thread Eugenio Perez Martin
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 >

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

2024-03-01 Thread Eugenio Perez Martin
Hi Wentao / Rick / Xinying Yu, Would it work for you to test this series on your use cases, so we make sure everything works as expected? Thanks! On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: > > The goal of these patches are to add support to a variety of virtio and > vhost devices for

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

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

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

2024-03-01 Thread Eugenio Perez Martin
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 the backend is capable of offering and >

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

2024-03-01 Thread Eugenio Perez Martin
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 that's passed to the virtio-pci device when

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

2024-03-01 Thread Eugenio Perez Martin
On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: > > Prevent ioeventfd from being enabled/disabled when a virtio-pci > device has negotiated the VIRTIO_F_NOTIFICATION_DATA transport > feature. > > Due to ioeventfd not being able to carry the extra data associated with > this feature, the

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

2024-03-01 Thread Eugenio Perez Martin
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 that's passed to the virtio-pci device when

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

2024-02-08 Thread Eugenio Perez Martin
On Wed, Feb 7, 2024 at 11:18 AM Kevin Wolf wrote: > > Am 06.02.2024 um 17:44 hat Eugenio Perez Martin geschrieben: > > On Mon, Feb 5, 2024 at 2:49 PM Kevin Wolf wrote: > > > > > > Am 05.02.2024 um 13:22 hat Eugenio Perez Martin geschrieben: > > > >

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

2024-02-06 Thread Eugenio Perez Martin
On Mon, Feb 5, 2024 at 2:49 PM Kevin Wolf wrote: > > Am 05.02.2024 um 13:22 hat Eugenio Perez Martin geschrieben: > > On Fri, Feb 2, 2024 at 2:25 PM Kevin Wolf wrote: > > > > > > VDUSE requires that virtqueues are first enabled before the DRIVER_OK > > > s

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

2024-02-05 Thread Eugenio Perez Martin
On Fri, Feb 2, 2024 at 2:25 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 notified

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

2022-11-22 Thread Eugenio Perez Martin
On Tue, Nov 22, 2022 at 4:13 AM Jason Wang wrote: > > On Mon, Nov 21, 2022 at 6:11 PM Stefano Garzarella > wrote: > > > > Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support") > > enabled VIRTIO_F_RING_RESET by default for all virtio devices. > > > > This feature is not

Re: [RFC PATCH v3 19/28] hw/virtio: Replace g_memdup() by g_memdup2()

2022-04-01 Thread Eugenio Perez Martin
On Fri, Sep 3, 2021 at 8:11 PM Philippe Mathieu-Daudé wrote: > > Per > https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538 > > The old API took the size of the memory to duplicate as a guint, > whereas most memory functions take memory sizes as a gsize. This >

Re: [PATCH v7 0/8] Packed virtqueue for virtio

2019-10-28 Thread Eugenio Perez Martin
Hi Michael. Totally agree with you. I investigated that for a short time but in the end I tested manually with the coverage instrumentation, trying to exercise the same "code" as current tests touches in split virtqueues. I will automate at least these paths. Thanks! On Fri, Oct 25, 2019 at

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

2019-10-25 Thread Eugenio Perez Martin
Hi Jason! I can post a new version. You will have it in a moment. Thanks! On Fri, Oct 25, 2019 at 5:20 AM Jason Wang wrote: > > > On 2019/10/25 上午1:13, Eugenio Pérez wrote: > > Hi: > > > > This is an updated version of packed virtqueue support based on Wei and > > Jason's > > V5, mainly