Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2025-02-05 Thread Eugenio Perez Martin
On Thu, Feb 6, 2025 at 6:26 AM Sahil Siddiq wrote: > > Hi, > > On 2/4/25 11:40 PM, Eugenio Perez Martin wrote: > > On Tue, Feb 4, 2025 at 1:49 PM Sahil Siddiq wrote: > >> On 1/31/25 12:27 PM, Eugenio Perez Martin wrote: > >>> On Fri, Jan 31, 2025 at 6:04 A

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2025-02-04 Thread Eugenio Perez Martin
On Tue, Feb 4, 2025 at 7:10 PM Eugenio Perez Martin wrote: > > On Tue, Feb 4, 2025 at 1:49 PM Sahil Siddiq wrote: > > > > Hi, > > > > On 1/31/25 12:27 PM, Eugenio Perez Martin wrote: > > > On Fri, Jan 31, 2025 at 6:04 AM Sahil Siddiq > > > wrote:

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2025-02-04 Thread Eugenio Perez Martin
On Tue, Feb 4, 2025 at 1:49 PM Sahil Siddiq wrote: > > Hi, > > On 1/31/25 12:27 PM, Eugenio Perez Martin wrote: > > On Fri, Jan 31, 2025 at 6:04 AM Sahil Siddiq wrote: > >> On 1/24/25 1:04 PM, Eugenio Perez Martin wrote: > >>> On Fri, Jan 24, 2025 at 6:47 A

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2025-01-30 Thread Eugenio Perez Martin
On Fri, Jan 31, 2025 at 6:04 AM Sahil Siddiq wrote: > > Hi, > > On 1/24/25 1:04 PM, Eugenio Perez Martin wrote: > > On Fri, Jan 24, 2025 at 6:47 AM Sahil Siddiq wrote: > >> On 1/21/25 10:07 PM, Eugenio Perez Martin wrote: > >>> On Sun, Jan 19, 202

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2025-01-23 Thread Eugenio Perez Martin
On Fri, Jan 24, 2025 at 6:47 AM Sahil Siddiq wrote: > > Hi, > > On 1/21/25 10:07 PM, Eugenio Perez Martin wrote: > > On Sun, Jan 19, 2025 at 7:37 AM Sahil Siddiq wrote: > >> > >> Hi, > >> > >> On 1/7/25 1:35 PM, Eugenio Perez Martin wrote: &g

Re: [RFC v3 1/5] vhost-vdpa: Decouple the IOVA allocator

2025-01-21 Thread Eugenio Perez Martin
On Tue, Jan 21, 2025 at 3:53 PM Jonah Palmer wrote: > > > > On 1/16/25 11:44 AM, Eugenio Perez Martin wrote: > > On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer > > wrote: > >> > >> Decouples the IOVA allocator from the full IOVA->HVA tree to support a

Re: [RFC v3 3/5] vhost-vdpa: Implement the GPA->IOVA tree

2025-01-21 Thread Eugenio Perez Martin
On Tue, Jan 21, 2025 at 4:25 PM Jonah Palmer wrote: > > > > On 1/16/25 2:00 PM, Eugenio Perez Martin wrote: > > On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer > > wrote: > >> > >> Implements the GPA->IOVA tree for handling mapping and unmapping for &g

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2025-01-21 Thread Eugenio Perez Martin
On Sun, Jan 19, 2025 at 7:37 AM Sahil Siddiq wrote: > > Hi, > > On 1/7/25 1:35 PM, Eugenio Perez Martin wrote: > > On Fri, Jan 3, 2025 at 2:06 PM Sahil Siddiq wrote: > >> > >> Hi, > >> > >> On 12/20/24 12:28 PM, Eugenio Perez Martin wro

Re: [RFC v3 5/5] svq: Support translations via GPAs in vhost_svq_translate_addr

2025-01-16 Thread Eugenio Perez Martin
On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote: > > Propagates the GPAs (in_xlat_addr/out_xlat_addr) of a VirtQueueElement > to vhost_svq_translate_addr() to translate to IOVAs via GPA->IOVA tree > when descriptors are backed by guest memory. > > For descriptors backed by guest memory, the tra

Re: [RFC v3 4/5] virtio: add in_xlat_addr & out_xlat_addr VirtQueueElement members

2025-01-16 Thread Eugenio Perez Martin
On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote: > > Adds the in_xlat_addr & out_xlat_addr hwaddr arrays to the > VirtQueueElement struct and introduces an optional GPA output parameter > to dma_memory_map(). > > These arrays will store a VirtQueueElement's input/output descriptors' > GPA of th

Re: [RFC v3 3/5] vhost-vdpa: Implement the GPA->IOVA tree

2025-01-16 Thread Eugenio Perez Martin
On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote: > > Implements the GPA->IOVA tree for handling mapping and unmapping for > guest memory. This, alongside the SVQ IOVA->HVA tree & IOVA-only tree > implemented in the previous patches, allows us to handle guest and > host-only memory mapping opera

