Re: [PATCH v2 1/2] vhost: Add smp_rmb() in vhost_vq_avail_empty()

2024-03-26 Thread Jason Wang
On Wed, Mar 27, 2024 at 10:34 AM Jason Wang wrote: > > On Wed, Mar 27, 2024 at 7:39 AM Gavin Shan wrote: > > > > A smp_rmb() has been missed in vhost_vq_avail_empty(), spotted by > > Will Deacon . Otherwise, it's not ensured the > > available ring entries pushed by

Re: [PATCH v2 2/2] vhost: Add smp_rmb() in vhost_enable_notify()

2024-03-26 Thread Jason Wang
mb(); > + return true; > + } > > - return vq->avail_idx != vq->last_avail_idx; > + return false; So we only care about the case when vhost_enable_notify() returns true. In that case, I think you want to order with vhost_get_vq_desc(): last_avail_i

Re: [PATCH v2 1/2] vhost: Add smp_rmb() in vhost_vq_avail_empty()

2024-03-26 Thread Jason Wang
On Wed, Mar 27, 2024 at 7:39 AM Gavin Shan wrote: > > A smp_rmb() has been missed in vhost_vq_avail_empty(), spotted by > Will Deacon . Otherwise, it's not ensured the > available ring entries pushed by guest can be observed by vhost > in time, leading to stale available ring entries fetched by

Re: [PATCH v3] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI

2024-03-21 Thread Jason Wang
On Wed, Mar 20, 2024 at 6:20 PM Wang Rong wrote: > > From: Rong Wang > > Once enable iommu domain for one device, the MSI > translation tables have to be there for software-managed MSI. > Otherwise, platform with software-managed MSI without an > irq bypass function, can not get a correct memory

Re: [PATCH net-next v2 3/3] tun: AF_XDP Tx zero-copy support

2024-03-12 Thread Jason Wang
On Mon, Mar 11, 2024 at 9:28 PM wangyunjian wrote: > > > > > -Original Message- > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Monday, March 11, 2024 12:01 PM > > To: wangyunjian > > Cc: Michael S. Tsirkin ; Paolo Abeni ; > > wil

Re: [PATCH net-next v2 3/3] tun: AF_XDP Tx zero-copy support

2024-03-10 Thread Jason Wang
On Mon, Mar 4, 2024 at 9:45 PM wangyunjian wrote: > > > > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Friday, March 1, 2024 7:53 PM > > To: wangyunjian > > Cc: Paolo Abeni ; willemdebruijn.ker...@gmail.com; > > jasow...@redhat.com;

Re: [PATCH net-next v6 5/5] tools: virtio: introduce vhost_net_test

2024-03-05 Thread Jason Wang
sending in the tun side. > > 3. Kick the vhost_net to do rx processing. > > 4. verify the data received by vhost_net is correct. > > > > Signed-off-by: Yunsheng Lin > > @Jason: AFAICS this addresses the points you raised on v5, could you > please have a look? > > Thanks! Looks good to me. Acked-by: Jason Wang Thanks > > Paolo > >

Re: [PATCH net-next v2 3/3] tun: AF_XDP Tx zero-copy support

2024-03-05 Thread Jason Wang
On Sat, Mar 2, 2024 at 2:40 AM Willem de Bruijn wrote: > > Maciej Fijalkowski wrote: > > On Wed, Feb 28, 2024 at 07:05:56PM +0800, Yunjian Wang wrote: > > > This patch set allows TUN to support the AF_XDP Tx zero-copy feature, > > > which can significantly reduce CPU utilization for XDP programs.

Re: [PATCH net-next v2 3/3] tun: AF_XDP Tx zero-copy support

2024-03-05 Thread Jason Wang
On Mon, Mar 4, 2024 at 7:24 PM wangyunjian wrote: > > > > > -Original Message- > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Monday, March 4, 2024 2:56 PM > > To: wangyunjian > > Cc: m...@redhat.com; willemdebruijn.ker...@gmail.com

Re: [PATCH net-next v2 3/3] tun: AF_XDP Tx zero-copy support

2024-03-03 Thread Jason Wang
On Wed, Feb 28, 2024 at 7:06 PM Yunjian Wang wrote: > > This patch set allows TUN to support the AF_XDP Tx zero-copy feature, > which can significantly reduce CPU utilization for XDP programs. > > Since commit fc72d1d54dd9 ("tuntap: XDP transmission"), the pointer > ring has been utilized to

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2024-02-25 Thread Jason Wang
On Fri, Feb 23, 2024 at 3:22 AM Michael S. Tsirkin wrote: > > On Tue, Jul 25, 2023 at 11:03:11AM +0800, Jason Wang wrote: > > On Mon, Jul 24, 2023 at 3:18 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jul 24, 2023 at 02:52:49PM +0800, Jason Wang wrote: > >

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-02-25 Thread Jason Wang
On Fri, Feb 23, 2024 at 9:42 AM Xuan Zhuo wrote: > > On Fri, 09 Feb 2024 13:57:25 +0100, Paolo Abeni wrote: > > On Fri, 2024-02-09 at 18:39 +0800, Liang Chen wrote: > > > On Wed, Feb 7, 2024 at 10:27 PM Paolo Abeni wrote: > > > > > > > > On Wed, 2024-02-07 at 10:54 +0800, Liang Chen wrote: > >

