Re: [PATCH v2] Revert "virtio-blk: support completion batching for the IRQ path"

2023-06-21 Thread Michael S. Tsirkin
On Tue, Jun 20, 2023 at 10:54:19PM +, Edward Liaw wrote: > On Fri, Jun 09, 2023 at 03:27:24AM -0400, Michael S. Tsirkin wrote: > > This reverts commit 07b679f70d73483930e8d3c293942416d9cd5c13. > This commit was also breaking kernel tests on a virtual Android device > (cuttle

[GIT PULL] virtio: last minute revert

2023-06-21 Thread Michael S. Tsirkin
afd384f0dbea2229fd11159efb86a5b41051c4a9: Revert "virtio-blk: support completion batching for the IRQ path" (2023-06-21 04:14:28 -0400) virtio: bugfix A last minute revert to fix a regression. Signed-off-by: Michael

Re: [RFC PATCH net 0/3] virtio-net: allow usage of small vrings

2023-06-17 Thread Michael S. Tsirkin
On Sun, Apr 30, 2023 at 04:15:15PM +0300, Alvaro Karsz wrote: > At the moment, if a virtio network device uses vrings with less than > MAX_SKB_FRAGS + 2 entries, the device won't be functional. > > The following condition vq->num_free >= 2 + MAX_SKB_FRAGS will always > evaluate to false, leading t

Re: Can vhost translate to io_uring?

2023-06-14 Thread Michael S. Tsirkin
On Wed, Jun 14, 2023 at 01:02:58AM -0500, Eric W. Biederman wrote: > At a quick glance it looks like io_uring already supports the > functionality that vhost supports (which I think is networking and > scsi). There's vsock too. -- MST ___ Virtualizati

Re: Can vhost translate to io_uring?

2023-06-14 Thread Michael S. Tsirkin
On Wed, Jun 14, 2023 at 01:02:58AM -0500, Eric W. Biederman wrote: > > I am sad my idea for simplifying things did not work out. > > > Let's try an even bigger idea to reduce maintenance and simplify things. > > Could vhost depend on io_uring? > > Could vhost just be a translation layer of exi

[GIT PULL] virtio,vhost,vdpa: bugfixes

2023-06-09 Thread Michael S. Tsirkin
07496eeab577eef1d4912b3e1b502a2b52002ac3: tools/virtio: use canonical ftrace path (2023-06-09 12:08:08 -0400) virtio,vhost,vdpa: bugfixes A bunch of fixes all over the place Signed-off-by: Michael S. Tsirkin

Re: [PATCH 0/3] vDPA/ifcvf: enable virtio-net on Intel F2000X-PL

2023-06-09 Thread Michael S. Tsirkin
On Sat, Jun 10, 2023 at 12:21:57AM +0800, Zhu Lingshan wrote: > Hi > > This series enables vDPA/ifcvf support for virtio-net devices > on Intel F2000X-PL Infrastructure Processing Unit. > > Please help review Hard trouble applying - which tree is this against? > Thanks! > > Zhu Lingshan (3):

Re: [PATCH v2 2/4] vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature

2023-06-09 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 11:21:25AM +0200, Eugenio Pérez wrote: > Accepting VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature if > userland sets it. > > Signed-off-by: Eugenio Pérez > Acked-by: Shannon Nelson I don't get it, so all vdpa devices accept this automatically? Should this not be

Re: [PATCH v2] vdpa/vp_vdpa: Check queue number of vdpa device from add_config

2023-06-09 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 12:42:22AM +, Angus Chen wrote: > > > > -Original Message- > > From: Michael S. Tsirkin > > Sent: Friday, June 9, 2023 3:45 AM > > To: Angus Chen > > Cc: jasow...@redhat.com; virtualization@lists.linux-foundation.o

Re: [PATCH v2] Revert "virtio-blk: support completion batching for the IRQ path"

2023-06-09 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 09:49:18AM +, Roberts, Martin wrote: > OK, I didn't realise you had updated the patch; I only looked at the first > one. I think you did the same as me, just changed vbr->status to > virtblk_vbr_status(vbr), in virtblk_poll(). Yes exactly, though testing exactly what

Re: [PATCH 2/3] virtio_console: fixup potential cpu stall when free unused bufs

2023-06-09 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 09:18:16PM +0800, Xianting Tian wrote: > Cpu stall issue may happen if device is configured with multi queues > and large queue depth, so fix it. "may happen" is ambigous. So is this: "for virtio-net we were getting stall on CPU was observed message, this driver is similar

Re: [PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs

2023-06-09 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 04:05:57PM +0200, Greg KH wrote: > On Fri, Jun 09, 2023 at 09:49:39PM +0800, Xianting Tian wrote: > > > > 在 2023/6/9 下午9:41, Greg KH 写道: > > > On Fri, Jun 09, 2023 at 03:39:24PM +0200, Greg KH wrote: > > > > On Fri, Jun 09, 2023 at 09:18:15PM +0800, Xianting Tian wrote: > >

Re: [PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs

2023-06-09 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 09:18:15PM +0800, Xianting Tian wrote: > From: Xianting Tian > > Cpu stall issue may happen if device is configured with multi queues > and large queue depth, so fix it. > > Signed-off-by: Xianting Tian include a Fixes tag? > --- > drivers/crypto/virtio/virtio_crypto_

Re: [PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs

2023-06-09 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 09:18:15PM +0800, Xianting Tian wrote: > From: Xianting Tian > > Cpu stall issue may happen if device is configured with multi queues > and large queue depth, so fix it. What does "may happen" imply exactly? was this observed? > Signed-off-by: Xianting Tian > --- > dri

Re: [PATCH v2] Revert "virtio-blk: support completion batching for the IRQ path"

2023-06-09 Thread Michael S. Tsirkin
to hang it - I will let it run a bit > longer. > Martin Want to post the patch that works for you? > -Original Message- > From: Michael S. Tsirkin > Sent: Friday, June 9, 2023 8:27 AM > To: linux-ker...@vger.kernel.org > Cc: lkp ; Suwan Kim ; Roberts, Martin >

[PATCH v2] Revert "virtio-blk: support completion batching for the IRQ path"

2023-06-09 Thread Michael S. Tsirkin
://lore.kernel.org/oe-kbuild-all/202306090826.c1fzmdme-...@intel.com/ Cc: Suwan Kim Reported-by: "Roberts, Martin" Signed-off-by: Michael S. Tsirkin --- Since v1: fix build error Still completely untested as I'm traveling. Martin, Suwan, could you please test and report

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-09 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 10:16:50AM +0800, Jason Wang wrote: > On Thu, Jun 8, 2023 at 10:23 PM Michael S. Tsirkin wrote: > > > > On Thu, Jun 08, 2023 at 05:29:58PM +0800, Jason Wang wrote: > > > On Thu, Jun 8, 2023 at 5:21 PM Stefano Garzarella > > > wrote: >

[PATCH] Revert "virtio-blk: support completion batching for the IRQ path"

2023-06-08 Thread Michael S. Tsirkin
virtblk_request_done(req);//this never gets called... so blk_mq_add_to_batch() must always succeed } } } Perhaps you might like to fix/test/revert this change... Martin Reported-by: "Roberts, Marti

Re: [PATCH v2] vdpa/vp_vdpa: Check queue number of vdpa device from add_config

2023-06-08 Thread Michael S. Tsirkin
On Thu, Jun 08, 2023 at 05:01:24PM +0800, Angus Chen wrote: > When add virtio_pci vdpa device,check the vqs number of device cap > and max_vq_pairs from add_config. > Simply starting from failing if the provisioned #qp is not > equal to the one that hardware has. > > Signed-off-by: Angus Chen I

Re: [PATCH] vdpa/mlx5: Support interrupt bypassing

2023-06-08 Thread Michael S. Tsirkin
On Thu, Jun 08, 2023 at 04:25:55PM +, Dragos Tatulea wrote: > On Wed, 2023-06-07 at 22:00 +0300, Dragos Tatulea via Virtualization wrote: > > From: Eli Cohen > > > > Add support for generation of interrupts from the device directly to the > > VM to the VCPU thus avoiding the overhead on the h

Re: virtio-blk: support completion batching for the IRQ path - failure

2023-06-08 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 12:12:16AM +0900, Suwan Kim wrote: > On Thu, Jun 8, 2023 at 11:46 PM Michael S. Tsirkin wrote: > > > > On Thu, Jun 08, 2023 at 11:07:21PM +0900, Suwan Kim wrote: > > > On Thu, Jun 8, 2023 at 7:16 PM Roberts, Martin > > > wrote: > >

Re: virtio-blk: support completion batching for the IRQ path - failure

2023-06-08 Thread Michael S. Tsirkin
On Fri, Jun 09, 2023 at 12:12:16AM +0900, Suwan Kim wrote: > On Thu, Jun 8, 2023 at 11:46 PM Michael S. Tsirkin wrote: > > > > On Thu, Jun 08, 2023 at 11:07:21PM +0900, Suwan Kim wrote: > > > On Thu, Jun 8, 2023 at 7:16 PM Roberts, Martin > > > wrote: > >

Re: [PATCH 1/2] vhost: Fix crash during early vhost_transport_send_pkt calls

2023-06-08 Thread Michael S. Tsirkin
On Thu, Jun 08, 2023 at 10:39:41AM +0200, Stefano Garzarella wrote: > On Wed, Jun 07, 2023 at 02:23:37PM -0500, Mike Christie wrote: > > If userspace does VHOST_VSOCK_SET_GUEST_CID before VHOST_SET_OWNER we > > can race where: > > 1. thread0 calls vhost_transport_send_pkt -> vhost_work_queue > > 2.

Re: virtio-blk: support completion batching for the IRQ path - failure

2023-06-08 Thread Michael S. Tsirkin
t and regressions are bad. What do you suggest for now? If there's no better idea I'll send a revert patch and we'll see in the next linux version. > > > > > > > > -Original Message- > > From: Suwan Kim > > Sent: Wednesday, June 7, 2

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-08 Thread Michael S. Tsirkin
On Thu, Jun 08, 2023 at 05:29:58PM +0800, Jason Wang wrote: > On Thu, Jun 8, 2023 at 5:21 PM Stefano Garzarella wrote: > > > > On Thu, Jun 08, 2023 at 05:00:00PM +0800, Jason Wang wrote: > > >On Thu, Jun 8, 2023 at 4:00 PM Stefano Garzarella > > >wrote: > > >> > > >> On Thu, Jun 08, 2023 at 03:4

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-08 Thread Michael S. Tsirkin
On Thu, Jun 08, 2023 at 05:00:00PM +0800, Jason Wang wrote: > On Thu, Jun 8, 2023 at 4:00 PM Stefano Garzarella wrote: > > > > On Thu, Jun 08, 2023 at 03:46:00PM +0800, Jason Wang wrote: > > > > [...] > > > > >> > > > > I have a question though, what if down the road there > > >> > > > > is a new

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-08 Thread Michael S. Tsirkin
On Thu, Jun 08, 2023 at 03:46:00PM +0800, Jason Wang wrote: > On Thu, Jun 8, 2023 at 2:03 PM Michael S. Tsirkin wrote: > > > > On Thu, Jun 08, 2023 at 08:42:15AM +0800, Jason Wang wrote: > > > On Wed, Jun 7, 2023 at 5:43 PM Michael S. Tsirkin wrote: > > > > &

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-07 Thread Michael S. Tsirkin
On Thu, Jun 08, 2023 at 08:42:15AM +0800, Jason Wang wrote: > On Wed, Jun 7, 2023 at 5:43 PM Michael S. Tsirkin wrote: > > > > On Wed, Jun 07, 2023 at 10:39:15AM +0200, Stefano Garzarella wrote: > > > On Tue, Jun 6, 2023 at 2:58 PM Michael S. Tsirkin wrote: > > &g

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-07 Thread Michael S. Tsirkin
On Tue, Jun 06, 2023 at 12:09:11PM +0200, Stefano Garzarella wrote: > On Mon, Jun 05, 2023 at 05:44:50PM -0400, Michael S. Tsirkin wrote: > > On Mon, Jun 05, 2023 at 04:56:37PM +0200, Stefano Garzarella wrote: > > > On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wro

Re: vhost: Fix vhost_task regressions in 6.4-rc

2023-06-07 Thread Michael S. Tsirkin
On Wed, Jun 07, 2023 at 02:23:36PM -0500, Mike Christie wrote: > The following patches were made over Linus's tree which contains a > vhost change missing in mst's vhost branch. These patches fix two > issues caused by the vhost_task patches: > 1. I was setting dev->worker too early and this caused

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-06-07 Thread Michael S. Tsirkin
On Wed, Jun 07, 2023 at 05:08:59PM +0800, Liang Chen wrote: > On Tue, May 30, 2023 at 9:19 AM Liang Chen wrote: > > > > On Mon, May 29, 2023 at 5:55 PM Michael S. Tsirkin wrote: > > > > > > On Mon, May 29, 2023 at 03:27:56PM +0800, Liang Chen wrote: > &

Re: [PATCH vhost v10 00/10] virtio core prepares for AF_XDP

2023-06-07 Thread Michael S. Tsirkin
On Wed, Jun 07, 2023 at 07:05:11AM -0700, Christoph Hellwig wrote: > On Mon, Jun 05, 2023 at 09:58:21AM +0800, Xuan Zhuo wrote: > > On Fri, 2 Jun 2023 23:29:02 -0700, Jakub Kicinski wrote: > > > On Fri, 2 Jun 2023 17:21:56 +0800 Xuan Zhuo wrote: > > > > Thanks for the help from Christoph. > > > >

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-07 Thread Michael S. Tsirkin
On Wed, Jun 07, 2023 at 10:39:15AM +0200, Stefano Garzarella wrote: > On Tue, Jun 6, 2023 at 2:58 PM Michael S. Tsirkin wrote: > > > > On Tue, Jun 06, 2023 at 09:29:22AM +0800, Jason Wang wrote: > > > On Mon, Jun 5, 2023 at 10:58 PM Stefano Garzarella > > > wrot

Re: [PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls

2023-06-06 Thread Michael S. Tsirkin
On Tue, Jun 06, 2023 at 12:19:10PM -0500, Mike Christie wrote: > On 6/6/23 4:49 AM, Stefano Garzarella wrote: > > On Mon, Jun 05, 2023 at 01:57:30PM -0500, Mike Christie wrote: > >> If userspace does VHOST_VSOCK_SET_GUEST_CID before VHOST_SET_OWNER we > >> can race where: > >> 1. thread0 calls vhos

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-06 Thread Michael S. Tsirkin
On Tue, Jun 06, 2023 at 09:29:22AM +0800, Jason Wang wrote: > On Mon, Jun 5, 2023 at 10:58 PM Stefano Garzarella > wrote: > > > > On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wrote: > > >On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella w

Re: [PATCH net] virtio_net: use control_buf for coalesce params

2023-06-06 Thread Michael S. Tsirkin
cations coalescing support") > Reviewed-by: Shannon Nelson > Signed-off-by: Allen Hubbe > Signed-off-by: Brett Creeley Acked-by: Michael S. Tsirkin stable material too. > --- > drivers/net/virtio_net.c | 16 > 1 file changed, 8 insertions(+), 8 dele

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-05 Thread Michael S. Tsirkin
On Mon, Jun 05, 2023 at 04:56:37PM +0200, Stefano Garzarella wrote: > On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wrote: > > On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella wrote: > > > On Mon, Jun 05, 2023 at 09:00:25AM -0400, Michael S. Tsirkin wro

Re: [PATCH] vduse: avoid empty string for dev name

2023-06-05 Thread Michael S. Tsirkin
On Mon, Jun 05, 2023 at 06:48:43AM -0700, 赵盛 wrote: > Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace") Thanks! Just don't do the mangled text and avoid top-posting in the future. > From: "Michael S. Tsirkin" > Date: Mon, Jun 5, 20

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-05 Thread Michael S. Tsirkin
On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella wrote: > On Mon, Jun 05, 2023 at 09:00:25AM -0400, Michael S. Tsirkin wrote: > > On Mon, Jun 05, 2023 at 02:54:20PM +0200, Stefano Garzarella wrote: > > > On Mon, Jun 05, 2023 at 08:41:54AM -0400, Michael S. Tsirkin wro

Re: [PATCH] vduse: avoid empty string for dev name

2023-06-05 Thread Michael S. Tsirkin
1, 2023, 11:31 > Subject:  Re: [PATCH] vduse: avoid empty string for dev name > To: "Sheng Zhao" > Cc: "Michael S. Tsirkin", "Jason Wang", > "virtualization", "Xianjun Zeng"< > zengxian...@bytedance.com> > On Tue, May 30, 2023 at 1

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-05 Thread Michael S. Tsirkin
On Mon, Jun 05, 2023 at 02:54:20PM +0200, Stefano Garzarella wrote: > On Mon, Jun 05, 2023 at 08:41:54AM -0400, Michael S. Tsirkin wrote: > > On Mon, Jun 05, 2023 at 01:06:44PM +0200, Stefano Garzarella wrote: > > > vhost-vdpa IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-05 Thread Michael S. Tsirkin
On Mon, Jun 05, 2023 at 01:06:44PM +0200, Stefano Garzarella wrote: > vhost-vdpa IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE) > don't support packed virtqueue well yet, so let's filter the > VIRTIO_F_RING_PACKED feature for now in vhost_vdpa_get_features(). > > This way, even if the dev

Re: [PATCH vhost v10 10/10] virtio_net: support dma premapped

2023-06-04 Thread Michael S. Tsirkin
On Mon, Jun 05, 2023 at 10:10:44AM +0800, Xuan Zhuo wrote: > On Fri, 2 Jun 2023 23:31:52 -0700, Jakub Kicinski wrote: > > On Fri, 2 Jun 2023 17:22:06 +0800 Xuan Zhuo wrote: > > > drivers/net/virtio_net.c | 163 +-- > > > > ack for this going via the vhost tree,

Re: [PATCH vhost v10 07/10] virtio_ring: introduce helpers for premapped

2023-06-04 Thread Michael S. Tsirkin
On Mon, Jun 05, 2023 at 10:06:51AM +0800, Xuan Zhuo wrote: > On Sun, 4 Jun 2023 09:45:14 -0400, "Michael S. Tsirkin" > wrote: > > On Fri, Jun 02, 2023 at 05:22:03PM +0800, Xuan Zhuo wrote: > > > This patch introduces three helpers for premapped mode. > >

Re: [PATCH 1/1] virtio: move pci drivers files to a directory

2023-06-04 Thread Michael S. Tsirkin
On Mon, May 15, 2023 at 08:13:38PM +0300, Max Gurtovoy wrote: > The PCI transport drivers have many files under virtio directory. Move > them to a dedicated directory to ease on the subsystem maintenance. > > Reviewed-by: Parav Pandit > Signed-off-by: Max Gurtovoy The benefit here seems margina

Re: [PATCH vhost v10 07/10] virtio_ring: introduce helpers for premapped

2023-06-04 Thread Michael S. Tsirkin
On Fri, Jun 02, 2023 at 05:22:03PM +0800, Xuan Zhuo wrote: > This patch introduces three helpers for premapped mode. > > * virtqueue_get_buf_premapped > * virtqueue_detach_unused_buf_premapped > > The above helpers work like the non-premapped funcs. But a cursor is > passed. > > virtqueue_detach

Re: vhost stable branch

2023-06-02 Thread Michael S. Tsirkin
On Tue, May 30, 2023 at 10:19:18AM +, Dragos Tatulea wrote: > On Tue, 2023-05-23 at 07:45 -0400, Michael S. Tsirkin wrote: > > On Tue, May 23, 2023 at 08:38:47AM +, Dragos Tatulea wrote: > > > On Tue, 2023-05-23 at 04:18 -0400, Michael S. Tsirkin wrote: > > > &

Re: [PATCH] virtio-vdpa: Fix unchecked call to NULL set_vq_affinity

2023-06-02 Thread Michael S. Tsirkin
On Fri, May 12, 2023 at 04:55:38PM -0700, Shannon Nelson wrote: > On 5/12/23 6:30 AM, Michael S. Tsirkin wrote: > > > > On Fri, May 12, 2023 at 12:51:21PM +, Dragos Tatulea wrote: > > > On Thu, 2023-05-04 at 14:51 -0400, Michael S. Tsirkin wrote: > > > >

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

2023-06-02 Thread Michael S. Tsirkin
On Tue, Feb 07, 2023 at 08:08:43PM +0800, Nanyong Sun 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 corre

Re: [PATCH] scsi: virtio_scsi: Remove a useless function call

2023-06-02 Thread Michael S. Tsirkin
On Mon, May 29, 2023 at 09:35:08AM +0200, Christophe JAILLET wrote: > 'inq_result' is known to be NULL. There is no point calling kfree(). > > Signed-off-by: Christophe JAILLET Acked-by: Michael S. Tsirkin > --- > drivers/scsi/virtio_scsi.c | 4 +--- > 1 fil

Re: [PATCH v7 00/14] vhost: multiple worker support

2023-06-02 Thread Michael S. Tsirkin
Hi Mike, On Fri, Apr 28, 2023 at 11:35:20AM -0500, michael.chris...@oracle.com wrote: > The following patches were built over Linux's tree. They allow us to > support multiple vhost workers tasks per device. The design is a modified > version of Stefan's original idea where userspace has the kerne

Re: [PATCH vhost v10 06/10] virtio_ring: packed-detach: support return dma info to driver

2023-06-02 Thread Michael S. Tsirkin
On Fri, Jun 02, 2023 at 05:22:02PM +0800, Xuan Zhuo wrote: > Under the premapped mode, the driver needs to unmap the DMA address > after receiving the buffer. The virtio core records the DMA address, > so the driver needs a way to get the dma info from the virtio core. > > A straightforward approa

Re: [PATCH v2 2/3] vhost: support PACKED when setting-getting vring_base

2023-06-02 Thread Michael S. Tsirkin
On Thu, May 18, 2023 at 09:34:25AM +0200, Stefano Garzarella wrote: > I think we should do one of these things, though: > - mask VIRTIO_F_RING_PACKED in the stable kernels when > VHOST_GET_FEAETURES is called > - backport this patch on all stable kernels that support vhost-vdpa > > Maybe the last

Re: [RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2

2023-06-02 Thread Michael S. Tsirkin
On Mon, May 01, 2023 at 11:59:42AM +, Alvaro Karsz wrote: > > First up to 4k should not be a problem. Even jumbo frames e.g. 9k > > is highly likely to succeed. And a probe time which is often boot > > even 64k isn't a problem ... > > > > Hmm. We could allocate large buffers at probe time. Reu

Re: [RFC PATCH net 0/3] virtio-net: allow usage of small vrings

2023-06-02 Thread Michael S. Tsirkin
On Mon, May 01, 2023 at 11:41:44AM +, Alvaro Karsz wrote: > > > > Why the difference? > > > > > > > > > > Because the RING_SIZE < 4 case requires much more adjustments. > > > > > > * We may need to squeeze the virtio header into the headroom. > > > * We may need to squeeze the GSO header into t

Re: [PATCH v2 5/6] tools/virtio: use canonical ftrace path

2023-06-02 Thread Michael S. Tsirkin
On Wed, Feb 15, 2023 at 03:33:49PM -0700, Ross Zwisler wrote: > The canonical location for the tracefs filesystem is at /sys/kernel/tracing. > > But, from Documentation/trace/ftrace.rst: > > Before 4.1, all ftrace tracing control files were within the debugfs > file system, which is typically

Re: [PATCH v4 1/1] vringh: IOMEM support

2023-06-02 Thread Michael S. Tsirkin
On Fri, Jun 02, 2023 at 05:56:12PM +0800, kernel test robot wrote: > Hi Shunsuke, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on mst-vhost/linux-next] > [also build test WARNING on linus/master horms-ipvs/master v6.4-rc4 > next-20230602] > [If your pa

Re: [PATCH 1/1] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-01 Thread Michael S. Tsirkin
thread is no longer running. > > Removing the special case for coredump rendezvous requires either the > above fix needed for exec or moving the coredump rendezvous into > get_signal. > > Fixes: 6e890c5d5021 ("vhost: use vhost_tasks for worker threads") > Signed-o

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-31 Thread Michael S. Tsirkin
On Thu, Jun 01, 2023 at 09:27:08AM +0800, Jason Wang wrote: > On Wed, May 31, 2023 at 6:25 PM Michael S. Tsirkin wrote: > > > > On Wed, May 31, 2023 at 04:26:38PM +0800, Jason Wang wrote: > > > On Wed, May 31, 2023 at 3:36 PM Jason Wang wrote: > > > > >

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-31 Thread Michael S. Tsirkin
On Thu, Jun 01, 2023 at 09:12:53AM +0800, Jason Wang wrote: > On Wed, May 31, 2023 at 5:55 PM Michael S. Tsirkin wrote: > > > > On Wed, May 31, 2023 at 03:36:51PM +0800, Jason Wang wrote: > > > On Wed, May 31, 2023 at 1:50 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-31 Thread Michael S. Tsirkin
On Wed, May 31, 2023 at 04:26:38PM +0800, Jason Wang wrote: > On Wed, May 31, 2023 at 3:36 PM Jason Wang wrote: > > > > On Wed, May 31, 2023 at 1:50 PM Michael S. Tsirkin wrote: > > > > > > On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > &

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-31 Thread Michael S. Tsirkin
On Wed, May 31, 2023 at 03:36:51PM +0800, Jason Wang wrote: > On Wed, May 31, 2023 at 1:50 PM Michael S. Tsirkin wrote: > > > > On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > > > On Mon, May 29, 2023 at 6:03 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-30 Thread Michael S. Tsirkin
On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > On Mon, May 29, 2023 at 6:03 PM Michael S. Tsirkin wrote: > > > > On Mon, May 29, 2023 at 09:18:10AM +0800, Jason Wang wrote: > > > On Sun, May 28, 2023 at 3:57 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH v1] virtio-pci: Improve code style for including header files

2023-05-30 Thread Michael S. Tsirkin
On Tue, May 30, 2023 at 10:07:23AM -0400, Feng Liu wrote: > > > On 2023-05-30 a.m.7:27, Michael S. Tsirkin wrote: > > External email: Use caution opening links or attachments > > > > > > On Mon, May 29, 2023 at 02:17:29PM -0400, Feng Liu wrote: > > >

Re: [PATCH v1] virtio-pci: Improve code style for including header files

2023-05-30 Thread Michael S. Tsirkin
On Mon, May 29, 2023 at 02:17:29PM -0400, Feng Liu wrote: > Fix code style related to including header file. Include header files > before declaring macro definitions to avoid conflicts. > > Signed-off-by: Feng Liu > Reviewed-by: Jiri Pirko Which conflicts? These macros are there precisely to c

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread Michael S. Tsirkin
On Tue, May 30, 2023 at 12:30:06AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:933174ae28ba Merge tag 'spi-fix-v6.4-rc3' of git://git.ker.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=138d4ae528 > kernel

Re: [RFC] virtio-net: support modern-transtional devices

2023-05-29 Thread Michael S. Tsirkin
On Mon, May 29, 2023 at 09:13:09PM +0800, Zhu, Lingshan wrote: > > > On 5/29/2023 8:04 PM, Michael S. Tsirkin wrote: > > On Mon, May 29, 2023 at 06:41:54PM +0800, Zhu, Lingshan wrote: > > > > > > On 5/29/2023 6:12 PM, Michael S. Tsirkin wrote: > > >

Re: [RFC] virtio-net: support modern-transtional devices

2023-05-29 Thread Michael S. Tsirkin
On Mon, May 29, 2023 at 06:41:54PM +0800, Zhu, Lingshan wrote: > > > On 5/29/2023 6:12 PM, Michael S. Tsirkin wrote: > > On Mon, May 29, 2023 at 04:07:42PM +0800, Zhu, Lingshan wrote: > > > On 5/29/2023 2:38 PM, Michael S. Tsirkin wrote: > >

Re: [RFC] virtio-net: support modern-transtional devices

2023-05-29 Thread Michael S. Tsirkin
On Mon, May 29, 2023 at 04:07:42PM +0800, Zhu, Lingshan wrote: > > > On 5/29/2023 2:38 PM, Michael S. Tsirkin wrote: > > On Mon, May 29, 2023 at 02:19:36PM +0800, Zhu, Lingshan wrote: > > > > > > On 5/28/2023 7:28 PM, Michael S. Tsirkin wrote: > > >

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-29 Thread Michael S. Tsirkin
On Mon, May 29, 2023 at 09:18:10AM +0800, Jason Wang wrote: > On Sun, May 28, 2023 at 3:57 PM Michael S. Tsirkin wrote: > > > > On Fri, May 26, 2023 at 02:30:41PM +0800, Jason Wang wrote: > > > This patch validate > > > > validates > > > >

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-29 Thread Michael S. Tsirkin
On Mon, May 29, 2023 at 03:27:56PM +0800, Liang Chen wrote: > On Sun, May 28, 2023 at 2:20 PM Michael S. Tsirkin wrote: > > > > On Fri, May 26, 2023 at 01:46:18PM +0800, Liang Chen wrote: > > > The implementation at the moment uses one page per packet in both the >

Re: [RFC] virtio-net: support modern-transtional devices

2023-05-28 Thread Michael S. Tsirkin
On Mon, May 29, 2023 at 02:19:36PM +0800, Zhu, Lingshan wrote: > > > On 5/28/2023 7:28 PM, Michael S. Tsirkin wrote: > > On Sat, May 27, 2023 at 02:15:42AM +0800, Zhu Lingshan wrote: > > > Current virtio-net only probes a device with VIRITO_ID_NET == 1. > > >

Re: [PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 09:31:34AM +0800, Jason Wang wrote: > On Thu, May 25, 2023 at 3:41 PM Michael S. Tsirkin wrote: > > > > On Thu, May 25, 2023 at 11:43:34AM +0800, Jason Wang wrote: > > > On Wed, May 24, 2023 at 5:15 PM Michael S. Tsirkin > > > wrote: >

Re: [RFC] virtio-net: support modern-transtional devices

2023-05-28 Thread Michael S. Tsirkin
On Sat, May 27, 2023 at 02:15:42AM +0800, Zhu Lingshan wrote: > Current virtio-net only probes a device with VIRITO_ID_NET == 1. > > For a modern-transtional virtio-net device which has a transtional > device id 0x1000 and acts as a modern device, current virtio-pci > modern driver will assign the

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 02:30:41PM +0800, Jason Wang wrote: > This patch validate validates > the used buffer length provided by the device > before trying to use it. before returning it to caller > This is done by remembering the in buffer > length in a dedicated array during virtqueue_add(),

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-27 Thread Michael S. Tsirkin
On Sat, May 27, 2023 at 08:35:01PM +0800, Liang Chen wrote: > On Fri, May 26, 2023 at 2:51 PM Jason Wang wrote: > > > > On Fri, May 26, 2023 at 1:46 PM Liang Chen > > wrote: > > > > > > The implementation at the moment uses one page per packet in both the > > > normal and XDP path. > > > > It's

Re: [PATCH net-next 1/5] virtio_net: Fix an unsafe reference to the page chain

2023-05-27 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 02:38:54PM +0800, Jason Wang wrote: > On Fri, May 26, 2023 at 1:46 PM Liang Chen wrote: > > > > "private" of buffer page is currently used for big mode to chain pages. > > But in mergeable mode, that offset of page could mean something else, > > e.g. when page_pool page is

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-27 Thread Michael S. Tsirkin
On Sat, May 27, 2023 at 12:11:25AM +0800, kernel test robot wrote: > Hi Liang, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on net-next/main] > > url: > https://github.com/intel-lab-lkp/linux/commits/Liang-Chen/virtio_net-Add-page_pool-support-to-impro

Re: [PATCH net-next 3/5] virtio_net: Add page pool fragmentation support

2023-05-27 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 01:46:19PM +0800, Liang Chen wrote: > To further enhance performance, implement page pool fragmentation > support and introduce a module parameter to enable or disable it. > > In single-core vm testing environments, there is an additional performance > gain observed in the

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-27 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 01:46:18PM +0800, Liang Chen wrote: > The implementation at the moment uses one page per packet in both the > normal and XDP path. In addition, introducing a module parameter to enable > or disable the usage of page pool (disabled by default). > > In single-core vm testing

Re: [PATCH net-next 1/5] virtio_net: Fix an unsafe reference to the page chain

2023-05-27 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 01:46:17PM +0800, Liang Chen wrote: > "private" of buffer page is currently used for big mode to chain pages. > But in mergeable mode, that offset of page could mean something else, > e.g. when page_pool page is used instead. So excluding mergeable mode to > avoid such a pro

Re: [PATCH 0/3] vhost-scsi: Fix IO hangs when using windows

2023-05-25 Thread Michael S. Tsirkin
On Wed, May 24, 2023 at 06:34:04PM -0500, Mike Christie wrote: > The following patches were made over Linus's tree and fix an issue > where windows guests will send iovecs with offset/lengths that result > in IOs that are not aligned to 512. The LIO layer will then send them > to Linux's block laye

Re: [PATCH 1/3] vhost-scsi: Fix alignment handling with windows

2023-05-25 Thread Michael S. Tsirkin
On Wed, May 24, 2023 at 06:34:05PM -0500, Mike Christie wrote: > The linux block layer requires bios/requests to have lengths with a 512 > byte alignment. Some drivers/layers like dm-crypt and the directi IO code > will test for it and just fail. Other drivers like SCSI just assume the > requiremen

Re: [PATCH] tools/virtio: Add .gitignore to ringtest

2023-05-25 Thread Michael S. Tsirkin
Subject should be "for ringtest" not "to ringtest". On Wed, May 24, 2023 at 08:36:12PM +0800, Rong Tao wrote: > From: Rong Tao > > Ignore executions for ringtest. > > Signed-off-by: Rong Tao > --- > tools/virtio/ringtest/.gitignore | 7 +++ > 1 file changed, 7 insertions(+) > create mo

Re: [PATCH] tools/virtio: Add .gitignore to ringtest

2023-05-25 Thread Michael S. Tsirkin
On Wed, May 24, 2023 at 08:36:12PM +0800, Rong Tao wrote: > From: Rong Tao > > Ignore executions for ringtest. I think you mean "executables". > > Signed-off-by: Rong Tao > --- > tools/virtio/ringtest/.gitignore | 7 +++ > 1 file changed, 7 insertions(+) > create mode 100644 tools/virti

Re: [PATCH] tools/virtio: Add .gitignore to ringtest

2023-05-25 Thread Michael S. Tsirkin
On Wed, May 24, 2023 at 08:36:12PM +0800, Rong Tao wrote: > From: Rong Tao > > Ignore executions for ringtest. > > Signed-off-by: Rong Tao > --- > tools/virtio/ringtest/.gitignore | 7 +++ > 1 file changed, 7 insertions(+) > create mode 100644 tools/virtio/ringtest/.gitignore > > diff --

Re: [PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-25 Thread Michael S. Tsirkin
On Thu, May 25, 2023 at 11:43:34AM +0800, Jason Wang wrote: > On Wed, May 24, 2023 at 5:15 PM Michael S. Tsirkin wrote: > > > > On Wed, May 24, 2023 at 04:18:41PM +0800, Jason Wang wrote: > > > This patch convert rx mode setting to be done in a workqueue, this is > &g

Re: [PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-24 Thread Michael S. Tsirkin
On Wed, May 24, 2023 at 04:18:41PM +0800, Jason Wang wrote: > This patch convert rx mode setting to be done in a workqueue, this is > a must for allow to sleep when waiting for the cvq command to > response since current code is executed under addr spin lock. > > Signed-off-by: Jason Wang > --- >

Re: vhost stable branch

2023-05-23 Thread Michael S. Tsirkin
On Tue, May 23, 2023 at 08:38:47AM +, Dragos Tatulea wrote: > On Tue, 2023-05-23 at 04:18 -0400, Michael S. Tsirkin wrote: > > On Tue, May 23, 2023 at 07:16:58AM +, Dragos Tatulea wrote: > > > Hi, > > > > > > I am looking for the stable branch

Re: vhost stable branch

2023-05-23 Thread Michael S. Tsirkin
On Tue, May 23, 2023 at 07:16:58AM +, Dragos Tatulea wrote: > Hi, > > I am looking for the stable branch for vdpa fixes in the vhost tree [1]. There > are 3 branches that seem identical: linux-next, test and vhost. linux-next > seems > to be -next branch. Which one would be the stable branch?

Re: vhost stable branch

2023-05-23 Thread Michael S. Tsirkin
On Tue, May 23, 2023 at 07:16:58AM +, Dragos Tatulea wrote: > Hi, > > I am looking for the stable branch for vdpa fixes in the vhost tree [1]. There > are 3 branches that seem identical: linux-next, test and vhost. linux-next > seems > to be -next branch. Which one would be the stable branch?

Re: [PATCH vhost v9 04/12] virtio_ring: virtqueue_add() support premapped

2023-05-23 Thread Michael S. Tsirkin
On Mon, May 22, 2023 at 11:03:26PM -0700, Christoph Hellwig wrote: > On Wed, May 17, 2023 at 10:22:41AM +0800, Xuan Zhuo wrote: > > virtuque_add() adds parameter premapped. > > Well, I can see that. But why? Assuming it's intentional, it should say something along the lines of "The parameter is

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-22 Thread Michael S. Tsirkin
On Sun, May 21, 2023 at 09:51:24PM -0500, Mike Christie wrote: > When switching from kthreads to vhost_tasks two bugs were added: > 1. The vhost worker tasks's now show up as processes so scripts doing ps > or ps a would not incorrectly detect the vhost task as another process. > 2. kthreads disabl

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-18 Thread Michael S. Tsirkin
On Thu, May 18, 2023 at 08:22:14PM +0800, Xuan Zhuo wrote: > On Thu, 18 May 2023 05:49:46 -0400, "Michael S. Tsirkin" > wrote: > > On Thu, May 18, 2023 at 05:14:03PM +0800, Xuan Zhuo wrote: > > > On Thu, 18 May 2023 16:57:37 +0800, Jason Wang > > >

Re: [PATCH vhost v9 10/12] virtio_ring: correct the expression of the description of virtqueue_resize()

2023-05-18 Thread Michael S. Tsirkin
On Thu, May 18, 2023 at 08:12:50PM +0800, Xuan Zhuo wrote: > On Wed, 17 May 2023 10:22:47 +0800, Xuan Zhuo > wrote: > > Modify the "useless" to a more accurate "unused". > > > > Signed-off-by: Xuan Zhuo > > Acked-by: Jason Wang > > > Hi Michael, > > Currently, we have to discuss a few cases

Re: Re: Re: [PATCH v2 1/2] virtio: abstract virtqueue related methods

2023-05-18 Thread Michael S. Tsirkin
On Thu, May 18, 2023 at 08:47:22AM +0800, zhenwei pi wrote: > On 5/17/23 18:39, Michael S. Tsirkin wrote: > > On Wed, May 17, 2023 at 04:35:55PM +0800, zhenwei pi wrote: > > > > > > > > > On 5/17/23 15:46, Christoph Hellwig wrote: > > > > On W

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-18 Thread Michael S. Tsirkin
On Thu, May 18, 2023 at 05:14:03PM +0800, Xuan Zhuo wrote: > On Thu, 18 May 2023 16:57:37 +0800, Jason Wang wrote: > > On Thu, May 18, 2023 at 4:29 PM Michael S. Tsirkin wrote: > > > > > > On Thu, May 18, 2023 at 03:33:52PM +0800, Xuan Zhuo wrote: > > >

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-18 Thread Michael S. Tsirkin
On Thu, May 18, 2023 at 04:57:37PM +0800, Jason Wang wrote: > On Thu, May 18, 2023 at 4:29 PM Michael S. Tsirkin wrote: > > > > On Thu, May 18, 2023 at 03:33:52PM +0800, Xuan Zhuo wrote: > > > On Thu, 18 May 2023 03:11:25 -0400, "Michael S. Tsirkin" > > &

Re: [PATCH v2 2/3] vhost: support PACKED when setting-getting vring_base

2023-05-18 Thread Michael S. Tsirkin
On Thu, May 18, 2023 at 04:59:17PM +0800, Jason Wang wrote: > On Thu, May 18, 2023 at 4:38 PM Michael S. Tsirkin wrote: > > > > On Thu, May 18, 2023 at 03:52:10PM +0800, Jason Wang wrote: > > > On Thu, May 18, 2023 at 3:34 PM Stefano Garzarella > > > wrote: >

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-18 Thread Michael S. Tsirkin
On Thu, May 18, 2023 at 04:50:35PM +0800, Xuan Zhuo wrote: > On Thu, 18 May 2023 04:29:01 -0400, "Michael S. Tsirkin" > wrote: > > On Thu, May 18, 2023 at 03:33:52PM +0800, Xuan Zhuo wrote: > > > On Thu, 18 May 2023 03:11:25 -0400, "Michael S. Tsirkin" &

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