Re: [RFC v3 2/5] vhost-iova-tree: Remove range check for IOVA allocator

2025-01-16 Thread Eugenio Perez Martin
On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote: > > Removes the range check portion in vhost_iova_tree_map_alloc. > > The previous patch decoupled the IOVA allocator from adding mappings to > the IOVA->HVA tree (now a partial SVQ IOVA->HVA tree) and instead adds > the allocated IOVA range to a

Re: [RFC v3 1/5] vhost-vdpa: Decouple the IOVA allocator

2025-01-16 Thread Eugenio Perez Martin
On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote: > > Decouples the IOVA allocator from the full IOVA->HVA tree to support a > SVQ IOVA->HVA tree for host-only memory mappings. > > The IOVA allocator still allocates an IOVA range but instead adds this > range to an IOVA-only tree (iova_map) that

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2025-01-07 Thread Eugenio Perez Martin
On Fri, Jan 3, 2025 at 2:06 PM Sahil Siddiq wrote: > > Hi, > > On 12/20/24 12:28 PM, Eugenio Perez Martin wrote: > > On Thu, Dec 19, 2024 at 8:37 PM Sahil Siddiq wrote: > >> > >> Hi, > >> > >> On 12/17/24 1:20 PM, Eugenio Perez Martin wro

Re: [PATCH v2 0/2] Move net backend cleanup to NIC cleanup

2024-12-23 Thread Eugenio Perez Martin
On Fri, Dec 20, 2024 at 10:02 PM Michael Tokarev wrote: > > 12.09.2024 19:54, Eugenio Pérez wrote: > > Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net > > structures if peer nic is present") effectively delayed the backend > > cleanup, allowing the frontend or the guest to access

[PATCH v4] hw/smbios: support for type 7 (cache information)

2024-12-22 Thread Hal Martin
the guest. This is useful for example if you have software that queries SMBIOS for the CPU cache levels/size. Signed-off-by: Hal Martin --- hw/smbios/smbios.c | 116 +++ include/hw/firmware/smbios.h | 29 + qemu-options.hx | 2

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2024-12-19 Thread Eugenio Perez Martin
On Thu, Dec 19, 2024 at 8:37 PM Sahil Siddiq wrote: > > Hi, > > On 12/17/24 1:20 PM, Eugenio Perez Martin wrote: > > On Tue, Dec 17, 2024 at 6:45 AM Sahil Siddiq wrote: > >> On 12/16/24 2:09 PM, Eugenio Perez Martin wrote: > >>> On Sun, Dec 15, 202

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2024-12-16 Thread Eugenio Perez Martin
On Tue, Dec 17, 2024 at 6:45 AM Sahil Siddiq wrote: > > Hi, > > Thank you for your reply. > > On 12/16/24 2:09 PM, Eugenio Perez Martin wrote: > > On Sun, Dec 15, 2024 at 6:27 PM Sahil Siddiq wrote: > >> On 12/10/24 2:57 PM, Eugenio Perez Martin wrote: > >

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2024-12-16 Thread Eugenio Perez Martin
On Sun, Dec 15, 2024 at 6:27 PM Sahil Siddiq wrote: > > Hi, > > On 12/10/24 2:57 PM, Eugenio Perez Martin wrote: > > On Thu, Dec 5, 2024 at 9:34 PM Sahil Siddiq wrote: > >> > >> Hi, > >> > >> There are two issues that I found while trying to

Re: [PATCH v2] hw/virtio: Fix check available index on virtio loading

2024-12-11 Thread Eugenio Perez Martin
On Thu, Dec 12, 2024 at 3:30 AM Wafer wrote: > > > > > -Original Message- > > From: Eugenio Perez Martin > > Sent: 2024年12月11日 20:45 > > To: Wafer > > Cc: m...@redhat.com; jasow...@redhat.com; qemu-devel@nongnu.org; > > Angus Chen >

Re: [PATCH v2] hw/virtio: Fix check available index on virtio loading

2024-12-11 Thread Eugenio Perez Martin
On Wed, Dec 11, 2024 at 1:34 PM Wafer wrote: > > From: Wafer Xie > > The virtio-1.2 specification writes: > > 2.7.6 The Virtqueue Available Ring: > "idx field indicates where the driver would put the next descriptor entry > in the ring (modulo the queue size). This starts at 0, and increases" > >

Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2024-12-10 Thread Eugenio Perez Martin
On Thu, Dec 5, 2024 at 9:34 PM Sahil Siddiq wrote: > > Hi, > > There are two issues that I found while trying to test > my changes. I thought I would send the patch series > as well in case that helps in troubleshooting. I haven't > been able to find an issue in the implementation yet. > Maybe I a

Re: [RFC v4 3/5] vhost: Data structure changes to support packed vqs

2024-12-10 Thread Eugenio Perez Martin
On Thu, Dec 5, 2024 at 9:35 PM Sahil Siddiq wrote: > > Introduce "struct vring_packed". > > Modify VhostShadowVirtqueue so it can support split > and packed virtqueue formats. > This patch should be before the previous one or it does not compile, isn't it? > Signed-off-by: Sahil Siddiq > --- >