Re: [PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-06 Thread Jason Wang
On Tue, Feb 6, 2024 at 10:52 PM Stefano Garzarella wrote: > > If VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated, we expect > the driver to enable virtqueue before setting DRIVER_OK. If the driver > tries anyway, better to fail right away as soon as we get the ioctl. > Let's also update

Re: [PATCH net-next v5 5/5] tools: virtio: introduce vhost_net_test

2024-02-05 Thread Jason Wang
On Mon, Feb 5, 2024 at 8:46 PM Yunsheng Lin wrote: > > introduce vhost_net_test for both vhost_net tx and rx basing > on virtio_test to test vhost_net changing in the kernel. > > Steps for vhost_net tx testing: > 1. Prepare a out buf. > 2. Kick the vhost_net to do tx processing. > 3. Do the

Re: [PATCH] virtio: make virtio_bus const

2024-02-05 Thread Jason Wang
gt; Cc: Greg Kroah-Hartman > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Ricardo B. Marliere > --- Acked-by: Jason Wang Thanks

Re: [PATCH net-next v4 5/5] tools: virtio: introduce vhost_net_test

2024-02-04 Thread Jason Wang
On Sun, Feb 4, 2024 at 11:50 AM Yunsheng Lin wrote: > > On 2024/2/4 9:30, Jason Wang wrote: > > On Fri, Feb 2, 2024 at 8:24 PM Yunsheng Lin wrote: > >> > >> On 2024/2/2 12:05, Jason Wang wrote: > >>> On Tue, Jan 30, 2024 at 7:38 PM Yunsheng

Re: [PATCH net-next v4 5/5] tools: virtio: introduce vhost_net_test

2024-02-03 Thread Jason Wang
On Fri, Feb 2, 2024 at 8:24 PM Yunsheng Lin wrote: > > On 2024/2/2 12:05, Jason Wang wrote: > > On Tue, Jan 30, 2024 at 7:38 PM Yunsheng Lin wrote: > >> > >> introduce vhost_net_test basing on virtio_test to test > >> vhost_net changing in the kernel. &

Re: [PATCH net-next v4 5/5] tools: virtio: introduce vhost_net_test

2024-02-01 Thread Jason Wang
On Tue, Jan 30, 2024 at 7:38 PM Yunsheng Lin wrote: > > introduce vhost_net_test basing on virtio_test to test > vhost_net changing in the kernel. Let's describe what kind of test is being done and how it is done here. > > Signed-off-by: Yunsheng Lin > --- > tools/virtio/.gitignore |

Re: [PATCH v4] virtio_net: Support RX hash XDP hint

2024-01-31 Thread Jason Wang
.@daynix.com/#r > > Signed-off-by: Liang Chen > Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Thanks

Re: [PATCH net-next 2/2] tun: AF_XDP Rx zero-copy support

2024-01-29 Thread Jason Wang
On Mon, Jan 29, 2024 at 7:40 PM wangyunjian wrote: > > > -Original Message- > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Monday, January 29, 2024 11:03 AM > > To: wangyunjian > > Cc: m...@redhat.com; willemdebruijn.ker...@gmail.com; k...@ke

Re: [PATCH net-next 2/2] tun: AF_XDP Rx zero-copy support

2024-01-29 Thread Jason Wang
On Mon, Jan 29, 2024 at 7:10 PM wangyunjian wrote: > > > -Original Message- > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Monday, January 29, 2024 11:05 AM > > To: wangyunjian > > Cc: m...@redhat.com; willemdebruijn.ker...@gmail.com; k...@ke

Re: [PATCH net-next 2/2] tun: AF_XDP Rx zero-copy support

2024-01-28 Thread Jason Wang
On Sat, Jan 27, 2024 at 5:34 PM wangyunjian wrote: > > > > -Original Message- > > > From: Jason Wang [mailto:jasow...@redhat.com] > > > Sent: Thursday, January 25, 2024 12:49 PM > > > To: wangyunjian > > > Cc: m...@redhat.com; willemdebr

Re: [PATCH net-next 2/2] tun: AF_XDP Rx zero-copy support

2024-01-28 Thread Jason Wang
On Thu, Jan 25, 2024 at 8:54 PM wangyunjian wrote: > > > > > -Original Message- > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Thursday, January 25, 2024 12:49 PM > > To: wangyunjian > > Cc: m...@redhat.com; willemdebruijn.ke

Re: [PATCH net-next 2/2] tun: AF_XDP Rx zero-copy support

2024-01-24 Thread Jason Wang
On Wed, Jan 24, 2024 at 5:38 PM Yunjian Wang wrote: > > Now the zero-copy feature of AF_XDP socket is supported by some > drivers, which can reduce CPU utilization on the xdp program. > This patch set allows tun to support AF_XDP Rx zero-copy feature. > > This patch tries to address this by: > -

Re: [PATCH v2 2/3] virtio_net: Add missing virtio header in skb for XDP_PASS

2024-01-24 Thread Jason Wang
On Wed, Jan 24, 2024 at 5:16 PM Xuan Zhuo wrote: > > On Wed, 24 Jan 2024 16:57:20 +0800, Liang Chen > wrote: > > For the XDP_PASS scenario of the XDP path, the skb constructed with > > xdp_buff does not include the virtio header. Adding the virtio header > > information back when creating the

Re: [PATCH net-next 2/2] tun: AF_XDP Rx zero-copy support

2024-01-24 Thread Jason Wang
On Thu, Jan 25, 2024 at 3:05 AM Willem de Bruijn wrote: > > Yunjian Wang wrote: > > Now the zero-copy feature of AF_XDP socket is supported by some > > drivers, which can reduce CPU utilization on the xdp program. > > This patch set allows tun to support AF_XDP Rx zero-copy feature. > > > > This

Re: [PATCH] virtio_net: Support RX hash XDP hint

2024-01-23 Thread Jason Wang
On Mon, Jan 22, 2024 at 6:23 PM Liang Chen wrote: > > The RSS hash report is a feature that's part of the virtio specification. > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost > (still a work in progress as per [1]) support this feature. While the > capability to obtain

Re: [PATCH V1] vdpa_sim: reset must not run

2024-01-21 Thread Jason Wang
set. > > Fixes: 0c89e2a3a9d0 ("vdpa_sim: Implement suspend vdpa op") > Signed-off-by: Steve Sistare > Reviewed-by: Eugenio Pérez Acked-by: Jason Wang Thanks

Re: [RFC V1 00/13] vdpa live update

2024-01-21 Thread Jason Wang
On Thu, Jan 18, 2024 at 4:32 AM Steven Sistare wrote: > > On 1/10/2024 9:55 PM, Jason Wang wrote: > > On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare > > wrote: > >> > >> Live update is a technique wherein an application saves its state, exec's > >>

Re: [RFC V1 05/13] vhost-vdpa: VHOST_IOTLB_REMAP

2024-01-21 Thread Jason Wang
On Thu, Jan 18, 2024 at 4:32 AM Steven Sistare wrote: > > On 1/10/2024 10:08 PM, Jason Wang wrote: > > On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare > > wrote: > >> > >> When device ownership is passed to a new process via VHOST_NEW_OWNER, > >&g

Re: [RFC V1 07/13] vhost-vdpa: flush workers on suspend

2024-01-11 Thread Jason Wang
On Fri, Jan 12, 2024 at 12:18 AM Mike Christie wrote: > > On 1/10/24 9:09 PM, Jason Wang wrote: > > On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare > > wrote: > >> > >> To pass ownership of a live vdpa device to a new process, the user > >> suspend

Re: [PATCH] driver/virtio: Add Memory Balloon Support for SEV/SEV-ES

2024-01-10 Thread Jason Wang
On Wed, Jan 10, 2024 at 2:23 PM Zheyun Shen wrote: > > For now, SEV pins guest's memory to avoid swapping or > moving ciphertext, but leading to the inhibition of > Memory Ballooning. > > In Memory Ballooning, only guest's free pages will be relocated > in balloon inflation and deflation, so the

Re: [PATCH v7 2/3] vduse: Temporarily fail if control queue feature requested

2024-01-10 Thread Jason Wang
. > > Some work is on-going to make the control queue > implementation robust with VDUSE. Until it is completed, > let's fail features check if control-queue feature is > requested. > > Signed-off-by: Maxime Coquelin Acked-by: Jason Wang Thanks > --- > drivers/vdpa

Re: [RFC V1 08/13] vduse: flush workers on suspend

2024-01-10 Thread Jason Wang
On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare wrote: > > To pass ownership of a live vdpa device to a new process, the user > suspends the device, calls VHOST_NEW_OWNER to change the mm, and calls > VHOST_IOTLB_REMAP to change the user virtual addresses to match the new > mm. Flush workers in

Re: [RFC V1 07/13] vhost-vdpa: flush workers on suspend

2024-01-10 Thread Jason Wang
On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare wrote: > > To pass ownership of a live vdpa device to a new process, the user > suspends the device, calls VHOST_NEW_OWNER to change the mm, and calls > VHOST_IOTLB_REMAP to change the user virtual addresses to match the new > mm. Flush workers in

Re: [RFC V1 05/13] vhost-vdpa: VHOST_IOTLB_REMAP

2024-01-10 Thread Jason Wang
On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare wrote: > > When device ownership is passed to a new process via VHOST_NEW_OWNER, > some devices need to know the new userland addresses of the dma mappings. > Define the new iotlb message type VHOST_IOTLB_REMAP to update the uaddr > of a mapping. The

Re: [RFC V1 00/13] vdpa live update

2024-01-10 Thread Jason Wang
On Thu, Jan 11, 2024 at 4:40 AM Steve Sistare wrote: > > Live update is a technique wherein an application saves its state, exec's > to an updated version of itself, and restores its state. Clients of the > application experience a brief suspension of service, on the order of > 100's of

Re: [PATCH v6 2/3] vduse: Temporarily fail if control queue features requested

2024-01-07 Thread Jason Wang
On Fri, Jan 5, 2024 at 6:14 PM Maxime Coquelin wrote: > > > > On 1/5/24 10:59, Eugenio Perez Martin wrote: > > On Fri, Jan 5, 2024 at 9:12 AM Maxime Coquelin > > wrote: > >> > >> > >> > >> On 1/5/24 03:45, Jason Wang wrote: > &

Re: [PATCH v6 3/3] vduse: enable Virtio-net device type

2024-01-04 Thread Jason Wang
d-only. It also fails with > -EPERM if the CAP_NET_ADMIN is missing. > > Signed-off-by: Maxime Coquelin > --- Acked-by: Jason Wang Thanks

Re: [PATCH v6 2/3] vduse: Temporarily fail if control queue features requested

2024-01-04 Thread Jason Wang
F_CTRL_VQ) |\ > +BIT_ULL(VIRTIO_NET_F_CTRL_RX) | \ > +BIT_ULL(VIRTIO_NET_F_CTRL_VLAN) | \ > +BIT_ULL(VIRTIO_NET_F_GUEST_ANNOUNCE) | \ > +BIT_ULL(VIRTIO_NET_F_MQ) | \ > +BIT_ULL(VIRTIO_NET_F_CTRL_MAC_ADDR) | \ > +

