Re: Intention to work on GSoC project

2024-02-29 Thread Sahil
you have more questions on the projects. Yes, I'll definitely do that. Thanks, Sahil [1] https://gitlab.com/qemu-project/qemu/-/issues/230 [2] https://patchwork.kernel.org/project/qemu-devel/patch/20220414112902.41390-1-codeguy.mot...@gmail.com/

Re: Intention to work on GSoC project

2024-03-01 Thread Sahil
. This resource will help me cover a lot of ground. > [...] > There are few other tasks pending for QEMU in general and SVQ in > particular. I'll add them as gitlab issues by today. > That would be nice. I'll keep an eye out for the new issues. Thanks, Sahil

Intention to work on GSoC project

2024-02-25 Thread Sahil
Hi, My name is Sahil and I go by the pseudonym 'valdaarhun' on Github. I have never contributed to QEMU before but I have used it a few times as an end user. I developed an interest in virtualization during my internship at VMware and would like to dive deeper in this subfield. My cu

Re: Intention to work on GSoC project

2024-03-25 Thread Sahil
Element Length" stores the length of the buffer element. In the next few lines, it also states that the "Element Length" is reserved for used descriptors and is ignored by drivers. This sounds a little contradictory given that drivers write available desciptors in the descriptor ring.

Re: Intention to work on GSoC project

2024-04-01 Thread Sahil
Hi, On Monday, April 1, 2024 11:53:11 PM IST daleyoung4...@gmail.com wrote: > Hi, > > On Monday, March 25, 2024 21:20:32 CST Sahil wrote: > > Q1. > > Section 2.7.4 of the virtio spec [3] states that in an available > > descriptor, the "Element Length" st

Re: Intention to work on GSoC project

2024-04-03 Thread Sahil
"...avail idx member in the avail ring is N" instead of "...avail idx is N". Regarding the implementation of this project, can the project be broken down into two parts: 1. implementing packed virtqueues in QEMU, and 2. providing mechanisms for (live) migration to work with packed virtqueues. I am ready to start working on the implementation. In one of your previous emails you had talked about moving packed virtqueue related implementation from the kernel's drivers/virtio/virtio_ring.c into vhost_shadow_virtqueue.c. My plan is to also understand how split virtqueue has been implemented in QEMU. I think that'll be helpful when moving the kernel's implementation to QEMU. Please let me know if I should change my approach. Thanks, Sahil

Re: Intention to work on GSoC project

2024-04-04 Thread Sahil
Hi, On Thursday, April 4, 2024 12:07:49 AM IST Eugenio Perez Martin wrote: > On Wed, Apr 3, 2024 at 4:36 PM Sahil wrote: > [...] > > I would like to clarify one thing in the figure "Full two-entries > > descriptor table". The driver can only overwrite a used descripto

Re: Intention to work on GSoC project

2024-03-15 Thread Sahil
Hi, Thank you for your email. On Thursday, March 14, 2024 8:39:45 PM IST Eugenio Perez Martin wrote: > Hi Sahil, > > It's being hard to find a good self-contained small task related to > the project to be honest. As it would be out of SVQ, would it be ok > for you if we s

Re: Intention to work on GSoC project

2024-03-16 Thread Sahil
l > if you want either here or in a meeting. Thank you. Either means of communication works for me although the latter will require some coordination. > If you prefer to continue with the theory it is ok too. A good balance of theory and practice would be nice at this stage. It'll keep

Re: Intention to work on GSoC project

