Re: [RFC v5 0/7] Add packed format to shadow virtqueue

2025-06-26 Thread Eugenio Perez Martin
at might lead to the source of the issue. > > One thing worth noting is that when I use kernel version 6.8.5 for testing, > the crashes are far more frequent. In kernel version 6.15.0-rc3+, it's much > harder to reproduce. > > On 5/15/25 11:49 AM, Eugenio Perez Martin wrote

Re: [PATCH] vdpa: Allow VDPA to work on big-endian machine

2025-06-15 Thread Eugenio Perez Martin
On Sun, Jun 15, 2025 at 12:46 AM Konstantin Shkolnyy wrote: > > After commit 0caed25cd171 vhost_vdpa_net_load_vlan() started seeing > VIRTIO_NET_F_CTRL_VLAN flag and making 4096 calls to the kernel with > VIRTIO_NET_CTRL_VLAN_ADD command. However, it forgot to convert the > 16-bit VLAN IDs to LE f

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-05-15 Thread Eugenio Perez Martin
On Thu, May 15, 2025 at 2:17 AM Si-Wei Liu wrote: > > Hi Eugenio, > > On 5/14/2025 8:49 AM, Eugenio Perez Martin wrote: > > On Wed, May 7, 2025 at 8:47 PM Jonah Palmer wrote: > >> Current memory operations like pinning may take a lot of time at the > >> d

Re: [RFC v5 0/7] Add packed format to shadow virtqueue

2025-05-14 Thread Eugenio Perez Martin
On Wed, May 14, 2025 at 8:22 AM Sahil Siddiq wrote: > > Hi, > > Apologies, I haven't been in touch for a while. I have an update that > I would like to give. > > On 4/16/25 12:50 PM, Eugenio Perez Martin wrote: > > On Mon, Apr 14, 2025 at 11:20 AM Sahil Siddiq wro

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-05-14 Thread Eugenio Perez Martin
On Wed, May 7, 2025 at 8:47 PM Jonah Palmer wrote: > > Current memory operations like pinning may take a lot of time at the > destination. Currently they are done after the source of the migration is > stopped, and before the workload is resumed at the destination. This is a > period where neigh

Re: [RFC v5 0/7] Add packed format to shadow virtqueue

2025-04-16 Thread Eugenio Perez Martin
On Mon, Apr 14, 2025 at 11:20 AM Sahil Siddiq wrote: > > Hi, > > On 3/26/25 1:05 PM, Eugenio Perez Martin wrote: > > On Mon, Mar 24, 2025 at 2:59 PM Sahil Siddiq wrote: > >> I managed to fix a few issues while testing this patch series. > >> There is still o

Re: [RFC v5 3/7] vhost: Forward descriptors to device via packed SVQ

2025-04-15 Thread Eugenio Perez Martin
On Mon, Apr 14, 2025 at 11:38 AM Sahil Siddiq wrote: > > Hi, > > On 3/28/25 1:21 PM, Eugenio Perez Martin wrote: > > On Thu, Mar 27, 2025 at 7:42 PM Sahil Siddiq wrote: > >> On 3/26/25 1:33 PM, Eugenio Perez Martin wrote: > >>> On Mon, Mar 24, 202

Re: VDPA MAC address problem

2025-04-05 Thread Eugenio Perez Martin
On Thu, Mar 20, 2025 at 1:59 AM Jason Wang wrote: > > Adding Cindy and Eugenio > > On Thu, Mar 20, 2025 at 12:34 AM Konstantin Shkolnyy > wrote: > > > > I’m observing a problem while testing VDPA with Nvidia ConnectX-6 (mlx5) > > on s390. > > > > Upon start, virtio_net_device_realize() tries to

Re: [RFC v5 6/7] vhost: Validate transport device features for packed vqs

2025-03-28 Thread Eugenio Perez Martin
On Fri, Mar 28, 2025 at 6:34 AM Sahil Siddiq wrote: > > Hi, > > On 3/26/25 5:36 PM, Eugenio Perez Martin wrote: > > On Mon, Mar 24, 2025 at 3:00 PM Sahil Siddiq wrote: > >> > >> Validate transport device features required for utilizing packed SVQ > >&

Re: [RFC v5 5/7] vhost: Forward descriptors to guest via packed vqs

2025-03-28 Thread Eugenio Perez Martin
On Fri, Mar 28, 2025 at 6:22 AM Sahil Siddiq wrote: > > Hi, > > On 3/26/25 2:04 PM, Eugenio Perez Martin wrote: > > On Mon, Mar 24, 2025 at 3:34 PM Sahil Siddiq wrote: > >> > >> Hi, > >> > >> I had a few more queries here as well. > >

Re: [RFC v5 3/7] vhost: Forward descriptors to device via packed SVQ

2025-03-28 Thread Eugenio Perez Martin
On Thu, Mar 27, 2025 at 7:42 PM Sahil Siddiq wrote: > > Hi, > > On 3/26/25 1:33 PM, Eugenio Perez Martin wrote: > > On Mon, Mar 24, 2025 at 3:14 PM Sahil Siddiq wrote: > >> On 3/24/25 7:29 PM, Sahil Siddiq wrote: > >>> Implement the insertion of avai