Re: [PATCH v4] virtio_pmem: support feature SHMEM_REGION

2023-12-26 Thread Jason Wang
the device, the driver looks for a shared memory region of id 0. > If it is found, this feature is understood. Otherwise, this feature > bit is cleared. > > During probe, if VIRTIO_PMEM_F_SHMEM_REGION has been negotiated, > virtio pmem ignores the `start` and `size` fields in dev

Re: [PATCH vhost v4 06/15] vdpa: Track device suspended state

2023-12-24 Thread Jason Wang
On Fri, Dec 22, 2023 at 7:22 PM Dragos Tatulea wrote: > > On Wed, 2023-12-20 at 13:55 +0100, Dragos Tatulea wrote: > > On Wed, 2023-12-20 at 11:46 +0800, Jason Wang wrote: > > > On Wed, Dec 20, 2023 at 2:09 AM Dragos Tatulea > > > wrote: > > > &g

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-21 Thread Jason Wang
On Thu, Dec 21, 2023 at 3:47 PM Eugenio Perez Martin wrote: > > On Thu, Dec 21, 2023 at 3:03 AM Jason Wang wrote: > > > > On Wed, Dec 20, 2023 at 9:32 PM Eugenio Perez Martin > > wrote: > > > > > > On Wed, Dec 20, 2023 at 5:06 AM Jason Wang wrote: >

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-20 Thread Jason Wang
On Thu, Dec 21, 2023 at 10:48 AM Yunsheng Lin wrote: > > On 2023/12/21 10:33, Jason Wang wrote: > > On Wed, Dec 20, 2023 at 8:45 PM Yunsheng Lin wrote: > >> > >> On 2023/12/12 12:35, Jason Wang wrote:>>>> +done: > >>>>>> + ba

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-20 Thread Jason Wang
On Wed, Dec 20, 2023 at 8:45 PM Yunsheng Lin wrote: > > On 2023/12/12 12:35, Jason Wang wrote:>>>> +done: > >>>> + backend.fd = tun_alloc(); > >>>> + assert(backend.fd >= 0); > >>>> + vdev_info_init(, features

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-20 Thread Jason Wang
On Wed, Dec 20, 2023 at 9:32 PM Eugenio Perez Martin wrote: > > On Wed, Dec 20, 2023 at 5:06 AM Jason Wang wrote: > > > > On Wed, Dec 20, 2023 at 11:46 AM Jason Wang wrote: > > > > > > On Wed, Dec 20, 2023 at 2:09 AM Dragos Tatulea > > > wrote:

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-19 Thread Jason Wang
On Wed, Dec 20, 2023 at 11:46 AM Jason Wang wrote: > > On Wed, Dec 20, 2023 at 2:09 AM Dragos Tatulea wrote: > > > > The virtio spec doesn't allow changing virtqueue addresses after > > DRIVER_OK. Some devices do support this operation when the

Re: [PATCH] vdpa: Fix an error handling path in eni_vdpa_probe()

2023-12-19 Thread Jason Wang
register_device(_vdpa->vdpa, eni_vdpa->queues); > > if (ret) { > > ENI_ERR(pdev, "failed to register to vdpa bus\n"); > > - goto err; > > + goto err_remove_vp_legacy; > > } > > > > return 0; > > > > +err_remove_vp_legacy: > > + vp_legacy_remove(_vdpa->ldev); > > err: > > put_device(_vdpa->vdpa.dev); > > return ret; > > Polite reminder on a (very) old patch. Acked-by: Jason Wang Thanks > > CJ >

Re: [PATCH] virtio_pmem: support feature SHMEM_REGION

2023-12-19 Thread Jason Wang
On Tue, Dec 19, 2023 at 3:19 PM Changyuan Lyu wrote: > > As per virtio spec 1.2 section 5.19.5.2, if the feature > VIRTIO_PMEM_F_SHMEM_REGION has been negotiated, the driver MUST query > shared memory ID 0 for the physical address ranges. > > Signed-off-by: Changyuan Lyu > --- >

Re: [PATCH] vdpa: Remove usage of the deprecated ida_simple_xx() API

2023-12-19 Thread Jason Wang
On Mon, Dec 11, 2023 at 1:52 AM Christophe JAILLET wrote: > > ida_alloc() and ida_free() should be preferred to the deprecated > ida_simple_get() and ida_simple_remove(). > > This is less verbose. > > Signed-off-by: Christophe JAILLET Acked-by: Jason Wang Thanks > --

Re: [PATCH v5 2/4] vduse: Temporarily disable control queue features

2023-12-19 Thread Jason Wang
On Mon, Dec 18, 2023 at 5:21 PM Maxime Coquelin wrote: > > > > On 12/18/23 03:50, Jason Wang wrote: > > On Wed, Dec 13, 2023 at 7:23 PM Maxime Coquelin > > wrote: > >> > >> Hi Jason, > >> > >> On 12/13/23 05:52, Jason Wang wrote: > &

Re: [PATCH RFC 0/4] virtio-net: add tx-hash, rx-tstamp, tx-tstamp and tx-time

2023-12-19 Thread Jason Wang
On Tue, Dec 19, 2023 at 12:36 AM Willem de Bruijn wrote: > > Steffen Trumtrar wrote: > > This series tries to pick up the work on the virtio-net timestamping > > feature from Willem de Bruijn. > > > > Original series > > Message-Id: 20210208185558.995292-1-willemdebruijn.ker...@gmail.com > >

Re: [PATCH vhost v4 14/15] vdpa/mlx5: Introduce reference counting to mrs

2023-12-19 Thread Jason Wang
hen the mkey is unlinked from the vq (trough modify/destroy) > and from the mr asid table. > > To make things consistent, get rid of mlx5_vdpa_destroy_mr and use > get/put semantics everywhere. > > Reviewed-by: Gal Pressman > Acked-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea > --- Acked-by: Jason Wang Thanks

Re: [PATCH vhost v4 13/15] vdpa/mlx5: Use vq suspend/resume during .set_map

2023-12-19 Thread Jason Wang
n't support resumable vqs, do the old teardown and > setup dance. > > Reviewed-by: Gal Pressman > Acked-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea > --- Acked-by: Jason Wang Thanks

Re: [PATCH vhost v4 12/15] vdpa/mlx5: Mark vq state for modification in hw vq

2023-12-19 Thread Jason Wang
eviewed-by: Gal Pressman > Signed-off-by: Dragos Tatulea > --- Acked-by: Jason Wang Thanks

Re: [PATCH vhost v4 10/15] vdpa/mlx5: Introduce per vq and device resume

2023-12-19 Thread Jason Wang
On Wed, Dec 20, 2023 at 2:10 AM Dragos Tatulea wrote: > > Implement vdpa vq and device resume if capability detected. Add support > for suspend -> ready state change. > > Reviewed-by: Gal Pressman > Acked-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks

Re: [PATCH vhost v4 09/15] vdpa/mlx5: Allow modifying multiple vq fields in one modify command

2023-12-19 Thread Jason Wang
Gal Pressman > Acked-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks

Re: [PATCH vhost v4 06/15] vdpa: Track device suspended state

2023-12-19 Thread Jason Wang
On Wed, Dec 20, 2023 at 2:09 AM Dragos Tatulea wrote: > > Set vdpa device suspended state on successful suspend. Clear it on > successful resume and reset. > > The state will be locked by the vhost_vdpa mutex. The mutex is taken > during suspend, resume and reset in vhost_vdpa_unlocked_ioctl. The

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-19 Thread Jason Wang
On Wed, Dec 20, 2023 at 2:09 AM Dragos Tatulea wrote: > > The virtio spec doesn't allow changing virtqueue addresses after > DRIVER_OK. Some devices do support this operation when the device is > suspended. The VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag > advertises this support as a

Re: [PATCH mlx5-vhost v4 01/15] vdpa/mlx5: Expose resumable vq capability

2023-12-19 Thread Jason Wang
On Wed, Dec 20, 2023 at 2:09 AM Dragos Tatulea wrote: > > Necessary for checking if resumable vqs are supported by the hardware. > Actual support will be added in a downstream patch. > > Reviewed-by: Gal Pressman > Acked-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea

Re: [PATCH v5 2/4] vduse: Temporarily disable control queue features

2023-12-17 Thread Jason Wang
On Wed, Dec 13, 2023 at 7:23 PM Maxime Coquelin wrote: > > Hi Jason, > > On 12/13/23 05:52, Jason Wang wrote: > > On Tue, Dec 12, 2023 at 9:17 PM Maxime Coquelin > > wrote: > >> > >> Virtio-net driver control queue implementation is not safe > >

Re: [PATCH v5 2/4] vduse: Temporarily disable control queue features

2023-12-12 Thread Jason Wang
On Tue, Dec 12, 2023 at 9:17 PM Maxime Coquelin wrote: > > Virtio-net driver control queue implementation is not safe > when used with VDUSE. If the VDUSE application does not > reply to control queue messages, it currently ends up > hanging the kernel thread sending this command. > > Some work

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-11 Thread Jason Wang
On Thu, Dec 7, 2023 at 7:28 PM Yunsheng Lin wrote: > > On 2023/12/7 14:00, Jason Wang wrote: > > On Tue, Dec 5, 2023 at 7:35 PM Yunsheng Lin wrote: > ... > > >> + > >> +static int tun_alloc(void) > >> +{ > >> + struct ifreq ifr; >

Re: [PATCH v2] virtio: Add support for no-reset virtio PCI PM

2023-12-11 Thread Jason Wang
On Tue, Dec 12, 2023 at 12:37 AM Michael S. Tsirkin wrote: > > On Fri, Dec 08, 2023 at 04:07:54PM +0900, David Stevens wrote: > > If a virtio_pci_device supports native PCI power management and has the > > No_Soft_Reset bit set, then skip resetting and reinitializing the device > > when

Re: Re: Re: EEVDF/vhost regression (bisected to 86bfbb7ce4f6 sched/fair: Add lag based placement)

2023-12-11 Thread Jason Wang
On Tue, Dec 12, 2023 at 12:54 AM Michael S. Tsirkin wrote: > > On Mon, Dec 11, 2023 at 03:26:46PM +0800, Jason Wang wrote: > > > Try reducing the VHOST_NET_WEIGHT limit and see if that improves things > > > any? > > > > Or a dirty hack like cond_resched()

Re: [PATCH v2] virtio: Add support for no-reset virtio PCI PM

2023-12-10 Thread Jason Wang
wer states like s2idle to be used in systems with stateful virtio > devices that can't simply be re-initialized (e.g. virtio-fs). > > Signed-off-by: David Stevens Acked-by: Jason Wang Thanks > --- > v1 -> v2: > - Check the No_Soft_Reset bit > >

Re: Re: Re: EEVDF/vhost regression (bisected to 86bfbb7ce4f6 sched/fair: Add lag based placement)

2023-12-10 Thread Jason Wang
On Sat, Dec 9, 2023 at 6:42 PM Michael S. Tsirkin wrote: > > On Fri, Dec 08, 2023 at 12:41:38PM +0100, Tobias Huschle wrote: > > On Fri, Dec 08, 2023 at 05:31:18AM -0500, Michael S. Tsirkin wrote: > > > On Fri, Dec 08, 2023 at 10:24:16AM +0100, Tobias Huschle wrote: > > > > On Thu, Dec 07, 2023

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-06 Thread Jason Wang
On Tue, Dec 5, 2023 at 7:35 PM Yunsheng Lin wrote: > > introduce vhost_net_test basing on virtio_test to test > vhost_net changing in the kernel. > > Signed-off-by: Yunsheng Lin > --- > tools/virtio/Makefile | 8 +- > tools/virtio/vhost_net_test.c | 441

Re: [PATCH net-next 4/6] vhost/net: remove vhost_net_page_frag_refill()

2023-12-06 Thread Jason Wang
st_net_test introduced in the > last patch. > > Signed-off-by: Yunsheng Lin > --- Acked-by: Jason Wang Thanks

Re: [PATCH net-next 5/6] net: introduce page_frag_cache_drain()

2023-12-06 Thread Jason Wang
On Tue, Dec 5, 2023 at 7:35 PM Yunsheng Lin wrote: > > When draining a page_frag_cache, most user are doing > the similar steps, so introduce an API to avoid code > duplication. > > Signed-off-by: Yunsheng Lin > --- For vhost part: Acked-by: Jason Wang Thanks

Re: [GIT PULL] virtio: features

2023-11-30 Thread Jason Wang
On Thu, Nov 30, 2023 at 5:44 PM Michael S. Tsirkin wrote: > > On Wed, Nov 29, 2023 at 06:20:31PM +0800, Jason Wang wrote: > > On Wed, Nov 29, 2023 at 6:12 PM Ning, Hongyu > > wrote: > > > > > > > > > On 2023/11/29 17:16, Jason Wang wrote: > &g

Re: [GIT PULL] virtio: features

2023-11-29 Thread Jason Wang
flag > >vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature > >vdpa: add get_backend_features vdpa operation > >vdpa_sim: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK > > > > Jason Wang (1): > >virtio_v

Re: [RFC v1 3/8] vhost: Add 3 new uapi to support iommufd

2023-11-09 Thread Jason Wang
On Wed, Nov 8, 2023 at 3:09 PM Jason Wang wrote: > > On Wed, Nov 8, 2023 at 2:39 PM Cindy Lu wrote: > > > > On Wed, Nov 8, 2023 at 11:03 AM Jason Wang wrote: > > > > > > On Tue, Nov 7, 2023 at 2:57 PM Cindy Lu wrote: > > > > > >

Re: [RFC v1 3/8] vhost: Add 3 new uapi to support iommufd

2023-11-07 Thread Jason Wang
On Wed, Nov 8, 2023 at 2:39 PM Cindy Lu wrote: > > On Wed, Nov 8, 2023 at 11:03 AM Jason Wang wrote: > > > > On Tue, Nov 7, 2023 at 2:57 PM Cindy Lu wrote: > > > > > > On Mon, Nov 6, 2023 at 3:30 PM Jason Wang wrote: > > > > > &

Re: [RFC v1 8/8] iommu: expose the function iommu_device_use_default_domain

2023-11-07 Thread Jason Wang
On Tue, Nov 7, 2023 at 2:10 PM Cindy Lu wrote: > > On Mon, Nov 6, 2023 at 3:26 PM Jason Wang wrote: > > > > On Sat, Nov 4, 2023 at 1:18 AM Cindy Lu wrote: > > > > > > Expose the function iommu_device_use_default_domain() and > > > iommu_device_

Re: [RFC v1 3/8] vhost: Add 3 new uapi to support iommufd

2023-11-07 Thread Jason Wang
On Tue, Nov 7, 2023 at 2:57 PM Cindy Lu wrote: > > On Mon, Nov 6, 2023 at 3:30 PM Jason Wang wrote: > > > > On Sat, Nov 4, 2023 at 1:17 AM Cindy Lu wrote: > > > > > > VHOST_VDPA_SET_IOMMU_FD: bind the device to iommufd device > > > > > &g

[PATCH] nvdimm/namespace: Fix comment typo

2022-08-02 Thread Jason Wang
The double `existing' is duplicated in the comment, remove one. Signed-off-by: Jason Wang --- drivers/nvdimm/namespace_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index dfade66bab73..c60ec0b373c5

[PATCH V3 2/2] virtio_pmem: set device ready in probe()

2022-06-28 Thread Jason Wang
by: Pankaj Gupta Signed-off-by: Jason Wang --- Changes since V2: - Tweak the change log Changes since v1: - Remove some comments per Dan --- drivers/nvdimm/virtio_pmem.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvdimm/virtio_pmem.c b/drivers/nvdimm/virtio_pmem.c index 48

[PATCH V3 1/2] virtio_pmem: initialize provider_data through nd_region_desc

2022-06-28 Thread Jason Wang
3/0x90 [ 92.408895] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 92.409257] RIP: 0033:0x7f3cd76c6c44 Fixes 6e84200c0a29 ("virtio-pmem: Add virtio pmem driver") Acked-by: Pankaj Gupta Reviewed-by: Dan Williams Signed-off-by: Jason Wang --- Changes since V1: - Add calltrace to explain the

Re: [PATCH V2 2/2] virtio_pmem: set device ready in probe()

2022-06-27 Thread Jason Wang
On Mon, Jun 27, 2022 at 4:00 PM Michael S. Tsirkin wrote: > > On Mon, Jun 27, 2022 at 02:29:41PM +0800, Jason Wang wrote: > > The NVDIMM region could be available before the virtio_device_ready() > > that is called by virtio_dev_probe(). This means the driver tries to >

[PATCH V2 2/2] virtio_pmem: set device ready in probe()

2022-06-27 Thread Jason Wang
ot;) Acked-by: Pankaj Gupta Signed-off-by: Jason Wang --- Changes since v1: - Remove some comments per Dan --- drivers/nvdimm/virtio_pmem.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvdimm/virtio_pmem.c b/drivers/nvdimm/virtio_pmem.c index 48f8327d0431..20da455d2ef6 100644 ---

[PATCH V2 1/2] virtio_pmem: initialize provider_data through nd_region_desc

2022-06-27 Thread Jason Wang
3/0x90 [ 92.408895] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 92.409257] RIP: 0033:0x7f3cd76c6c44 Fixes 6e84200c0a29 ("virtio-pmem: Add virtio pmem driver") Acked-by: Pankaj Gupta Reviewed-by: Dan Williams Signed-off-by: Jason Wang --- Changes since V1: - Add calltrace to explain the

Re: [PATCH V4 1/3] vDPA/ifcvf: deduce VIRTIO device ID when probe

2021-04-19 Thread Jason Wang
Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_base.h | 1 + drivers/vdpa/ifcvf/ifcvf_main.c | 27 +++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h index b2eeb16b9c2c

Re: [PATCH V3 3/3] vDPA/ifcvf: get_config_size should return dev specific config size

2021-04-18 Thread Jason Wang
在 2021/4/16 下午3:16, Zhu Lingshan 写道: get_config_size() should return the size based on the decected device type. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_main.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff

Re: [PATCH V3 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA

2021-04-18 Thread Jason Wang
在 2021/4/16 下午3:16, Zhu Lingshan 写道: This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-block for vDPA. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_base.h | 8 +++- drivers/vdpa/ifcvf/ifcvf_main.c | 19 ++- 2 files

Re: [PATCH V3 1/3] vDPA/ifcvf: deduce VIRTIO device ID when probe

2021-04-18 Thread Jason Wang
在 2021/4/16 下午3:16, Zhu Lingshan 写道: This commit deduces VIRTIO device ID as device type when probe, then ifcvf_vdpa_get_device_id() can simply return the ID. ifcvf_vdpa_get_features() and ifcvf_vdpa_get_config_size() can work properly based on the device ID. Signed-off-by: Zhu Lingshan ---

Re: [PATCH 3/3] vDPA/ifcvf: get_config_size should return dev specific config size

2021-04-15 Thread Jason Wang
在 2021/4/15 下午4:12, Stefano Garzarella 写道: On Wed, Apr 14, 2021 at 05:18:32PM +0800, Zhu Lingshan wrote: get_config_size() should return the size based on the decected device type. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_main.c | 11 ++- 1 file changed, 10

[PATCH 7/7] vp_vdpa: report doorbell address

2021-04-15 Thread Jason Wang
This patch reports the per vq doorbell location and size to vDPA bus. Userspace can then map the doorbell via mmap() via vhost-vDPA bus driver. Signed-off-by: Jason Wang --- drivers/vdpa/virtio_pci/vp_vdpa.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git

[PATCH 6/7] virtio-pci library: report resource address

2021-04-15 Thread Jason Wang
Sometimes it might be useful to report the capability physical address. One example is to report the physical address of the doorbell in order to be mapped by userspace. Signed-off-by: Jason Wang --- drivers/vdpa/virtio_pci/vp_vdpa.c | 3 ++- drivers/virtio/virtio_pci_modern.c | 2

[PATCH 5/7] virito_pci libray: hide vp_modern_map_capability()

2021-04-15 Thread Jason Wang
No user now and the capability should not be setup externally. Instead, every access to the capability should be done via virtio_pci_modern_device. Signed-off-by: Jason Wang --- drivers/virtio/virtio_pci_modern_dev.c | 10 -- include/linux/virtio_pci_modern.h | 5 - 2 files

[PATCH 4/7] virtio_pci_modern: hide vp_modern_get_queue_notify_off()

2021-04-15 Thread Jason Wang
All users (both virtio-pci library and vp_vdpa driver) has been switched to use vp_modern_map_vq_notify(). So there's no need to export the low level helper of vp_modern_get_queue_notify_off(). Signed-off-by: Jason Wang --- drivers/virtio/virtio_pci_modern_dev.c | 5 ++--- include/linux

[PATCH 3/7] vp_vdpa: switch to use vp_modern_map_vq_notify()

2021-04-15 Thread Jason Wang
This patch switches to use vp_vdpa to use vp_modern_map_notify(). Signed-off-by: Jason Wang --- drivers/vdpa/virtio_pci/vp_vdpa.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c b/drivers/vdpa/virtio_pci/vp_vdpa.c index

[PATCH 1/7] virtio_pci_modern: introduce helper to map vq notify area

2021-04-15 Thread Jason Wang
This patch factors out the logic of vq notify area mapping. Following patches will switch to use this common helpers for both virtio_pci library and virtio-pci vDPA driver. Signed-off-by: Jason Wang --- drivers/virtio/virtio_pci_modern_dev.c | 35 ++ include/linux

[PATCH 2/7] virtio-pci library: switch to use vp_modern_map_vq_notify()

2021-04-15 Thread Jason Wang
This patch switch to use vp_modern_map_notify() for virtio-pci library. Signed-off-by: Jason Wang --- drivers/virtio/virtio_pci_modern.c | 27 ++- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio

[PATCH 0/7] Doorbell mapping support for virito-pci vDPA

2021-04-15 Thread Jason Wang
Hi All: This series implements the doorbell mapping support for virtio-pci vDPA driver. Tested with page-per-vq=on in a nested guest. Please review Thanks Jason Wang (7): virtio_pci_modern: introduce helper to map vq notify area virtio-pci library: switch to use vp_modern_map_vq_notify

Re: [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA

2021-04-15 Thread Jason Wang
在 2021/4/15 下午2:41, Zhu Lingshan 写道: I think we've discussed this sometime in the past but what's the reason for such whitelist consider there's already a get_features() implemention? E.g Any reason to block VIRTIO_BLK_F_WRITE_ZEROS or VIRTIO_F_RING_PACKED? Thanks The reason is some

Re: [PATCH 1/3] vDPA/ifcvf: deduce VIRTIO device ID when probe

2021-04-15 Thread Jason Wang
在 2021/4/15 下午2:36, Zhu Lingshan 写道: On 4/15/2021 2:30 PM, Jason Wang wrote: 在 2021/4/15 下午1:52, Zhu Lingshan 写道: On 4/15/2021 11:30 AM, Jason Wang wrote: 在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit deduces VIRTIO device ID as device type when probe

Re: [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA

2021-04-15 Thread Jason Wang
在 2021/4/15 下午1:55, Zhu Lingshan 写道: On 4/15/2021 11:34 AM, Jason Wang wrote: 在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-block for vDPA. Signed-off-by: Zhu Lingshan ---   drivers/vdpa/ifcvf/ifcvf_base.h | 17 -   drivers

Re: [PATCH 1/3] vDPA/ifcvf: deduce VIRTIO device ID when probe

2021-04-15 Thread Jason Wang
在 2021/4/15 下午1:52, Zhu Lingshan 写道: On 4/15/2021 11:30 AM, Jason Wang wrote: 在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit deduces VIRTIO device ID as device type when probe, then ifcvf_vdpa_get_device_id() can simply return the ID. ifcvf_vdpa_get_features

Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver

2021-04-14 Thread Jason Wang
在 2021/3/23 下午10:19, Jie Deng 写道: Add an I2C bus driver for virtio para-virtualization. The controller can be emulated by the backend driver in any device model software by following the virtio protocol. The device specification can be found on

<    1   2   3   4   5   6   7   8   9   10   >