Re: [RFC v4 2/5] vhost: Write descriptors to packed svq

2024-12-10 Thread Eugenio Perez Martin
On Thu, Dec 5, 2024 at 9:35 PM Sahil Siddiq wrote: > > This commit is the first in a series to add support for packed > virtqueues in vhost_shadow_virtqueue. > > This patch implements the insertion of available buffers in the > descriptor area. It takes into account descriptor chains, but does > n

Re: [RFC v4 1/5] vhost: Refactor vhost_svq_add_split

2024-12-10 Thread Eugenio Perez Martin
On Thu, Dec 5, 2024 at 9:35 PM Sahil Siddiq wrote: > > This commit refactors vhost_svq_add_split and > vhost_svq_add to simplify their implementation > and prepare for the addition of packed vqs in > following commits. > Acked-by: Eugenio Pérez > Signed-off-by: Sahil Siddiq > --- > Changes v3

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-11-13 Thread Eugenio Perez Martin
ux > kernel also throws the same error. I think the issue might be because > hw/virtio/vhost-vdpa.c:vhost_vdpa_svq_map_rings [2] does not handle > mapping packed virtqueues at the moment. > > Probably because of this, vq->packed.desc_state[id].data [1] is NULL in the > kernel. >

Re: [PATCH] vdpa: Support setting vring_base for packed svq

2024-11-06 Thread Eugenio Perez Martin
On Wed, Nov 6, 2024 at 3:33 PM Stefano Garzarella wrote: > > On Tue, Nov 05, 2024 at 08:24:17PM +0530, Sahil Siddiq wrote: > >Hi, > > > >Thank you for the review. > > > >On 11/5/24 3:06 PM, Stefano Garzarella wrote: > >>On Mon, Nov 04, 2024 at 09:51:24PM +0530, Sahil Siddiq wrote: > >>>Linux commi

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-10-28 Thread Eugenio Perez Martin
On Mon, Oct 28, 2024 at 6:38 AM Sahil Siddiq wrote: > > Hi, > > It's been a while since I gave my last update. I have one more update > that I would like to give. > > > On Tue, Sep 24, 2024 at 7:31 AM Sahil wrote: > > > And I booted L2 by running: > > > > > > # ./qemu/build/qemu-system-x86_64 \ >

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-10 Thread Eugenio Perez Martin
On Thu, Oct 10, 2024 at 9:00 AM Si-Wei Liu wrote: > > > > On 10/9/2024 2:29 AM, Eugenio Perez Martin wrote: > > On Tue, Oct 8, 2024 at 10:30 PM Si-Wei Liu wrote: > >> > >> > >> On 10/8/2024 8:40 AM, Jonah Palmer wrote: > >>> > >&

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-09 Thread Eugenio Perez Martin
On Tue, Oct 8, 2024 at 10:30 PM Si-Wei Liu wrote: > > > > On 10/8/2024 8:40 AM, Jonah Palmer wrote: > > > > > > On 10/8/24 2:51 AM, Eugenio Perez Martin wrote: > >> On Tue, Oct 8, 2024 at 2:14 AM Si-Wei Liu wrote: > >>> > >>&g

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-07 Thread Eugenio Perez Martin
On Tue, Oct 8, 2024 at 2:14 AM Si-Wei Liu wrote: > > > > On 10/7/2024 6:51 AM, Eugenio Perez Martin wrote: > > On Fri, Oct 4, 2024 at 8:48 PM Jonah Palmer wrote: > >> > >> > >> On 10/4/24 11:17 AM, Eugenio Perez Martin wrote: > >>>

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-07 Thread Eugenio Perez Martin
On Mon, Oct 7, 2024 at 5:38 PM Jonah Palmer wrote: > > > > On 10/7/24 9:51 AM, Eugenio Perez Martin wrote: > > On Fri, Oct 4, 2024 at 8:48 PM Jonah Palmer wrote: > >> > >> > >> > >> On 10/4/24 11:17 AM, Eugenio Perez Martin wrote: > >

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-07 Thread Eugenio Perez Martin
On Fri, Oct 4, 2024 at 8:48 PM Jonah Palmer wrote: > > > > On 10/4/24 11:17 AM, Eugenio Perez Martin wrote: > > On Fri, Oct 4, 2024 at 2:45 PM Jonah Palmer wrote: > >> > >> Implements the IOVA->GPA tree for handling mapping, unmapping, and >

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-04 Thread Eugenio Perez Martin
On Fri, Oct 4, 2024 at 2:45 PM Jonah Palmer wrote: > > Implements the IOVA->GPA tree for handling mapping, unmapping, and > translations for guest memory regions. > > When the guest has overlapping memory regions, an HVA to IOVA translation > may return an incorrect IOVA when searching the IOVA->H

Re: [PATCH v3 19/22] RFC: hw/virtio: a potential leak fix