Re: [RFC v5 3/7] vhost: Forward descriptors to device via packed SVQ

2025-03-27 Thread Eugenio Perez Martin
On Fri, Mar 28, 2025 at 6:10 AM Sahil Siddiq wrote: > > Hi, > > On 3/26/25 5:32 PM, Eugenio Perez Martin wrote: > > On Mon, Mar 24, 2025 at 3:00 PM Sahil Siddiq wrote: > >> > >> Implement the insertion of available buffers in the descriptor area of > >

Re: [RFC v5 5/7] vhost: Forward descriptors to guest via packed vqs

2025-03-26 Thread Eugenio Perez Martin
On Mon, Mar 24, 2025 at 3:34 PM Sahil Siddiq wrote: > > Hi, > > I had a few more queries here as well. > > On 3/24/25 7:29 PM, Sahil Siddiq wrote: > > Detect when used descriptors are ready for consumption by the guest via > > packed virtqueues and forward them from the device to the guest. > > >

Re: [RFC v5 7/7] vdpa: Support setting vring_base for packed SVQ

2025-03-26 Thread Eugenio Perez Martin
On Mon, Mar 24, 2025 at 3:00 PM Sahil Siddiq wrote: > > This commit is the first in a series to add support for packed > virtqueues in vhost_shadow_virtqueue. > > Linux commit 1225c216d954 ("vp_vdpa: allow set vq state to initial > state after reset") enabled the vp_vdpa driver to set the vq state

Re: [RFC v5 6/7] vhost: Validate transport device features for packed vqs

2025-03-26 Thread Eugenio Perez Martin
On Mon, Mar 24, 2025 at 3:00 PM Sahil Siddiq wrote: > > Validate transport device features required for utilizing packed SVQ > that both guests can use with the SVQ and SVQs can use with vdpa. > > Signed-off-by: Sahil Siddiq > --- > Changes from v4 -> v5: > - Split from commit #2 in v4. > > hw/v

Re: [RFC v5 4/7] vdpa: Allocate memory for SVQ and map them to vdpa

2025-03-26 Thread Eugenio Perez Martin
On Mon, Mar 24, 2025 at 3:00 PM Sahil Siddiq wrote: > > Allocate memory for the packed vq format and map them to the vdpa device. > > Since "struct vring" and "struct vring_packed's vring" both have the same > memory layout, the implementation in SVQ start and SVQ stop should not > differ based on

Re: [RFC v5 3/7] vhost: Forward descriptors to device via packed SVQ

2025-03-26 Thread Eugenio Perez Martin
On Mon, Mar 24, 2025 at 3:00 PM Sahil Siddiq wrote: > > Implement the insertion of available buffers in the descriptor area of > packed shadow virtqueues. It takes into account descriptor chains, but > does not consider indirect descriptors. > > Enable the packed SVQ to forward the descriptors to

Re: [RFC v5 2/7] vhost: Data structure changes to support packed vqs

2025-03-26 Thread Eugenio Perez Martin
On Mon, Mar 24, 2025 at 3:00 PM Sahil Siddiq wrote: > > Introduce "struct vring_packed". > > Modify VhostShadowVirtqueue so it can support split and packed virtqueue > formats. > > Signed-off-by: Sahil Siddiq > --- > Changes from v4 -> v5: > - This was commit #3 in v4. This has been reordered to

Re: [RFC v5 1/7] vhost: Refactor vhost_svq_add_split

2025-03-26 Thread Eugenio Perez Martin
On Mon, Mar 24, 2025 at 2:59 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 the > following commits. > > Signed-off-by: Sahil Siddiq > --- > No changes from v4 -> v5. > You ca

Re: [RFC v5 3/7] vhost: Forward descriptors to device via packed SVQ

2025-03-26 Thread Eugenio Perez Martin
On Mon, Mar 24, 2025 at 3:14 PM Sahil Siddiq wrote: > > Hi, > > I had a few queries here. > > On 3/24/25 7:29 PM, Sahil Siddiq wrote: > > Implement the insertion of available buffers in the descriptor area of > > packed shadow virtqueues. It takes into account descriptor chains, but > > does not c

Re: [RFC v5 0/7] Add packed format to shadow virtqueue

2025-03-26 Thread Eugenio Perez Martin
On Mon, Mar 24, 2025 at 2:59 PM Sahil Siddiq wrote: > > Hi, > > I managed to fix a few issues while testing this patch series. > There is still one issue that I am unable to resolve. I thought > I would send this patch series for review in case I have missed > something. > > The issue is that this

Re: [PATCH v2] vdpa: Allow vDPA to work on big-endian machine

