Re: [RFC v1 0/8] vhost-vdpa: add support for iommufd

2023-11-07 Thread Michael S. Tsirkin
On Tue, Nov 07, 2023 at 11:48:48AM -0400, Jason Gunthorpe wrote: > On Tue, Nov 07, 2023 at 09:55:26AM -0500, Michael S. Tsirkin wrote: > > On Tue, Nov 07, 2023 at 08:49:02AM -0400, Jason Gunthorpe wrote: > > > IMHO, this patch series needs to spend more time internally to Re

Re: [RFC v1 0/8] vhost-vdpa: add support for iommufd

2023-11-07 Thread Michael S. Tsirkin
On Tue, Nov 07, 2023 at 08:49:02AM -0400, Jason Gunthorpe wrote: > IMHO, this patch series needs to spend more time internally to Red Hat > before it is presented to the community. Just to add an example why I think this "internal review" is a bad idea I seem to recall that someone internal to

Re: [RFC v1 0/8] vhost-vdpa: add support for iommufd

2023-11-07 Thread Michael S. Tsirkin
On Tue, Nov 07, 2023 at 10:12:37AM -0400, Jason Gunthorpe wrote: > Big company's should take the responsibility to train and provide > skill development for their own staff. That would result in a beautiful cathedral of a patch. I know this is how some companies work. We are doing more of a

Re: [RFC v1 0/8] vhost-vdpa: add support for iommufd

2023-11-07 Thread Michael S. Tsirkin
On Tue, Nov 07, 2023 at 08:49:02AM -0400, Jason Gunthorpe wrote: > On Tue, Nov 07, 2023 at 02:30:34AM -0500, Michael S. Tsirkin wrote: > > On Sat, Nov 04, 2023 at 01:16:33AM +0800, Cindy Lu wrote: > > > > > > Hi All > > > This code provides the iommufd sup

Re: [RFC v1 0/8] vhost-vdpa: add support for iommufd

2023-11-07 Thread Michael S. Tsirkin
On Sat, Nov 04, 2023 at 01:16:33AM +0800, Cindy Lu wrote: > Test passed in the physical device (vp_vdpa), but there are still some > problems in the emulated device (vdpa_sim_net), I'm not sure there's even value in bothering with iommufd for the simulator. Just find a way to disable it and

Re: [RFC v1 0/8] vhost-vdpa: add support for iommufd

2023-11-06 Thread Michael S. Tsirkin
On Sat, Nov 04, 2023 at 01:16:33AM +0800, Cindy Lu wrote: > > Hi All > This code provides the iommufd support for vdpa device > This code fixes the bugs from the last version and also add the asid support. > rebase on kernel > v6,6-rc3 > Test passed in the physical device (vp_vdpa), but there

[GIT PULL] vhost,virtio,vdpa: features, fixes, cleanups

2023-11-05 Thread Michael S. Tsirkin
for vq descriptor mappings decouple reset of iotlb mapping from device reset fixes, cleanups all over the place Signed-off-by: Michael S. Tsirkin Dragos Tatulea (14): vdpa/mlx5: Expose descriptor group mkey hw

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-11-03 Thread Michael S. Tsirkin
On Fri, Nov 03, 2023 at 08:55:19AM +0100, Maxime Coquelin wrote: > > > On 11/2/23 19:59, Michael S. Tsirkin wrote: > > On Thu, Nov 02, 2023 at 06:56:59PM +0100, Maxime Coquelin wrote: > > > > > > > > > On 10/24/23 17:30, Casey Schaufler wrote: >