2024-09-30 Thread Eugenio Perez Martin
On Mon, Sep 30, 2024 at 1:02 PM Eugenio Perez Martin wrote: > > On Mon, Sep 30, 2024 at 10:17 AM wrote: > > > > From: Marc-André Lureau > > > > vhost_svq_get_buf() may return a VirtQueueElement that should be freed. > > > > It's unclear to me if th

Re: [PATCH v3 19/22] RFC: hw/virtio: a potential leak fix

2024-09-30 Thread Eugenio Perez Martin
On Mon, Sep 30, 2024 at 10:17 AM wrote: > > From: Marc-André Lureau > > vhost_svq_get_buf() may return a VirtQueueElement that should be freed. > > It's unclear to me if the vhost_svq_get_buf() call should always return NULL. > Continuing conversation of v2, Yes there are situations where vhost

Re: [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive

2024-09-30 Thread Eugenio Perez Martin
On Mon, Sep 30, 2024 at 10:11 AM Stefano Garzarella wrote: > > On Fri, Sep 27, 2024 at 3:08 PM Eugenio Perez Martin > wrote: > > > > On Wed, Sep 25, 2024 at 10:08 AM Stefano Garzarella > > wrote: > > > > > > On Tue, Sep 24, 2024 at 05:05:49PM GMT, m

Re: [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive

2024-09-27 Thread Eugenio Perez Martin
On Wed, Sep 25, 2024 at 10:08 AM Stefano Garzarella wrote: > > On Tue, Sep 24, 2024 at 05:05:49PM GMT, marcandre.lur...@redhat.com wrote: > >From: Marc-André Lureau > > For the title: I don't think it is a false positive, but a real fix, > indeed maybe not a complete one. > > > > >../hw/virtio/vh

Re: [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive

2024-09-27 Thread Eugenio Perez Martin
On Tue, Sep 24, 2024 at 3:07 PM wrote: > > From: Marc-André Lureau > > ../hw/virtio/vhost-shadow-virtqueue.c:545:13: error: ‘r’ may be used > uninitialized [-Werror=maybe-uninitialized] > > Signed-off-by: Marc-André Lureau > --- > hw/virtio/vhost-shadow-virtqueue.c | 2 +- > 1 file changed, 1

[PATCH v3] hw/smbios: support for type 7 (cache information)

2024-09-25 Thread Hal Martin
This patch adds support for SMBIOS type 7 (Cache Information) to qemu. level: cache level (1-8) size: cache size in bytes Example usage: -smbios type=7,level=1,size=0x8000 Signed-off-by: Hal Martin --- hw/smbios/smbios.c | 65 include/hw/firmware

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-09-24 Thread Eugenio Perez Martin
On Tue, Sep 24, 2024 at 7:31 AM Sahil wrote: > > Hi, > > I have a small update. > > On Monday, September 16, 2024 10:04:28 AM GMT+5:30 Sahil wrote: > > On Thursday, September 12, 2024 3:24:27 PM GMT+5:30 Eugenio Perez Martin > > wrote: > > [...] > >

[PATCH v2] hw/smbios: support for type 7 (cache information)

2024-09-21 Thread Hal Martin
This patch adds support for SMBIOS type 7 (Cache Information) to qemu. level: cache level (1-8) size: cache size in bytes Example usage: -smbios type=7,level=1,size=0x8000 Signed-off-by: Hal Martin --- hw/smbios/smbios.c | 64 include/hw/firmware

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-09-12 Thread Eugenio Perez Martin
On Wed, Sep 11, 2024 at 9:36 PM Sahil wrote: > > Hi, > > On Monday, September 9, 2024 6:04:45 PM GMT+5:30 Eugenio Perez Martin wrote: > > On Sun, Sep 8, 2024 at 9:47 PM Sahil wrote: > > > On Friday, August 30, 2024 4:18:31 PM GMT+5:30 Eugenio Perez Martin wrote: >

Re: [PATCH 0/2] Move net backend cleanup to NIC cleanup

2024-09-11 Thread Eugenio Perez Martin
On Wed, Sep 11, 2024 at 11:04 AM Eugenio Perez Martin wrote: > > On Tue, Sep 10, 2024 at 5:46 AM Jason Wang wrote: > > > > On Tue, Sep 10, 2024 at 11:41 AM Si-Wei Liu wrote: > > > > > > Hi Jason, > > > > > > It seems this series wasn't

Re: [RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-09-11 Thread Eugenio Perez Martin
On Wed, Sep 11, 2024 at 11:06 AM Si-Wei Liu wrote: > > > > On 9/9/2024 11:22 PM, Eugenio Perez Martin wrote: > > On Tue, Sep 10, 2024 at 7:30 AM Si-Wei Liu wrote: > >> Sorry for the delayed response, it seems I missed the email reply for > >> some reason durin

Re: [PATCH 0/2] Move net backend cleanup to NIC cleanup

2024-09-11 Thread Eugenio Perez Martin
On Tue, Sep 10, 2024 at 5:46 AM Jason Wang wrote: > > On Tue, Sep 10, 2024 at 11:41 AM Si-Wei Liu wrote: > > > > Hi Jason, > > > > It seems this series wasn't applied successfully, I still cannot see it > > from the latest tree. Any idea? > > It breaks make check. > > Eugenio, would you want to f

Re: [RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-09-09 Thread Eugenio Perez Martin
On Tue, Sep 10, 2024 at 7:30 AM Si-Wei Liu wrote: > > Sorry for the delayed response, it seems I missed the email reply for > some reason during the long weekend. > > On 9/2/2024 4:09 AM, Eugenio Perez Martin wrote: > > On Fri, Aug 30, 2024 at 11:05 PM Si-Wei Liu wrote: &

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-09-09 Thread Eugenio Perez Martin
On Sun, Sep 8, 2024 at 9:47 PM Sahil wrote: > > Hi, > > On Friday, August 30, 2024 4:18:31 PM GMT+5:30 Eugenio Perez Martin wrote: > > On Fri, Aug 30, 2024 at 12:20 PM Sahil wrote: > > > Hi, > > > > > > On Tuesday, August 27, 2024 9:00:36 PM GMT+5:30

Re: [RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-09-02 Thread Eugenio Perez Martin
On Fri, Aug 30, 2024 at 11:05 PM Si-Wei Liu wrote: > > > > On 8/30/2024 1:05 AM, Eugenio Perez Martin wrote: > > On Fri, Aug 30, 2024 at 6:20 AM Si-Wei Liu wrote: > >> > >> > >> On 8/29/2024 9:53 AM, Eugenio Perez Martin wrote: > >>> O

Re: [RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-08-30 Thread Eugenio Perez Martin
On Fri, Aug 30, 2024 at 3:52 PM Jonah Palmer wrote: > > > > On 8/30/24 4:05 AM, Eugenio Perez Martin wrote: > > On Fri, Aug 30, 2024 at 6:20 AM Si-Wei Liu wrote: > >> > >> > >> > >> On 8/29/2024 9:53 AM, Eugenio Perez Martin wrote: > >&

Re: [RFC 2/2] vhost-vdpa: Implement GPA->IOVA & IOVA->SVQ HVA trees

2024-08-30 Thread Eugenio Perez Martin
On Fri, Aug 30, 2024 at 3:58 PM Jonah Palmer wrote: > > > > On 8/29/24 12:55 PM, Eugenio Perez Martin wrote: > > On Wed, Aug 21, 2024 at 2:56 PM Jonah Palmer > > wrote: > >> > >> Implements a GPA->IOVA and IOVA->SVQ HVA tree for handling mapping

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-08-30 Thread Eugenio Perez Martin
On Fri, Aug 30, 2024 at 12:20 PM Sahil wrote: > > Hi, > > On Tuesday, August 27, 2024 9:00:36 PM GMT+5:30 Eugenio Perez Martin wrote: > > On Wed, Aug 21, 2024 at 2:20 PM Sahil wrote: > > > [...] > > > I have been trying to test my changes so far as well. I am

Re: [RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-08-30 Thread Eugenio Perez Martin
On Fri, Aug 30, 2024 at 6:20 AM Si-Wei Liu wrote: > > > > On 8/29/2024 9:53 AM, Eugenio Perez Martin wrote: > > On Wed, Aug 21, 2024 at 2:56 PM Jonah Palmer > > wrote: > >> Decouples the IOVA allocator from the IOVA->HVA tree and instead adds > >>

Re: [RFC 2/2] vhost-vdpa: Implement GPA->IOVA & IOVA->SVQ HVA trees

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 2:56 PM Jonah Palmer wrote: > > Implements a GPA->IOVA and IOVA->SVQ HVA tree for handling mapping, > unmapping, and translations for guest and host-only memory, > respectively. > > By splitting up a full IOVA->HVA tree (containing both guest and > host-only memory mappings

Re: [RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 2:56 PM Jonah Palmer wrote: > > Decouples the IOVA allocator from the IOVA->HVA tree and instead adds > the allocated IOVA range to an IOVA-only tree (iova_map). This IOVA tree > will hold all IOVA ranges that have been allocated (e.g. in the > IOVA->HVA tree) and are remov

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-08-27 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 2:20 PM Sahil wrote: > > Hi, > > Sorry for the late reply. > > On Tuesday, August 13, 2024 12:23:55 PM GMT+5:30 Eugenio Perez Martin wrote: > > [...] > > > I think I have understood what's going on in "vhost_vdpa_svq_map_

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-08-12 Thread Eugenio Perez Martin
On Mon, Aug 12, 2024 at 9:32 PM Sahil wrote: > > Hi, > > On Monday, August 12, 2024 12:01:00 PM GMT+5:30 you wrote: > > On Sun, Aug 11, 2024 at 7:20 PM Sahil wrote: > > > On Wednesday, August 7, 2024 9:52:10 PM GMT+5:30 Eugenio Perez Martin > > > wrote: &g

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-08-11 Thread Eugenio Perez Martin
On Sun, Aug 11, 2024 at 7:20 PM Sahil wrote: > > Hi, > > On Wednesday, August 7, 2024 9:52:10 PM GMT+5:30 Eugenio Perez Martin wrote: > > On Fri, Aug 2, 2024 at 1:22 PM Sahil Siddiq wrote: > > > [...] > > > @@ -726,17 +738,30 @@ void vhost_svq_start(VhostShado

[PATCH] hw/smbios: support for type 7 (cache information)

2024-08-11 Thread Hal Martin
This patch adds support for SMBIOS type 7 (Cache Information) to qemu. level: cache level (1-8) size: cache size in bytes Example usage: -smbios type=7,level=1,size=0x8000 Signed-off-by: Hal Martin --- hw/smbios/smbios.c | 63 include/hw/firmware

Re: [RFC v3 0/3] Add packed virtqueue to shadow virtqueue

2024-08-07 Thread Eugenio Perez Martin
On Fri, Aug 2, 2024 at 1:22 PM Sahil Siddiq wrote: > > Hi, > > Here's a new patch series that incorporates all > the suggested changes from v2. > > I have tried my best to deduplicate the implementation. > Please let me know if I have missed something. > I think they are in good shape :). > I'll

Re: [RFC v3 1/3] vhost: Introduce packed vq and add buffer elements

2024-08-07 Thread Eugenio Perez Martin
On Fri, Aug 2, 2024 at 1:22 PM Sahil Siddiq wrote: > > This is the first patch in a series to add support for packed > virtqueues in vhost_shadow_virtqueue. This patch implements the > insertion of available buffers in the descriptor area. It takes > into account descriptor chains, but does not co

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-08-07 Thread Eugenio Perez Martin
On Fri, Aug 2, 2024 at 1:22 PM Sahil Siddiq wrote: > > Allocate memory for the packed vq format and support > packed vq in the SVQ "start" and "stop" operations. > > Signed-off-by: Sahil Siddiq > --- > Changes v2 -> v3: > * vhost-shadow-virtqueue.c > (vhost_svq_memory_packed): New function >

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-08-01 Thread Eugenio Perez Martin
On Thu, Aug 1, 2024 at 2:41 AM Si-Wei Liu wrote: > > Hi Jonah, > > On 7/31/2024 7:09 AM, Jonah Palmer wrote: > > > >> Let me clarify, correct me if I was wrong: > >> > >> 1) IOVA allocator is still implemented via a tree, we just > >> don't need > >> to stor

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-31 Thread Eugenio Perez Martin
On Tue, Jul 30, 2024 at 2:32 PM Jonah Palmer wrote: > > > > On 7/30/24 7:00 AM, Eugenio Perez Martin wrote: > > On Tue, Jul 30, 2024 at 10:48 AM Jason Wang wrote: > >> > >> On Mon, Jul 29, 2024 at 6:05 PM Eugenio Perez Martin > >> wrote: > >&g

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-30 Thread Eugenio Perez Martin
On Tue, Jul 30, 2024 at 10:48 AM Jason Wang wrote: > > On Mon, Jul 29, 2024 at 6:05 PM Eugenio Perez Martin > wrote: > > > > On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer > > wrote: > > > > > > > > > > > > On 5/13/24 11:56 PM, Ja

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-29 Thread Eugenio Perez Martin
On Mon, Jul 29, 2024 at 7:50 PM Jonah Palmer wrote: > > > > On 7/29/24 6:04 AM, Eugenio Perez Martin wrote: > > On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer > > wrote: > >> > >> > >> > >> On 5/13/24 11:56 PM, Jason Wang wrote

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-29 Thread Eugenio Perez Martin
On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: > > > > On 5/13/24 11:56 PM, Jason Wang wrote: > > On Mon, May 13, 2024 at 5:58 PM Eugenio Perez Martin > > wrote: > >> > >> On Mon, May 13, 2024 at 10:28 AM Jason Wang wrote: > >>> >

Re: [RFC v2 1/3] vhost: Introduce packed vq and add buffer elements

2024-07-29 Thread Eugenio Perez Martin
On Sun, Jul 28, 2024 at 7:37 PM Sahil wrote: > > Hi, > > On Friday, July 26, 2024 7:18:28 PM GMT+5:30 Eugenio Perez Martin wrote: > > On Fri, Jul 26, 2024 at 11:58 AM Sahil Siddiq wrote: > > > This is the first patch in a series to add support for

Re: [RFC v2 0/3] Add packed virtqueue to shadow virtqueue

2024-07-26 Thread Eugenio Perez Martin
On Fri, Jul 26, 2024 at 7:11 PM Sahil wrote: > > Hi, > > On Friday, July 26, 2024 7:10:24 PM GMT+5:30 Eugenio Perez Martin wrote: > > On Fri, Jul 26, 2024 at 11:58 AM Sahil Siddiq wrote: > > > [...] > > > Q1. > > > In virtio_ring.h [2], new aliases wi

Re: [RFC v2 3/3] vhost: Allocate memory for packed vring.

2024-07-26 Thread Eugenio Perez Martin
On Fri, Jul 26, 2024 at 11:59 AM Sahil Siddiq wrote: > > Allocate memory for the packed vq format and support > packed vq in the SVQ "start" operation. > > Signed-off-by: Sahil Siddiq > --- > Changes v1 -> v2: > * vhost-shadow-virtqueue.h > (struct VhostShadowVirtqueue): New member "is_packed"

Re: [RFC v2 1/3] vhost: Introduce packed vq and add buffer elements

2024-07-26 Thread Eugenio Perez Martin
On Fri, Jul 26, 2024 at 11:58 AM Sahil Siddiq wrote: > > This is the first patch in a series to add support for packed > virtqueues in vhost_shadow_virtqueue. This patch implements the > insertion of available buffers in the descriptor area. It takes > into account descriptor chains, but does not

Re: [RFC v2 0/3] Add packed virtqueue to shadow virtqueue

2024-07-26 Thread Eugenio Perez Martin
On Fri, Jul 26, 2024 at 11:58 AM Sahil Siddiq wrote: > > Hi, > > I have made some progress in this project and thought I would > send these changes first before continuing. I split patch v1 [1] > into two commits (#1 and #2) to make it easy to review. There are > very few changes in the first comm

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

2024-07-22 Thread Eugenio Perez Martin
On Mon, Jul 22, 2024 at 1:11 PM Eugenio Perez Martin wrote: > > On Sat, Jul 20, 2024 at 9:16 PM Michael S. Tsirkin wrote: > > > > On Wed, Jul 10, 2024 at 08:55:19AM -0400, Jonah Palmer wrote: > > > Extend the virtio device property definitions to include the >

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

2024-07-22 Thread Eugenio Perez Martin
On Sat, Jul 20, 2024 at 9:16 PM Michael S. Tsirkin wrote: > > On Wed, Jul 10, 2024 at 08:55:19AM -0400, 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 > > e

Re: [PATCH] hw/virtio/vdpa-dev: Check returned value instead of dereferencing @errp

2024-07-16 Thread Eugenio Perez Martin
On Tue, Jul 16, 2024 at 5:05 AM Zhao Liu wrote: > > On Mon, Jul 15, 2024 at 11:01:08PM +0200, Eugenio Perez Martin wrote: > > Date: Mon, 15 Jul 2024 23:01:08 +0200 > > From: Eugenio Perez Martin > > Subject: Re: [PATCH] hw/virtio/vdpa-dev: Check returned value instead of

Re: [PATCH] hw/virtio/vdpa-dev: Check returned value instead of dereferencing @errp

2024-07-15 Thread Eugenio Perez Martin
On Mon, Jul 15, 2024 at 11:45 AM Zhao Liu wrote: > > As the comment in qapi/error, dereferencing @errp requires > ERRP_GUARD(): > > * = Why, when and how to use ERRP_GUARD() = > * > * Without ERRP_GUARD(), use of the @errp parameter is restricted: > * - It must not be dereferenced, because it may

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

2024-07-10 Thread Eugenio Perez Martin
On Wed, Jul 10, 2024 at 2:56 PM Jonah Palmer wrote: > > Add VIRTIO_F_IN_ORDER feature support for the virtqueue_flush operation. > > The goal of the virtqueue_ordered_flush operation when the > VIRTIO_F_IN_ORDER feature has been negotiated is to write elements to > the used/descriptor ring in-orde

Re: [PATCH] virtio: remove virtio_tswap16s() call in vring_packed_event_read()

2024-07-01 Thread Eugenio Perez Martin
On Mon, Jul 1, 2024 at 9:52 AM Stefano Garzarella wrote: > > Commit d152cdd6f6 ("virtio: use virtio accessor to access packed event") > switched using of address_space_read_cached() to virito_lduw_phys_cached() > to access packed descriptor event. > > When we used address_space_read_cached(), we n

Re: [RFC] vhost: Introduce packed vq and add buffer elements

2024-06-24 Thread Eugenio Perez Martin
On Sat, Jun 22, 2024 at 6:34 AM Sahil wrote: > > Hi, > > On Wednesday, June 19, 2024 3:49:29 PM GMT+5:30 Eugenio Perez Martin wrote: > > [...] > > Hi Sahil, > > > > Just some nitpicks here and there, > > > > > [1] https://wiki.qemu

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

2024-06-20 Thread Eugenio Perez Martin
On Thu, Jun 20, 2024 at 7:56 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 a

Re: [RFC] vhost: Introduce packed vq and add buffer elements

2024-06-19 Thread Eugenio Perez Martin
On Tue, Jun 18, 2024 at 8:19 PM Sahil Siddiq wrote: > > This is the first patch in a series to add support for packed > virtqueues in vhost_shadow_virtqueue. This patch implements the > insertion of available buffers in the descriptor area. It takes > into account descriptor chains, but does not c

Re: [RFC] vhost: Introduce packed vq and add buffer elements

2024-06-19 Thread Eugenio Perez Martin
On Tue, Jun 18, 2024 at 8:58 PM Sahil wrote: > > Hi, > > On Tuesday, June 18, 2024 11:48:34 PM GMT+5:30 Sahil Siddiq wrote: > > [...] > > > > hw/virtio/vhost-shadow-virtqueue.c | 124 - > > hw/virtio/vhost-shadow-virtqueue.h | 66 ++- > > 2 files changed,

[PATCH] hmp-commands-info.hx: Add missing info command for stats subcommand

2024-06-15 Thread Martin Joerg
Signed-off-by: Martin Joerg --- hmp-commands-info.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 20a9835ea8..f5639af517 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -892,7 +892,7 @@ ERST }, SRST

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 virtqueue

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

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

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 use

Re: Intention to work on GSoC project

2024-05-13 Thread Eugenio Perez Martin
On Mon, May 13, 2024 at 3:49 PM Sahil wrote: > > Hi, > > On Wednesday, May 8, 2024 8:53:12 AM GMT+5:30 Sahil wrote: > > Hi, > > > > On Tuesday, May 7, 2024 12:44:33 PM IST Eugenio Perez Martin wrote: > > > [...] > > > > > > > Shall I s

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-05-13 Thread Eugenio Perez Martin
On Mon, May 13, 2024 at 10:28 AM Jason Wang wrote: > > On Mon, May 13, 2024 at 2:28 PM Eugenio Perez Martin > wrote: > > > > On Sat, May 11, 2024 at 6:07 AM Jason Wang wrote: > > > > > > On Fri, May 10, 2024 at 3:16 PM Eugenio Perez Martin > > >

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-05-12 Thread Eugenio Perez Martin
On Sat, May 11, 2024 at 6:07 AM Jason Wang wrote: > > On Fri, May 10, 2024 at 3:16 PM Eugenio Perez Martin > wrote: > > > > On Fri, May 10, 2024 at 6:29 AM Jason Wang wrote: > > > > > > On Thu, May 9, 2024 at 3:10 PM Eugenio Perez Martin > > >

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 u

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-05-10 Thread Eugenio Perez Martin
On Fri, May 10, 2024 at 6:29 AM Jason Wang wrote: > > On Thu, May 9, 2024 at 3:10 PM Eugenio Perez Martin > wrote: > > > > On Thu, May 9, 2024 at 8:27 AM Jason Wang wrote: > > > > > > On Thu, May 9, 2024 at 1:16 AM Eugenio Perez Martin > > >

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 e

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

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 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-05-09 Thread Eugenio Perez Martin
On Thu, May 9, 2024 at 8:27 AM Jason Wang wrote: > > On Thu, May 9, 2024 at 1:16 AM Eugenio Perez Martin > wrote: > > > > On Wed, May 8, 2024 at 4:29 AM Jason Wang wrote: > > > > > > On Tue, May 7, 2024 at 6:57 PM Eugenio Perez Martin > > >

Re: [PATCH] hw/virtio: Fix obtain the buffer id from the last descriptor

2024-05-08 Thread Eugenio Perez Martin
On Thu, May 9, 2024 at 4:20 AM Wafer wrote: > > > > On Thu, May, 2024 at 2:21 AM Michael S. Tsirkin wrote: > > > > On Wed, May 08, 2024 at 02:56:11PM +0200, Eugenio Perez Martin wrote: > > > On Mon, Apr 22, 2024 at 3:41 AM Wafer wrote: > > > > > &

Re: [PATCH] hw/virtio: Fix obtain the buffer id from the last descriptor

2024-05-08 Thread Eugenio Perez Martin
On Thu, May 9, 2024 at 6:32 AM Wafer wrote: > > > > On Wed, May 08, 2024 at 12:01 PM Jason Wang wrote: > > > > On Mon, Apr 22, 2024 at 9:41 AM Wafer wrote: > > > > > > The virtio-1.3 specification > > > writes: > > > 2.8.6 Next Fl

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-05-08 Thread Eugenio Perez Martin
On Wed, May 8, 2024 at 4:29 AM Jason Wang wrote: > > On Tue, May 7, 2024 at 6:57 PM Eugenio Perez Martin > wrote: > > > > On Tue, May 7, 2024 at 9:29 AM Jason Wang wrote: > > > > > > On Fri, Apr 12, 2024 at 3:56 PM Eugenio Perez Martin > > >

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

2024-05-08 Thread Eugenio Perez Martin
On Wed, May 8, 2024 at 2:52 AM Si-Wei Liu wrote: > > > > On 5/1/2024 11:44 PM, Eugenio Perez Martin wrote: > > On Thu, May 2, 2024 at 1:16 AM Si-Wei Liu wrote: > >> > >> > >> On 4/30/2024 10:19 AM, Eugenio Perez Martin wrote: > >&

  1   2   3   4   5   6   7   8   9   10   >