2025-03-14 Thread Eugenio Perez Martin
On Fri, Feb 21, 2025 at 8:08 PM Konstantin Shkolnyy wrote: > > Add .set_vnet_le() function that always returns success, assuming that > vDPA h/w always implements LE data format. Otherwise, QEMU disables vDPA and > outputs the message: > "backend does not support LE vnet headers; falling back on u

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

2025-03-05 Thread Eugenio Perez Martin
On Thu, Mar 6, 2025 at 6:26 AM Sahil Siddiq wrote: > > Hi, > > Sorry for the delay in my response. There was a lot to absorb in the > previous mail and I thought I would spend some more time exploring > this. > > On 2/11/25 1:27 PM, Eugenio Perez Martin wrote: > > O

Re: [PATCH v2] vdpa: Fix endian bugs in shadow virtqueue

2025-02-12 Thread Eugenio Perez Martin
On Wed, Feb 12, 2025 at 5:49 PM Konstantin Shkolnyy wrote: > > VDPA didn't work on a big-endian machine due to missing/incorrect > CPU<->LE data format conversions. > Fixes: 10857ec0ad ("vhost: Add VhostShadowVirtqueue") > Signed-off-by: Konstantin Shkolnyy Acked-by: Eugenio Pérez Thanks! >

Re: [PATCH v2] vdpa: Fix endian bugs in shadow virtqueue

2025-02-12 Thread Eugenio Perez Martin
On Wed, Feb 12, 2025 at 7:11 PM Philippe Mathieu-Daudé wrote: > > On 12/2/25 17:49, Konstantin Shkolnyy wrote: > > VDPA didn't work on a big-endian machine due to missing/incorrect > > CPU<->LE data format conversions. > > > > Signed-off-by: Konstantin Shkolnyy > > --- > > Changes in v2: Change d

Re: [PATCH] vdpa: Fix endian bugs in shadow virtqueue

2025-02-12 Thread Eugenio Perez Martin
On Wed, Feb 12, 2025 at 4:37 PM Konstantin Shkolnyy wrote: > > On 2/12/2025 09:06, Eugenio Perez Martin wrote: > >> -i = cpu_to_le16(svq->desc_next[i]); > >> +i = le16_to_cpu(svq->desc_next[i]); > > > > Both svq->desc_next and "

Re: [PATCH] vdpa: Fix endian bugs in shadow virtqueue

2025-02-12 Thread Eugenio Perez Martin
On Tue, Feb 11, 2025 at 5:20 PM Konstantin Shkolnyy wrote: > > VDPA didn't work on a big-endian machine due to missing/incorrect > CPU<->LE data format conversions. > Thank you very much for this! > Signed-off-by: Konstantin Shkolnyy > --- > hw/virtio/vhost-shadow-virtqueue.c | 16 +---

Re: [PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-12 Thread Eugenio Perez Martin
On Tue, Feb 11, 2025 at 5:20 PM Konstantin Shkolnyy wrote: > > Add .set_vnet_le() function that always returns success, assuming that > vDPA h/w always implements LE data format. Otherwise, QEMU disables vDPA and > outputs the message: > "backend does not support LE vnet headers; falling back on u

Re: [PATCH 0/4] Handling aliased guest memory maps in vhost-vDPA SVQs

2025-02-11 Thread Eugenio Perez Martin
On Wed, Feb 5, 2025 at 3:58 PM Jonah Palmer wrote: > > An issue arises from aliased memory mappings in the guest, where > different GPAs map to the same HVA. For example: > > - GPA1->HVA1 > - GPA2->HVA1 > > When these mappings exist in the IOVA->HVA tree, a lookup by an HVA > backed by guest mem

Re: [PATCH 4/4] vhost-iova-tree: Update documentation

2025-02-11 Thread Eugenio Perez Martin
On Wed, Feb 5, 2025 at 3:58 PM Jonah Palmer wrote: > > Signed-off-by: Jonah Palmer Reviewed-by: Eugenio Pérez Thanks! > --- > hw/virtio/vhost-iova-tree.c | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/hw/virtio/vhost-iova-tree.c b/hw/virtio/

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

2025-02-10 Thread Eugenio Perez Martin
On Mon, Feb 10, 2025 at 5:25 PM Sahil Siddiq wrote: > > Hi, > > On 2/10/25 7:53 PM, Eugenio Perez Martin wrote: > > On Mon, Feb 10, 2025 at 11:58 AM Sahil Siddiq wrote: > >> On 2/6/25 8:47 PM, Sahil Siddiq wrote: > >>> On 2/6/25 12:42 PM, Eugenio Perez Mart

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

2025-02-10 Thread Eugenio Perez Martin
On Mon, Feb 10, 2025 at 11:58 AM Sahil Siddiq wrote: > > Hi, > > On 2/6/25 8:47 PM, Sahil Siddiq wrote: > > On 2/6/25 12:42 PM, Eugenio Perez Martin wrote: > >> On Thu, Feb 6, 2025 at 6:26 AM Sahil Siddiq wrote: > >>> On 2/4/25 11:45 PM, Eugenio Perez Ma

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

  1   2   3   4   5   6   7   8   9   10   >