Re: [PATCH V2 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-11-03 Thread Michael S. Tsirkin
On Fri, Nov 03, 2023 at 08:33:06AM +0800, kernel test robot wrote: > Hi Yishai, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on awilliam-vfio/for-linus] > [also build test WARNING on linus/master v6.6] > [cannot apply to awilliam-vfio/next

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-11-02 Thread Michael S. Tsirkin
On Thu, Nov 02, 2023 at 06:56:59PM +0100, Maxime Coquelin wrote: > > > On 10/24/23 17:30, Casey Schaufler wrote: > > On 10/24/2023 2:49 AM, Maxime Coquelin wrote: > > > > > > > > > On 10/23/23 17:13, Casey Schaufler wrote: > > > > On 10/23/2023 12:28 AM, Maxime Coquelin wrote: > > > > > > > >

Re: virtcrypto_dataq_callback calls crypto_finalize_request() from irq context

2023-11-02 Thread Michael S. Tsirkin
On Thu, Nov 02, 2023 at 01:04:07PM +, Gonglei (Arei) wrote: > > > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Wednesday, November 1, 2023 9:26 PM > > To: Halil Pasic > > Cc: Gonglei (Arei) ; Herbert Xu &

Re: [RFC 0/7] vdpa: Add support for iommufd

2023-11-02 Thread Michael S. Tsirkin
On Thu, Oct 26, 2023 at 02:48:07PM +0800, Cindy Lu wrote: > On Thu, Oct 26, 2023 at 2:42 PM Michael S. Tsirkin wrote: > > > > On Sun, Sep 24, 2023 at 01:05:33AM +0800, Cindy Lu wrote: > > > Hi All > > > Really apologize for the delay, this is the draft RFC f

Re: virtcrypto_dataq_callback calls crypto_finalize_request() from irq context

2023-11-01 Thread Michael S. Tsirkin
On Sun, Sep 24, 2023 at 07:39:41PM +0200, Halil Pasic wrote: > On Sun, 24 Sep 2023 11:56:25 + > "Gonglei (Arei)" wrote: > > > Hi Halil, > > > > Commit 4058cf08945 introduced a check for detecting crypto completion > > function > > called with enable BH, and indeed the virtio-crypto driver

Re: [PATCH 0/2] vdpa: Add logging operatins

2023-11-01 Thread Michael S. Tsirkin
On Mon, Sep 11, 2023 at 02:56:58PM +0800, Jason Wang wrote: > Adding Eugenio and Si Wei. > > On Sat, Aug 26, 2023 at 9:24 AM Jiang Dongxu wrote: > > > > From: jiangdongxu > > > > Currently, the vdpa device supports suspend and resume operations. > > To support vdpa device live migration, we

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-11-01 Thread Michael S. Tsirkin
On Wed, Nov 01, 2023 at 05:40:30PM +0800, Heng Qi wrote: > > > 在 2023/10/25 下午1:49, Michael S. Tsirkin 写道: > > On Thu, Oct 12, 2023 at 03:44:04PM +0800, Heng Qi wrote: > > > Now, virtio-net already supports per-queue moderation parameter > > > setting. Based o

Re: [PATCH net-XXX] vhost-vdpa: fix use after free in vhost_vdpa_probe()

2023-10-31 Thread Michael S. Tsirkin
On Fri, Oct 27, 2023 at 03:12:54PM +0300, Dan Carpenter wrote: > The put_device() calls vhost_vdpa_release_dev() which calls > ida_simple_remove() and frees "v". So this call to > ida_simple_remove() is a use after free and a double free. > > Fixes: ebe6a354fa7e ("vhost-vdpa: Call

[PATCH] virtio_pci: move structure to a header

2023-10-31 Thread Michael S. Tsirkin
. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_pci_modern_dev.c | 7 --- include/linux/virtio_pci_modern.h | 7 --- include/uapi/linux/virtio_pci.h| 11 +++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/virtio

Re: [PATCH V2 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-10-31 Thread Michael S. Tsirkin
On Tue, Oct 31, 2023 at 10:30:41AM +0200, Yishai Hadas wrote: > > And further, is caller expected not to invoke several of these > > in parallel on the same device? If yes this needs to be > > documented. I don't see where does vfio enforce this if yes. > Please have a look at

Re: [PATCH V2 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-31 Thread Michael S. Tsirkin
On Tue, Oct 31, 2023 at 04:17:45PM +0800, Yi Liu wrote: > a dumb question. Is it common between all virtio devices that the legay > interface is in BAR0? It has to be, that is where the legacy driver is looking for it. ___ Virtualization mailing list

Re: [PATCH V2 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-10-31 Thread Michael S. Tsirkin
On Sun, Oct 29, 2023 at 05:59:49PM +0200, Yishai Hadas wrote: > Introduce APIs to execute legacy IO admin commands. > > It includes: io_legacy_read/write for both common and the device > registers, io_legacy_notify_info. > > In addition, exposing an API to check whether the legacy IO commands

Re: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-31 Thread Michael S. Tsirkin
On Tue, Oct 31, 2023 at 03:11:57AM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Tuesday, October 31, 2023 5:02 AM > > > > On Mon, Oct 30, 2023 at 06:10:06PM +, Parav Pandit wrote: > > > > > > > > > > From

Re: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Michael S. Tsirkin
On Mon, Oct 30, 2023 at 06:10:06PM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Monday, October 30, 2023 9:29 PM > > On Mon, Oct 30, 2023 at 03:51:40PM +, Parav Pandit wrote: > > > > > > > > > > From: Michael S

Re: [PATCH V2 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-10-30 Thread Michael S. Tsirkin
On Mon, Oct 30, 2023 at 06:06:45PM +0200, Yishai Hadas wrote: > On 30/10/2023 17:57, Michael S. Tsirkin wrote: > > On Mon, Oct 30, 2023 at 05:27:50PM +0200, Yishai Hadas wrote: > > > On 29/10/2023 22:17, Michael S. Tsirkin wrote: > > > > On Sun, Oct 29, 2023 at 05:59:

Re: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Michael S. Tsirkin
On Mon, Oct 30, 2023 at 03:51:40PM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Monday, October 30, 2023 1:53 AM > > > > On Sun, Oct 29, 2023 at 05:59:45PM +0200, Yishai Hadas wrote: > > > From: Feng Liu > > >

Re: [PATCH V2 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-10-30 Thread Michael S. Tsirkin
On Mon, Oct 30, 2023 at 05:27:50PM +0200, Yishai Hadas wrote: > On 29/10/2023 22:17, Michael S. Tsirkin wrote: > > On Sun, Oct 29, 2023 at 05:59:48PM +0200, Yishai Hadas wrote: > > > Initialize the supported admin commands upon activating the admin queue. > > > &

Re: [PATCH V2 vfio 3/9] virtio-pci: Introduce admin command sending function

2023-10-29 Thread Michael S. Tsirkin
On Sun, Oct 29, 2023 at 05:59:46PM +0200, Yishai Hadas wrote: > From: Feng Liu > > Add support for sending admin command through admin virtqueue interface. > Abort any inflight admin commands once device reset completes. > > To enforce the below statement from the specification [1], the admin >

Re: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-29 Thread Michael S. Tsirkin
On Sun, Oct 29, 2023 at 05:59:45PM +0200, Yishai Hadas wrote: > From: Feng Liu > > Introduce support for the admin virtqueue. By negotiating > VIRTIO_F_ADMIN_VQ feature, driver detects capability and creates one > administration virtqueue. Administration virtqueue implementation in > virtio pci

Re: [PATCH V2 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-10-29 Thread Michael S. Tsirkin
On Sun, Oct 29, 2023 at 05:59:48PM +0200, Yishai Hadas wrote: > Initialize the supported admin commands upon activating the admin queue. > > The supported commands are saved as part of the admin queue context, it > will be used by the next patches from this series. > > Note: > As we don't want

Re: [PATCH v4] ALSA: virtio: use ack callback

2023-10-27 Thread Michael S. Tsirkin
the available ring. > > > > > > Co-developed-by: Anton Yakovlev > > > Signed-off-by: Anton Yakovlev > > > Signed-off-by: Matias Ezequiel Vara Larsen > > > > Applied now to for-next branch. > > Cool, thanks for that! > > I just w

Re: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-26 Thread Michael S. Tsirkin
On Thu, Oct 26, 2023 at 11:55:39AM -0600, Alex Williamson wrote: > On Thu, 26 Oct 2023 15:08:12 +0300 > Yishai Hadas wrote: > > > On 25/10/2023 22:13, Alex Williamson wrote: > > > On Wed, 25 Oct 2023 17:35:51 +0300 > > > Yishai Hadas wrote: > > > > > >> On 24/10/2023 22:57, Alex Williamson

Re: [PATCH v2] virtio_pci: Switch away from deprecated irq_set_affinity_hint

2023-10-26 Thread Michael S. Tsirkin
On Thu, Oct 26, 2023 at 06:25:08PM +0200, Jakub Sitnicki wrote: > On Wed, Oct 25, 2023 at 04:53 PM +02, Jakub Sitnicki wrote: > > Since commit 65c7cdedeb30 ("genirq: Provide new interfaces for affinity > > hints") irq_set_affinity_hint is being phased out. > > > > Switch to new interfaces for

Re: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-26 Thread Michael S. Tsirkin
On Thu, Oct 26, 2023 at 03:09:13PM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > Sent: Thursday, October 26, 2023 8:36 PM > > > > On Thu, Oct 26, 2023 at 01:28:18PM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirki

Re: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-26 Thread Michael S. Tsirkin
On Thu, Oct 26, 2023 at 01:28:18PM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > Sent: Thursday, October 26, 2023 6:45 PM > > > > Followed by an open coded driver check for 0x1000 to 0x103f range. > > > Do you mean windows driver expects sp

Re: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-26 Thread Michael S. Tsirkin
On Thu, Oct 26, 2023 at 12:40:04PM +, Parav Pandit wrote: > > From: Michael S. Tsirkin > > Sent: Thursday, October 26, 2023 5:42 PM > > > > On Thu, Oct 26, 2023 at 03:08:12PM +0300, Yishai Hadas wrote: > > > > > Makes sense ? > > > >

Re: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-26 Thread Michael S. Tsirkin
On Thu, Oct 26, 2023 at 03:08:12PM +0300, Yishai Hadas wrote: > > > Makes sense ? > > So do I understand correctly that virtio dictates the subsystem device > > ID for all subsystem vendor IDs that implement a legacy virtio > > interface? Ok, but this device didn't actually implement a legacy > >

Re: [PATCH v5 0/7] vdpa: decouple reset of iotlb mapping from device reset

2023-10-26 Thread Michael S. Tsirkin
On Thu, Oct 26, 2023 at 12:14:33AM -0700, Si-Wei Liu wrote: > In order to reduce needlessly high setup and teardown cost > of iotlb mapping during live migration, it's crucial to > decouple the vhost-vdpa iotlb abstraction from the virtio > device life cycle, i.e. iotlb mappings should be left >

Re: [RFC 0/7] vdpa: Add support for iommufd

2023-10-26 Thread Michael S. Tsirkin
On Thu, Oct 26, 2023 at 02:48:07PM +0800, Cindy Lu wrote: > On Thu, Oct 26, 2023 at 2:42 PM Michael S. Tsirkin wrote: > > > > On Sun, Sep 24, 2023 at 01:05:33AM +0800, Cindy Lu wrote: > > > Hi All > > > Really apologize for the delay, this is the draft RFC f

Re: [RFC 0/7] vdpa: Add support for iommufd

2023-10-26 Thread Michael S. Tsirkin
On Sun, Sep 24, 2023 at 01:05:33AM +0800, Cindy Lu wrote: > Hi All > Really apologize for the delay, this is the draft RFC for > iommufd support for vdpa, This code provides the basic function > for iommufd support > > The code was tested and passed in device vdpa_sim_net > The qemu code is >

Re: [PATCH] vhost-vdpa: fix use-after-free in _compat_vdpa_reset

2023-10-25 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 04:13:14PM -0700, Si-Wei Liu wrote: > When the vhost-vdpa device is being closed, vhost_vdpa_cleanup() doesn't > clean up the vqs pointer after free. This could lead to use-after-tree > when _compat_vdpa_reset() tries to access the vqs that are freed already. > Fix is to

Re: [PATCH V1 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-10-25 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 05:03:55PM +0300, Yishai Hadas wrote: > > Yes - I think some kind of API will be needed to setup/cleanup. > > Then 1st call to setup would do the list/use dance? some ref counting? > > OK, we may work to come in V2 with that option in place. > > Please note that the

Re: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-25 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 05:35:51PM +0300, Yishai Hadas wrote: > > Do we want to make this only probe the correct subsystem vendor ID or do > > we want to emulate the subsystem vendor ID as well? I don't see this is > > correct without one of those options. > > Looking in the 1.x spec we can see

Re: [PATCH V1 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-10-25 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 04:00:43PM +0300, Yishai Hadas wrote: > On 25/10/2023 13:17, Michael S. Tsirkin wrote: > > On Wed, Oct 25, 2023 at 12:18:32PM +0300, Yishai Hadas wrote: > > > On 25/10/2023 0:01, Michael S. Tsirkin wrote: > > > > > > On Tue, Oct

Re: [PATCH V1 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-10-25 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 04:00:43PM +0300, Yishai Hadas wrote: > On 25/10/2023 13:17, Michael S. Tsirkin wrote: > > On Wed, Oct 25, 2023 at 12:18:32PM +0300, Yishai Hadas wrote: > > > On 25/10/2023 0:01, Michael S. Tsirkin wrote: > > > > > > On Tue, Oct

Re: [PATCH V1 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-10-25 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 12:18:32PM +0300, Yishai Hadas wrote: > On 25/10/2023 0:01, Michael S. Tsirkin wrote: > > On Tue, Oct 17, 2023 at 04:42:14PM +0300, Yishai Hadas wrote: > > Introduce APIs to execute legacy IO admin commands. > > It inc

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-10-24 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 09:18:27AM +0800, Jason Wang wrote: > On Tue, Oct 24, 2023 at 8:03 PM Heng Qi wrote: > > > > > > > > 在 2023/10/12 下午4:29, Jason Wang 写道: > > > On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > >> Now, virtio-net already supports per-queue moderation parameter > > >>

Re: [PATCH net-next 5/5] virtio-net: support tx netdim

2023-10-24 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 11:35:43AM +0800, Jason Wang wrote: > On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > > > Similar to rx netdim, this patch supports adaptive tx > > coalescing moderation for the virtio-net. > > > > Signed-off-by: Heng Qi > > --- > > drivers/net/virtio_net.c | 143

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-10-24 Thread Michael S. Tsirkin
On Thu, Oct 12, 2023 at 03:44:04PM +0800, Heng Qi wrote: > Now, virtio-net already supports per-queue moderation parameter > setting. Based on this, we use the netdim library of linux to support > dynamic coalescing moderation for virtio-net. > > Due to hardware scheduling issues, we only tested

Re: [PATCH V1 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-10-24 Thread Michael S. Tsirkin
On Tue, Oct 17, 2023 at 04:42:14PM +0300, Yishai Hadas wrote: > Introduce APIs to execute legacy IO admin commands. > > It includes: list_query/use, io_legacy_read/write, > io_legacy_notify_info. > > Those APIs will be used by the next patches from this series. > > Signed-off-by: Yishai Hadas

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-23 Thread Michael S. Tsirkin
On Mon, Oct 23, 2023 at 06:52:34PM +0800, Xuan Zhuo wrote: > On Mon, 23 Oct 2023 17:52:02 +0800, Xuan Zhuo > wrote: > > On Mon, 23 Oct 2023 17:50:46 +0800, Su Hui wrote: > > > On 2023/10/23 13:46, Xuan Zhuo wrote: > > > Well, what are the cases where it can happen practically? > > >

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-23 Thread Michael S. Tsirkin
On Mon, Oct 23, 2023 at 05:52:02PM +0800, Xuan Zhuo wrote: > On Mon, 23 Oct 2023 17:50:46 +0800, Su Hui wrote: > > On 2023/10/23 13:46, Xuan Zhuo wrote: > > Well, what are the cases where it can happen practically? > > >>> Device error. Such as vp_active_vq() > > >>> > > >>>

[GIT PULL] virtio: last minute fixes

2023-10-22 Thread Michael S. Tsirkin
to 061b39fdfe7fd98946e67637213bcbb10a318cca: virtio_pci: fix the common cfg map size (2023-10-18 11:30:12 -0400) virtio: last minute fixes a collection of small fixes that look like worth having in this release. Signed-off-by: Michael S. Tsirkin

Re: [PATCH V1 vfio 0/9] Introduce a vfio driver over virtio devices

2023-10-22 Thread Michael S. Tsirkin
On Sun, Oct 22, 2023 at 11:20:31AM +0300, Yishai Hadas wrote: > On 17/10/2023 16:42, Yishai Hadas wrote: > > This series introduce a vfio driver over virtio devices to support the > > legacy interface functionality for VFs. > > > > Background, from the virtio spec [1]. > >

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-20 Thread Michael S. Tsirkin
On Fri, Oct 20, 2023 at 05:50:22PM +0800, Xuan Zhuo wrote: > On Fri, 20 Oct 2023 05:42:14 -0400, "Michael S. Tsirkin" > wrote: > > On Fri, Oct 20, 2023 at 05:36:41PM +0800, Xuan Zhuo wrote: > > > On Fri, 20 Oct 2023 05:34:32 -0400, "Michael S. Tsirkin" &

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-20 Thread Michael S. Tsirkin
On Fri, Oct 20, 2023 at 05:36:41PM +0800, Xuan Zhuo wrote: > On Fri, 20 Oct 2023 05:34:32 -0400, "Michael S. Tsirkin" > wrote: > > On Fri, Oct 20, 2023 at 05:23:21PM +0800, Su Hui wrote: > > > virtqueue_resize_packed() or virtqueue_resize_split() can return >

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-20 Thread Michael S. Tsirkin
On Fri, Oct 20, 2023 at 05:23:21PM +0800, Su Hui wrote: > virtqueue_resize_packed() or virtqueue_resize_split() can return > error code if failed, so add a check for this. > > Signed-off-by: Su Hui > --- > > I'm not sure that return directly is right or not, > maybe there are some process

Re: PING: [PATCH] virtio-blk: fix implicit overflow on virtio_max_dma_size

2023-10-19 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 05:43:55PM +0800, zhenwei pi wrote: > Hi Michael, > > This seems to have been ignored as you suggested. > > LINK: https://www.spinics.net/lists/linux-virtualization/msg63015.html Pls Cc more widely then: Paolo Bonzini (reviewer:VIRTIO BLOCK AND SCSI DRIVERS) Stefan

Re: [PATCH net-next v1 13/19] virtio_net: xsk: tx: virtnet_free_old_xmit() distinguishes xsk buffer

2023-10-19 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 03:13:48PM +0800, Xuan Zhuo wrote: > On Thu, 19 Oct 2023 02:38:16 -0400, "Michael S. Tsirkin" > wrote: > > On Tue, Oct 17, 2023 at 10:02:05AM +0800, Xuan Zhuo wrote: > > > On Mon, 16 Oct 2023 16:44:34 -0700, Jakub Kicinski > > >

Re: [PATCH vhost] virtio-ring: split: update avali idx lazily

2023-10-19 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 02:35:33PM +0800, Xuan Zhuo wrote: > If the vhost-user device is in busy-polling mode, the cachelines of > avali ring avail same in subject > are raced by the driver process and the vhost-user process. > Because that the idx will be updated everytime, when the new ring

Re: [PATCH net-next v1 13/19] virtio_net: xsk: tx: virtnet_free_old_xmit() distinguishes xsk buffer

2023-10-19 Thread Michael S. Tsirkin
On Tue, Oct 17, 2023 at 10:02:05AM +0800, Xuan Zhuo wrote: > On Mon, 16 Oct 2023 16:44:34 -0700, Jakub Kicinski wrote: > > On Mon, 16 Oct 2023 20:00:27 +0800 Xuan Zhuo wrote: > > > @@ -305,9 +311,15 @@ static inline void virtnet_free_old_xmit(struct > > > virtnet_sq *sq, bool in_napi, > > > > >

Re: [PATCH net-next v1 05/19] virtio_net: add prefix virtnet to all struct/api inside virtio_net.h

2023-10-19 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 02:14:27PM +0800, Jason Wang wrote: > On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > > > We move some structures and APIs to the header file, but these > > structures and APIs do not prefixed with virtnet. This patch adds > > virtnet for these. > > What's the

Re: [PATCH vhost v3 3/4] virtio_pci: add check for common cfg size

2023-10-18 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 11:11:19AM +0800, Xuan Zhuo wrote: > Some buggy devices, the common cfg size may not match the features. > > This patch checks the common cfg size for the > features(VIRTIO_F_NOTIF_CONFIG_DATA, VIRTIO_F_RING_RESET). When the > common cfg size does not match the

Re: [PATCH vhost v4 00/16] vdpa: Add support for vq descriptor mappings

2023-10-18 Thread Michael S. Tsirkin
On Wed, Oct 18, 2023 at 08:14:39PM +0300, Dragos Tatulea wrote: > This patch series adds support for vq descriptor table mappings which > are used to improve vdpa live migration downtime. The improvement comes > from using smaller mappings which take less time to create and destroy > in hw. > >

Re: [PATCH 0/2] vdpa: Add logging operatins

2023-10-18 Thread Michael S. Tsirkin
On Mon, Sep 11, 2023 at 02:56:58PM +0800, Jason Wang wrote: > Adding Eugenio and Si Wei. > > On Sat, Aug 26, 2023 at 9:24 AM Jiang Dongxu wrote: > > > > From: jiangdongxu > > > > Currently, the vdpa device supports suspend and resume operations. > > To support vdpa device live migration, we

Re: [PATCH vhost 02/22] virtio_ring: introduce virtqueue_dma_[un]map_page_attrs

2023-10-18 Thread Michael S. Tsirkin
On Wed, Oct 18, 2023 at 04:57:21PM +0800, Xuan Zhuo wrote: > On Wed, 18 Oct 2023 04:44:24 -0400, "Michael S. Tsirkin" > wrote: > > On Wed, Oct 18, 2023 at 04:00:22PM +0800, Xuan Zhuo wrote: > > > On Wed, 18 Oct 2023 03:59:03 -0400, "Michael S. Tsirkin" &

Re: [PATCH vhost 02/22] virtio_ring: introduce virtqueue_dma_[un]map_page_attrs

2023-10-18 Thread Michael S. Tsirkin
On Wed, Oct 18, 2023 at 04:00:22PM +0800, Xuan Zhuo wrote: > On Wed, 18 Oct 2023 03:59:03 -0400, "Michael S. Tsirkin" > wrote: > > On Wed, Oct 18, 2023 at 03:53:00PM +0800, Xuan Zhuo wrote: > > > Hi Michael, > > > > > > Do you think it's approp

Re: [PATCH vhost 02/22] virtio_ring: introduce virtqueue_dma_[un]map_page_attrs

2023-10-18 Thread Michael S. Tsirkin
On Wed, Oct 18, 2023 at 03:53:00PM +0800, Xuan Zhuo wrote: > Hi Michael, > > Do you think it's appropriate to push the first two patches of this patch set > to > linux 6.6? > > Thanks. I see this is with the eye towards merging this gradually. However, I want the patchset to be ready first,

Re: [PATCH vhost 02/22] virtio_ring: introduce virtqueue_dma_[un]map_page_attrs

2023-10-18 Thread Michael S. Tsirkin
On Wed, Oct 18, 2023 at 03:53:00PM +0800, Xuan Zhuo wrote: > Hi Michael, > > Do you think it's appropriate to push the first two patches of this patch set > to > linux 6.6? > > Thanks. I generally treat patchsets as a whole unless someone asks me to do otherwise. Why do you want this? -- MST

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-16 Thread Michael S. Tsirkin
On Mon, Oct 16, 2023 at 04:33:10PM +0800, Zhu, Lingshan wrote: > > > On 10/13/2023 9:50 PM, Michael S. Tsirkin wrote: > > On Fri, Oct 13, 2023 at 06:28:34PM +0800, Zhu, Lingshan wrote: > > > > > > On 10/12/2023 9:27 PM, Jason Gunthorpe wrote: > > > >

Re: [PATCH net-next 2/5] virtio-net: separate rx/tx coalescing moderation cmds

2023-10-16 Thread Michael S. Tsirkin
On Mon, Oct 16, 2023 at 03:45:38PM +0800, Heng Qi wrote: > > > 在 2023/10/14 上午9:11, Jakub Kicinski 写道: > > On Thu, 12 Oct 2023 15:44:06 +0800 Heng Qi wrote: > > > + > > > +static int virtnet_send_rx_notf_coal_cmds(struct virtnet_info *vi, > > > + struct

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-13 Thread Michael S. Tsirkin
On Fri, Oct 13, 2023 at 06:28:34PM +0800, Zhu, Lingshan wrote: > > > On 10/12/2023 9:27 PM, Jason Gunthorpe wrote: > > On Thu, Oct 12, 2023 at 06:29:47PM +0800, Zhu, Lingshan wrote: > > > sorry for the late reply, we have discussed this for weeks in virtio > mailing >

Re: [RFC PATCH] ALSA: virtio: use copy and fill_silence callbacks

2023-10-12 Thread Michael S. Tsirkin
On Thu, Oct 12, 2023 at 05:10:50PM +0200, Matias Ezequiel Vara Larsen wrote: > This commit replaces the mmap mechanism with the copy() and > fill_silence() callbacks for both capturing and playback for the > virtio-sound driver. This change is required to prevent the updating of > the content of a

Re: [PATCH vhost 00/22] virtio-net: support AF_XDP zero copy

2023-10-12 Thread Michael S. Tsirkin
On Thu, Oct 12, 2023 at 04:32:40PM +0800, Xuan Zhuo wrote: > On Thu, 12 Oct 2023 15:50:13 +0800, Jason Wang wrote: > > On Thu, Oct 12, 2023 at 9:58 AM Xuan Zhuo > > wrote: > > > > > > On Wed, 11 Oct 2023 10:00:57 -0700, Jakub Kicinski > > > wrote: > > > > On Wed, 11 Oct 2023 17:27:06 +0800

Re: [PATCH vhost 21/22] virtio_net: update tx timeout record

2023-10-12 Thread Michael S. Tsirkin
On Thu, Oct 12, 2023 at 07:54:02PM +0800, Xuan Zhuo wrote: > On Thu, 12 Oct 2023 05:36:56 -0400, "Michael S. Tsirkin" > wrote: > > On Thu, Oct 12, 2023 at 05:12:33PM +0800, Xuan Zhuo wrote: > > > On Thu, 12 Oct 2023 05:10:55 -0400, "Michael S. Tsirkin" &

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-12 Thread Michael S. Tsirkin
On Thu, Oct 12, 2023 at 11:11:20AM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > Sent: Thursday, October 12, 2023 4:23 PM > > > > On Tue, Sep 26, 2023 at 03:45:36AM +, Parav Pandit wrote: > > > > > > > > > > From: Mich

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-12 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 03:45:36AM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Tuesday, September 26, 2023 12:06 AM > > > One can thinkably do that wait in hardware, though. Just defer completion > > until > > read is done. &

Re: [PATCH vhost 01/22] virtio_ring: virtqueue_set_dma_premapped support disable

2023-10-12 Thread Michael S. Tsirkin
On Thu, Oct 12, 2023 at 05:18:54PM +0800, Xuan Zhuo wrote: > On Thu, 12 Oct 2023 05:15:52 -0400, "Michael S. Tsirkin" > wrote: > > On Wed, Oct 11, 2023 at 05:27:07PM +0800, Xuan Zhuo wrote: > > > virtqueue_set_dma_premapped() adds a new parameter to disable the

Re: [PATCH vhost 21/22] virtio_net: update tx timeout record

2023-10-12 Thread Michael S. Tsirkin
On Thu, Oct 12, 2023 at 05:12:33PM +0800, Xuan Zhuo wrote: > On Thu, 12 Oct 2023 05:10:55 -0400, "Michael S. Tsirkin" > wrote: > > On Wed, Oct 11, 2023 at 05:27:27PM +0800, Xuan Zhuo wrote: > > > If send queue sent some packets, we update the tx timeout > &g

Re: [PATCH vhost 01/22] virtio_ring: virtqueue_set_dma_premapped support disable

2023-10-12 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 05:27:07PM +0800, Xuan Zhuo wrote: > virtqueue_set_dma_premapped() adds a new parameter to disable the > virtqueue premapped mode. > > Signed-off-by: Xuan Zhuo > --- > drivers/net/virtio_net.c | 2 +- > drivers/virtio/virtio_ring.c | 11 --- >

Re: [PATCH vhost 08/22] virtio_net: virtnet_poll_tx support rescheduled

2023-10-12 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 05:27:14PM +0800, Xuan Zhuo wrote: > virtnet_poll_tx() support to return budget when busy to be rescheduled. > > When retval < budget, napi_poll() in dev.c will exit directly. And > virtqueue_napi_complete() will be called to close napi. > > When retval == budget, the

Re: [PATCH vhost 21/22] virtio_net: update tx timeout record

2023-10-12 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 05:27:27PM +0800, Xuan Zhuo wrote: > If send queue sent some packets, we update the tx timeout > record to prevent the tx timeout. > > Signed-off-by: Xuan Zhuo > --- > drivers/net/virtio/xsk.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 02:19:44PM -0300, Jason Gunthorpe wrote: > On Wed, Oct 11, 2023 at 12:59:30PM -0400, Michael S. Tsirkin wrote: > > On Wed, Oct 11, 2023 at 11:58:10AM -0300, Jason Gunthorpe wrote: > > > Trying to put VFIO-only code in virtio is what causes all the > &

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 09:18:49AM -0300, Jason Gunthorpe wrote: > With VDPA doing the same stuff as vfio I'm not sure who is auditing it > for security. Check the signed off tags and who sends the pull requests if you want to know. -- MST ___

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 09:18:49AM -0300, Jason Gunthorpe wrote: > The simple way to be sure is to never touch the PCI function that has > DMA assigned to a VM from the hypervisor, except through config space. What makes config space different that it's safe though? Isn't this more of a "we can't

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 11:58:10AM -0300, Jason Gunthorpe wrote: > Trying to put VFIO-only code in virtio is what causes all the > issues. If you mis-design the API boundary everything will be painful, > no matter where you put the code. Are you implying the whole idea of adding these legacy

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 11:58:11AM +0300, Yishai Hadas wrote: > On 11/10/2023 11:02, Michael S. Tsirkin wrote: > > On Wed, Oct 11, 2023 at 10:44:49AM +0300, Yishai Hadas wrote: > > > On 10/10/2023 23:42, Michael S. Tsirkin wrote: > > > > On Tue, Oct 10, 2023 at 07:09:

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 11:59:26PM -0700, Christoph Hellwig wrote: > On Wed, Oct 11, 2023 at 02:43:37AM -0400, Michael S. Tsirkin wrote: > > > Btw, what is that intel thing everyone is talking about? And why > > > would the virtio core support vendor specific behavior lik

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 08:00:57AM +, Parav Pandit wrote: > Hi Christoph, > > > From: Christoph Hellwig > > Sent: Wednesday, October 11, 2023 12:29 PM > > > > On Wed, Oct 11, 2023 at 02:43:37AM -0400, Michael S. Tsirkin wrote: > > > > Btw, what is

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Michael S. Tsirkin
On Wed, Oct 11, 2023 at 10:44:49AM +0300, Yishai Hadas wrote: > On 10/10/2023 23:42, Michael S. Tsirkin wrote: > > On Tue, Oct 10, 2023 at 07:09:08PM +0300, Yishai Hadas wrote: > > > > > Assuming that we'll put each command inside virtio as the generic > > > >

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 11:13:30PM -0700, Christoph Hellwig wrote: > On Tue, Oct 10, 2023 at 12:59:37PM -0300, Jason Gunthorpe wrote: > > On Tue, Oct 10, 2023 at 11:14:56AM -0400, Michael S. Tsirkin wrote: > > > > > I suggest 3 but call it on the VF. commands will switc

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-10 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 07:09:08PM +0300, Yishai Hadas wrote: > > > > Assuming that we'll put each command inside virtio as the generic layer, > > > we > > > won't be able to call/use this API internally to get the PF as of cyclic > > > dependencies between the modules, link will fail. I just

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-10 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 04:21:15PM +, Parav Pandit wrote: > > > From: Jason Gunthorpe > > Sent: Tuesday, October 10, 2023 9:37 PM > > > > On Tue, Oct 10, 2023 at 12:03:29PM -0400, Michael S. Tsirkin wrote: > > > On Tue, Oct 10, 2023 at 12:59:37PM -0300, J

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-10 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 12:59:37PM -0300, Jason Gunthorpe wrote: > On Tue, Oct 10, 2023 at 11:14:56AM -0400, Michael S. Tsirkin wrote: > > > I suggest 3 but call it on the VF. commands will switch to PF > > internally as needed. For example, intel might be interested in

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-10 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 06:43:32PM +0300, Yishai Hadas wrote: > On 10/10/2023 18:14, Michael S. Tsirkin wrote: > > On Tue, Oct 10, 2023 at 06:09:44PM +0300, Yishai Hadas wrote: > > > On 10/10/2023 17:54, Michael S. Tsirkin wrote: > > > > On Tue, Oct 10, 2023 at 11:

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-10 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 06:09:44PM +0300, Yishai Hadas wrote: > On 10/10/2023 17:54, Michael S. Tsirkin wrote: > > On Tue, Oct 10, 2023 at 11:08:49AM -0300, Jason Gunthorpe wrote: > > > On Tue, Oct 10, 2023 at 09:56:00AM -0400, Michael S. Tsirkin wrote: > > > > &

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-10 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 11:08:49AM -0300, Jason Gunthorpe wrote: > On Tue, Oct 10, 2023 at 09:56:00AM -0400, Michael S. Tsirkin wrote: > > > > However - the Intel GPU VFIO driver is such a bad experiance I don't > > > want to encourage people to make VFIO drivers, or code

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-10 Thread Michael S. Tsirkin
On Tue, Oct 10, 2023 at 10:10:31AM -0300, Jason Gunthorpe wrote: > > > There is alot of code in VFIO and the VMM side to take a VF and turn > > > it into a vPCI function. You can't just trivially duplicate VFIO in a > > > dozen drivers without creating a giant mess. > > > > I do not advocate for

Re: [RFC PATCH 5/7] tun: Introduce virtio-net hashing feature

2023-10-09 Thread Michael S. Tsirkin
On Mon, Oct 09, 2023 at 05:44:20PM +0900, Akihiko Odaki wrote: > On 2023/10/09 17:13, Willem de Bruijn wrote: > > On Sun, Oct 8, 2023 at 12:22 AM Akihiko Odaki > > wrote: > > > > > > virtio-net have two usage of hashes: one is RSS and another is hash > > > reporting. Conventionally the hash

Re: [RFC PATCH 5/7] tun: Introduce virtio-net hashing feature

2023-10-09 Thread Michael S. Tsirkin
Akihiko Odaki sorry about reposts. Having an email with two "@" in the CC list: xuanzhuo@linux.alibaba.comsh...@kernel.org tripped up mutt's reply-all for me and made it send to you only. I am guessing you meant two addresses: xuanz...@linux.alibaba.com and sh...@kernel.org. On Sun,

Re: [PATCH 2/2] tools/virtio: Add hints when module is not installed

2023-10-09 Thread Michael S. Tsirkin
On Mon, Oct 09, 2023 at 02:44:55AM +, Liming Wu wrote: > > > > -Original Message- > > From: Jason Wang > > Sent: Sunday, October 8, 2023 12:36 PM > > To: Liming Wu > > Cc: Michael S . Tsirkin ; k...@vger.kernel.org; > > virt

Re: [PATCH vhost v2 1/2] virtio_pci: fix the common map size and add check for common size

2023-10-09 Thread Michael S. Tsirkin
On Mon, Oct 09, 2023 at 09:15:31AM +0800, Xuan Zhuo wrote: > On Sun, 8 Oct 2023 06:42:37 -0400, "Michael S. Tsirkin" > wrote: > > On Sun, Oct 08, 2023 at 05:38:41PM +0800, Xuan Zhuo wrote: > > > Now, the function vp_modern_map_capability() takes the size par

  1   2   3   4   5   6   7   8   9   10   >