2024-03-18 Thread Sahil
tio/virtio_ring.c". I have understood that the virtio driver runs in the guest's kernel. Does that mean the drivers in "drivers/virtio/*" are enabled when linux is being run in a guest VM? Thanks, Sahil [1] https://www.redhat.com/en/blog/virtqueues-and-virtio-ring-how-data-travels

Re: Intention to work on GSoC project

2024-04-14 Thread Sahil
Hi, On Friday, April 5, 2024 12:36:02 AM IST Sahil wrote: > [...] > I'll set up this environment as well. I would like to post an update here. I spent the last week trying to set up the environment as described in the blog [1]. I initially tried to get the L1 VM running on my h

Re: Intention to work on GSoC project

2024-04-15 Thread Sahil
in /lib/modules/6.5.6-300.fc39.x86_64. > > > > The kernel version is 6.5.6-300.fc39.x86_64. I haven't tried building > > pktgen manually in L1. I'll try that and will check if vdpa_sim works > > as expected after that. > > Did you install kernel-modules-internal? I just realized I had the wrong version of kernel-modules-internal installed. It works after installing the right version. Thanks, Sahil [1] https://www.redhat.com/en/blog/hands-vdpa-what-do-you-do-when-you-aint-got-hardware-part-1

Re: Intention to work on GSoC project

2024-04-16 Thread Sahil
if vdpa_sim works > > > > as expected after that. > > > > > > Did you install kernel-modules-internal? > > > > I just realized I had the wrong version of kernel-modules-internal > > installed. It works after installing the right version. > > Good! So you can move to vp_vdpa, or do you have more doubts > about vdpa_sim? I am ready to move on to vp_vdpa. I don't have any more doubts about vdpa_sim as of now. Thanks, Sahil

Re: Intention to work on GSoC project

2024-05-06 Thread Sahil
bit "VIRTIO_F_RING_PACKED" is set (using "virtio_vdev_has_feature")? And if it's supported, "vhost_svq_add" should call "vhost_svq_add_packed". Following this, I can then start implementing "vhost_svq_add_packed" and progress from there. What are your

Re: Intention to work on GSoC project

2024-05-07 Thread Sahil
n that. Then, we can send > subsequents RFCs adding features on top. > > Does that make sense to you? > > Thanks! > Thank you for your reply. This is perfect. I'll start with this and will send the first RFC as soon as possible. Thanks, Sahil

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

2024-06-21 Thread Sahil
it'll be easier to test > > these changes once that's done (I am not sure about this though). Would > > this involve implementing the notification mechanism and event_idx? > You can start omitting event_idx if you disable it from the device or > from qemu's commandline with event_idx=off. If you use vdpa_sim, it's > easier to remove it using qemu's cmdline in my opinion. Also, there is > a needs_kick boolean that you can set to always true for testing > purposes, since it is valid to send extra notifications. I think you > don't need to modify anything else from vhost_svq_kick to test the > device receives the buffer, but let me know if you find problems. I'll take a look at the kernel patches. I'll also try testing these changes with vdpa_sim. I'll check if the device gets the buffers. Thanks, Sahil [1] https://lists.nongnu.org/archive/html/qemu-devel/2024-05/msg01843.html

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

2024-06-21 Thread Sahil
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.org/Internships/ProjectIdeas/PackedShadowVirtqueue > > > > hw/virt

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

2024-06-25 Thread Sahil
s > > reordering serves any purpose implementation-wise. Please let me know if > > I should revert this change. > > I'm not against the change, but removing superfluous changes helps the > reviewing. If you send the reordering, please use a separate patch so > it's easier to review. Understood, I'll keep this in mind when sending patches. Thanks, Sahil

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

2024-08-11 Thread Sahil
Hi, Thank you for your reply. On Wednesday, August 7, 2024 10:11:52 PM GMT+5:30 you wrote: > On Fri, Aug 2, 2024 at 1:22 PM Sahil Siddiq wrote: > [...] > > I'll also test these changes out by following the > > suggestions given in response to v1. I'll have more >

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

2024-08-11 Thread Sahil
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(VhostShadowVirtqueue *svq, > > VirtIODevice *vdev, > > svq->vring.n

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

2024-08-12 Thread Sahil
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: > > > On Fri, Aug 2, 2024 at 1:22 PM Sahil Siddiq wrote: > > > > [.

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

2024-08-21 Thread Sahil
size_t device_event_suppression = sizeof(struct > > > vring_packed_desc_event); > > > > > > return ROUND_UP(desc_size + driver_event_suppression + > > > device_event_suppression,> > > > > qemu_real_host_

Re: Intention to work on GSoC project

2024-05-13 Thread Sahil
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 start by implementing a mechanism to check if the feature bit > > &g

Re: Intention to work on GSoC project

2024-05-13 Thread Sahil
[5]). > > > > I thought I would ask this first before continuing further. > > That's right, this second option makes perfect sense. > > VhostShadowVirtqueue should abstract both split and packed. You'll see > that some members are reused, while others are only used in one > version so they are placed after a union. They should follow the same > pattern, although it is not a problem if we need to divert a little > bit from the kernel's code. > Understood, thank you for the reply. Thanks, Sahil

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

2024-06-18 Thread Sahil
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, 167 insertions(+), 23 deletions(-) > > d

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

2024-08-30 Thread Sahil
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 not very clear > > on a few things. > > > > Q1. > > I

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

2024-09-08 Thread Sahil
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 Eugenio Perez Martin wrote: > > > On Wed, Aug 21, 2024 at 2:20 PM Sahil

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

2024-09-11 Thread Sahil
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: > > > On Fri, Aug 30, 2024 at 12:20 PM Sahil wrote: > > > [.

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

2024-09-15 Thread Sahil
Hi, On Thursday, September 12, 2024 3:24:27 PM GMT+5:30 Eugenio Perez Martin wrote: > 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 S

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

2024-07-26 Thread Sahil
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 with memory alignment enforcement > > such as "vring_desc_t" have been

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

2024-07-28 Thread Sahil
Hi, On Friday, July 26, 2024 7:58:49 PM GMT+5:30 Eugenio Perez Martin wrote: > On Fri, Jul 26, 2024 at 11:59 AM Sahil Siddiq wrote: > > [...] > > @@ -759,19 +780,34 @@ void vhost_svq_start(VhostShadowVirtqueue *svq, > > VirtIODevice *vdev,> > > svq->

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

2024-07-28 Thread Sahil
Hi, On Friday, July 26, 2024 11:55:14 PM GMT+5:30 Eugenio Perez Martin wrote: > On Fri, Jul 26, 2024 at 7:11 PM Sahil wrote: > > [...] > > > > Q2. > > > > I see that parts of the "vhost-vdpa" implementation is based on > > > > the as

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

2024-07-28 Thread Sahil
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 packed > > virtqueues in vhost_shadow_virtqueue. This patch implements the > > i

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

2024-08-02 Thread Sahil
Hi, On Monday, July 29, 2024 1:51:27 PM GMT+5:30 Eugenio Perez Martin wrote: > On Sun, Jul 28, 2024 at 7:37 PM Sahil wrote: > > [...] > > > > +static bool vhost_svq_add_packed(VhostShadowVirtqueue *svq, > > > > +const struct iovec

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

2024-09-29 Thread Sahil
Hi, On Tuesday, September 24, 2024 4:16:26 PM GMT+5:30 Eugenio Perez Martin wrote: > 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 T

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

2024-09-23 Thread Sahil
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: > [...] > > The function that gets the features from vhost-vdpa in QEMU is >

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

2024-06-18 Thread Sahil Siddiq
been modified so it acts as a layer of abstraction for split and packed virtqueues. Signed-off-by: Sahil Siddiq --- Hi, I am currently working on adding support for packed virtqueues in vhost_shadow_virtqueue [1]. This patch only implements the insertion of available buffers in the descriptor area

[RFC v2 2/3] vhost: Data structure changes to support packed vqs

2024-07-26 Thread Sahil Siddiq
Introduce "struct vring_packed". Modify VhostShadowVirtqueue so it can support split and packed virtqueue formats. Signed-off-by: Sahil Siddiq --- No changes since v1. hw/virtio/vhost-shadow-virtqueue.h | 66 -- 1 file changed, 44 insertions(+), 22

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

2024-07-26 Thread Sahil Siddiq
approach alright or is there a better alternative? I would like to get your thoughts on this before working on this portion of the project. Thanks, Sahil [1] https://lists.nongnu.org/archive/html/qemu-devel/2024-06/msg03417.html [2] https://gitlab.com/qemu-project/qemu/-/blob/master/include/sta

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

2024-07-26 Thread Sahil Siddiq
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 consider indirect descriptors. Signed-off-by: Sahil Siddiq

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

2024-07-26 Thread Sahil Siddiq
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" (vhost_svq_get_vring_

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

2024-08-02 Thread Sahil Siddiq
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 consider indirect descriptors. Signed-off-by: Sahil Siddiq

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

2024-08-02 Thread Sahil Siddiq
27;ll have more confidence once I know these changes work. Thanks, Sahil v1: https://lists.nongnu.org/archive/html/qemu-devel/2024-06/msg03417.html v2: https://lists.nongnu.org/archive/html/qemu-devel/2024-07/msg06196.html Changes v2 -> v3: * vhost-shadow-virtqueue.c - Move parts common to "v

[RFC v3 2/3] vhost: Data structure changes to support packed vqs

2024-08-02 Thread Sahil Siddiq
Introduce "struct vring_packed". Modify VhostShadowVirtqueue so it can support split and packed virtqueue formats. Signed-off-by: Sahil Siddiq --- No changes from v1/v2 -> v3 hw/virtio/vhost-shadow-virtqueue.h | 66 -- 1 file changed, 44 insertions(+),

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

2024-08-02 Thread Sahil Siddiq
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 (vhost_svq_start): - Remove common variable

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

2024-11-05 Thread Sahil Siddiq
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 commit v5.14-rc1~30^2~8 enabled the vp_vdpa driver to set the To refer to a commit, please use the SHA-1 id or even better the form suggested in

[PATCH] vdpa: Support setting vring_base for packed svq

2024-11-04 Thread Sahil Siddiq
vhost-vdpa (with the vp_vdpa driver) can use packed svqs. Link: https://lists.nongnu.org/archive/html/qemu-devel/2024-10/msg05106.html Link: https://lore.kernel.org/r/20210602021536.39525-4-jasow...@redhat.com Signed-off-by: Sahil Siddiq --- QEMU currently does not support packed vhost s

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

2024-10-27 Thread Sahil Siddiq
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 \ > > -nographic \ > > -m 4G \ >

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

2024-11-12 Thread Sahil Siddiq
Hi, On 10/28/24 11:07 AM, Sahil Siddiq wrote: [...] The payload that VHOST_SET_VRING_BASE accepts depends on whether split virtqueues or packed virtqueues are used [6]. In hw/virtio/vhost- vdpa.c:vhost_vdpa_svq_setup() [7], the following payload is used which is not suitable for packed

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

2024-10-30 Thread Sahil Siddiq
Hi, Thank you for your reply. On 10/28/24 1:40 PM, Eugenio Perez Martin wrote: On Mon, Oct 28, 2024 at 6:38 AM Sahil Siddiq wrote: [...] I spent some time tinkering with the L0-L1-L2 test environment setup, and understanding QEMU's hw/virtio/vhost-vdpa.c [1] as well as Linux's dri

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

2024-11-07 Thread Sahil Siddiq
Hi, On 11/6/24 8:30 PM, Eugenio Perez Martin wrote: 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

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

2024-11-16 Thread Sahil Siddiq
Hi, On 11/14/24 12:28 PM, Michael S. Tsirkin wrote: On Mon, Nov 04, 2024 at 09:51:24PM +0530, Sahil Siddiq wrote: Linux commit v5.14-rc1~30^2~8 enabled the vp_vdpa driver to set the vq state to the device's initial state. This works differently for split and packed vqs. With shadow virtq

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

2025-01-03 Thread Sahil Siddiq
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 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, 2024 at 6

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

2025-02-04 Thread Sahil Siddiq
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 AM Sahil Siddiq wrote: On 1/21/25 10:07 PM, Eugenio Perez Martin wrote: On Sun, Jan 19, 2025 at 7:37 AM

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

2025-02-10 Thread Sahil Siddiq
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 Martin wrote: PS: Please note that you can check packed_vq SVQ implementation already without CVQ, as these

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

2025-02-10 Thread Sahil Siddiq
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 Martin wrote: On Thu, Feb 6, 2025 at 6:26 AM Sahil Siddiq wrote: On 2/4/25 11:45 PM, Eugenio Perez Martin wrote

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

2025-02-05 Thread Sahil Siddiq
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 AM Sahil Siddiq wrote: On 1/24/25 1:04 PM, Eugenio Perez Martin wrote: On Fri, Jan 24, 2025 at 6:47 AM Sahil

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

2025-02-06 Thread Sahil Siddiq
Hi, On 2/6/25 12:42 PM, Eugenio Perez Martin wrote: 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 AM

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

2025-01-30 Thread Sahil Siddiq
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, 2025 at 7:37 AM Sahil Siddiq wrote: On 1/7/25 1:35 PM, Eugenio Perez Martin wrote: [...] Apologies for the delay in

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

2024-12-11 Thread Sahil Siddiq
Hi, Thank you for your reply. 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 test my changes. I thought I would send the patch series as well in case that helps in troubleshooting. I

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

2024-12-11 Thread Sahil Siddiq
Hi, On 12/10/24 2:24 PM, Eugenio Perez Martin wrote: 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

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

2024-12-11 Thread Sahil Siddiq
Hi, On 12/10/24 2:25 PM, Eugenio Perez Martin wrote: 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 n

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

2024-12-15 Thread Sahil Siddiq
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 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

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

2024-12-16 Thread Sahil Siddiq
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: On Thu, Dec 5, 2024 at 9:34 PM Sahil Siddiq wrote: [...] I have been following the "Hands on vDPA: wh

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

2024-12-19 Thread Sahil Siddiq
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, 2024 at 6:27 PM Sahil Siddiq wrote: On 12/10/24 2:57 PM, Eugenio Perez Martin wrote: On Thu, Dec 5, 2024 at 9:34 PM

[RFC v4 4/5] vdpa: Allocate memory for svq and map them to vdpa

2024-12-05 Thread Sahil Siddiq
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 layout memory, the implementation in svq start and svq stop should not differ based on the vq's format. Signed-off-by

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

2024-12-05 Thread Sahil Siddiq
, I see drivers/net/virtio_net:virtnet_open invoke try_fill_recv() and schedule_delayed_work() [6]. I am unfamiliar with this and so I am not sure how to progress. Maybe I can try disabling napi and checking it out if that is possible. Would this be a good next step to troubleshoot the kernel cr

[RFC v4 1/5] vhost: Refactor vhost_svq_add_split

2024-12-05 Thread Sahil Siddiq
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. Signed-off-by: Sahil Siddiq --- Changes v3 -> v4: - Split commit #1 in v3 into 2 commits. - Changes related to "vhost_svq_add_pac

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

2024-12-05 Thread Sahil Siddiq
Introduce "struct vring_packed". Modify VhostShadowVirtqueue so it can support split and packed virtqueue formats. Signed-off-by: Sahil Siddiq --- Changes v3 -> v4: - Commit #2 of v3 is now commit #3 in this series. - vhost-shadow-virtqueue.h (struct VhostShadowVirtqueue): Add b

[RFC v4 5/5] vdpa: Support setting vring_base for packed svq

2024-12-05 Thread Sahil Siddiq
"vp_vdpa: allow set vq state to initial state after reset") Signed-off-by: Sahil Siddiq Acked-by: Eugenio Pérez --- Changes v3 -> v4: - New commit. - vhost-vdpa.c (vhost_vdpa_svq_setup): Add comment. hw/virtio/vhost-vdpa.c | 13 + 1 file changed, 13 insertions(+)

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

2024-12-05 Thread Sahil Siddiq
features that vdpa supports. Signed-off-by: Sahil Siddiq --- Changes v3 -> v4: - Split commit #1 in v3 into 2 commits. - vhost-shadow-virtqueue.c (vhost_svq_valid_features): Add enums. hw/virtio/vhost-shadow-virtqueue.c | 83 +- 1 file changed, 81 insertions(+)

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

2024-12-05 Thread Sahil Siddiq
Hi, On 11/13/24 5:00 PM, Eugenio Perez Martin wrote: On Wed, Nov 13, 2024 at 6:11 AM Sahil Siddiq wrote: Hi, On 10/28/24 11:07 AM, Sahil Siddiq wrote: [...] The payload that VHOST_SET_VRING_BASE accepts depends on whether split virtqueues or packed virtqueues are used [6]. In hw/virtio

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

2025-01-23 Thread Sahil Siddiq
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: 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

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

2025-01-18 Thread Sahil Siddiq
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 wrote: 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

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

2025-03-05 Thread Sahil Siddiq
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: On Mon, Feb 10, 2025 at 5:25 PM Sahil Siddiq wrote: On 2/10/25 7:53 PM, Eugenio Perez Martin wrote

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

2025-03-24 Thread Sahil Siddiq
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 consider indirect descriptors. Enable the packed SVQ to forward the

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

2025-03-24 Thread Sahil Siddiq
Detect when used descriptors are ready for consumption by the guest via packed virtqueues and forward them from the device to the guest. Signed-off-by: Sahil Siddiq --- Changes from v4 -> v5: - New commit. - vhost-shadow-virtqueue.c: (vhost_svq_more_used): Split into vhost_svq_more_used_sp

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

2025-03-24 Thread Sahil Siddiq
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 the device. Signed-off-by: Sahil Siddiq --- Changes from v4

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

2025-03-24 Thread Sahil Siddiq
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. Signed-off-by: Sahil Siddiq --- Changes from v4 -> v5: - New com

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

2025-03-24 Thread Sahil Siddiq
Hi, On 3/6/25 12:53 PM, Eugenio Perez Martin wrote: On Thu, Mar 6, 2025 at 6:26 AM Sahil Siddiq wrote: [...] On 2/11/25 1:27 PM, Eugenio Perez Martin wrote: [...] [ 49.173243] watchdog: BUG: soft lockup - CPU#1 stuck for 25s! [NetworkManager:782] [ 49.174167] Modules linked in: rfkill

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

2025-03-24 Thread Sahil Siddiq
implementation of "vhost_svq_(en|dis)able_notification" in commit #5. 4. something else? Thanks, Sahil [1] https://github.com/torvalds/linux/blob/master/drivers/net/virtio_net.c#L3245 [2] https://www.redhat.com/en/blog/hands-vdpa-what-do-you-do-when-you-aint-got-hardware-part-2 Sahil Sidd

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

2025-03-24 Thread Sahil Siddiq
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 commit #2 based on review comments. - Place sha

[RFC v5 1/7] vhost: Refactor vhost_svq_add_split

2025-03-24 Thread Sahil Siddiq
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. hw/virtio/vhost-shadow-virtqueue.c | 107 +++--

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

2025-03-24 Thread Sahil Siddiq
ze flags, counters and indices for packed vqs before they are utilized. Signed-off-by: Sahil Siddiq --- Changes from v4 -> v5: - vhost-shadow-virtqueue.c: (vhost_svq_start): Initialize variables used by packed vring. hw/virtio/vhost-shadow-virtqueue.c | 52 +- h

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

2025-03-24 Thread Sahil Siddiq
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/virtio/vhost-shadow-virtqueue.c | 3 +++ 1 file changed, 3 inserti

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

2025-03-24 Thread Sahil Siddiq
05106.html Link: https://lore.kernel.org/r/20210602021536.39525-4-jasow...@redhat.com Link: 1225c216d954 ("vp_vdpa: allow set vq state to initial state after reset") Signed-off-by: Sahil Siddiq Acked-by: Eugenio Pérez --- Changes from v4 -> v5: - Initially commit #5 in v4. - Fix coding sty

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

2025-03-27 Thread Sahil Siddiq
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 available buffers in the descriptor area of packed shadow virtqueues. It takes into account descriptor chains, but does