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

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 05:38:41PM +0800, Xuan Zhuo wrote: > Now, the function vp_modern_map_capability() takes the size parameter, > which corresponds to the size of virtio_pci_common_cfg. As a result, > this indicates the size of memory area to map. > > However, if the _F_RING_RESET is

Re: [PATCH vhost v1 1/2] virtio_pci: fix the common map size and add check for vq-reset

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 03:45:34PM +0800, Xuan Zhuo wrote: > Now, the function vp_modern_map_capability() takes the size parameter, > which corresponds to the size of virtio_pci_common_cfg. As a result, > this indicates the size of memory area to map. > > However, if the _F_RING_RESET is

Re: [PATCH] vduse: make vduse_class constant

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 08:46:45AM +0200, Greg Kroah-Hartman wrote: > On Sun, Oct 08, 2023 at 02:41:22AM -0400, Michael S. Tsirkin wrote: > > On Sun, Oct 08, 2023 at 08:40:05AM +0200, Greg Kroah-Hartman wrote: > > > On Sun, Oct 08, 2023 at 02:20:52AM -0400, Michael S. Tsirkin wro

Re: [PATCH] vduse: make vduse_class constant

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 08:40:05AM +0200, Greg Kroah-Hartman wrote: > On Sun, Oct 08, 2023 at 02:20:52AM -0400, Michael S. Tsirkin wrote: > > On Fri, Oct 06, 2023 at 04:30:44PM +0200, Greg Kroah-Hartman wrote: > > > Now that the driver core allows for struct class to be in read

Re: [PATCH] vduse: make vduse_class constant

2023-10-08 Thread Michael S. Tsirkin
t; allocated at runtime. > > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Xuan Zhuo > Cc: Xie Yongji > Signed-off-by: Greg Kroah-Hartman Acked-by: Michael S. Tsirkin Greg should I merge it or do you intend to merge all these patches? > ---

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

2023-10-05 Thread Michael S. Tsirkin
On Thu, Oct 05, 2023 at 05:44:01PM +, Dragos Tatulea wrote: > On Thu, 2023-10-05 at 13:31 -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 28, 2023 at 07:45:11PM +0300, Dragos Tatulea wrote: > > > This patch series adds support for vq descriptor table mappings which > &g

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

2023-10-05 Thread Michael S. Tsirkin
On Thu, Sep 28, 2023 at 07:45:11PM +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] mlx5_vdpa: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK

2023-10-04 Thread Michael S. Tsirkin
On Wed, Oct 04, 2023 at 02:56:53PM +0200, Eugenio Perez Martin wrote: > On Tue, Jul 4, 2023 at 12:16 PM Michael S. Tsirkin wrote: > > > > On Mon, Jul 03, 2023 at 05:26:02PM -0700, Si-Wei Liu wrote: > > > > > > > > > On 7/3/2023 8:46 AM, Michael S. Tsirkin

Re: [LINUX KERNEL PATCH v5 1/2] virtio_pci: Add freeze_mode for virtio_pci_common_cfg

2023-10-03 Thread Michael S. Tsirkin
On Tue, Sep 19, 2023 at 06:46:06PM +0800, Jiqian Chen wrote: > When guest vm does S3, Qemu will reset and clear some things of virtio > devices, but guest can't aware that, so that may cause some problems. > For excample, Qemu calls virtio_reset->virtio_gpu_gl_reset, that will > destroy render

Re: [PATCH v2] virtio_balloon: Fix endless deflation and inflation on arm64

2023-10-02 Thread Michael S. Tsirkin
On Mon, Oct 02, 2023 at 01:50:45PM +0200, David Hildenbrand wrote: > On 25.09.23 01:58, Gavin Shan wrote: > > Hi David and Michael, > > > > On 8/31/23 11:10, Gavin Shan wrote: > > > The deflation request to the target, which isn't unaligned to the > > > guest page size causes endless deflation

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

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 08:20:05PM -0300, Jason Gunthorpe wrote: > On Wed, Sep 27, 2023 at 05:38:55PM -0400, Michael S. Tsirkin wrote: > > On Tue, Sep 26, 2023 at 10:50:57AM -0300, Jason Gunthorpe wrote: > > > On Tue, Sep 26, 2023 at 01:42:52AM -0400, Michael S. Tsirkin wrote: &

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

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 08:16:00PM -0300, Jason Gunthorpe wrote: > On Wed, Sep 27, 2023 at 05:30:04PM -0400, Michael S. Tsirkin wrote: > > On Wed, Sep 27, 2023 at 10:18:17AM -0300, Jason Gunthorpe wrote: > > > On Tue, Sep 26, 2023 at 07:41:44AM -0400, Michae

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

2023-09-27 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 10:50:57AM -0300, Jason Gunthorpe wrote: > On Tue, Sep 26, 2023 at 01:42:52AM -0400, Michael S. Tsirkin wrote: > > On Mon, Sep 25, 2023 at 09:40:59PM -0300, Jason Gunthorpe wrote: > > > On Mon, Sep 25, 2023 at 03:44:11PM -0400, Michael S. Tsirkin wro

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

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 10:18:17AM -0300, Jason Gunthorpe wrote: > On Tue, Sep 26, 2023 at 07:41:44AM -0400, Michael S. Tsirkin wrote: > > > > By the way, this follows what was done already between vfio/mlx5 to > > > mlx5_core modules where mlx5_core exposes

Re: [PATCH vfio 03/11] virtio-pci: Introduce admin virtqueue

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 02:12:24PM -0400, Feng Liu wrote: > > > On 2023-09-26 p.m.3:23, Feng Liu via Virtualization wrote: > > External email: Use caution opening links or attachments > > > > > > On 2023-09-21 a.m.9:57, Michael S. Tsirkin wrote: > > >

Re: [PATCH vfio 01/11] virtio-pci: Use virtio pci device layer vq info instead of generic one

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 02:09:43PM -0400, Feng Liu wrote: > > > On 2023-09-26 p.m.3:13, Feng Liu via Virtualization wrote: > > External email: Use caution opening links or attachments > > > > > > On 2023-09-21 a.m.9:46, Michael S. Tsirkin wrote: > > >

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

2023-09-27 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 01:00:20PM +0800, liming...@jaguarmicro.com wrote: > From: Liming Wu > > Need to insmod vhost_test.ko before run virtio_test. > Give some hints to users. > > Signed-off-by: Liming Wu > --- > tools/virtio/virtio_test.c | 4 > 1 file changed, 4 insertions(+) > >

Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 06:41:58PM +0200, Halil Pasic wrote: > [..] > > --- a/drivers/crypto/virtio/virtio_crypto_akcipher_algs.c > > +++ b/drivers/crypto/virtio/virtio_crypto_akcipher_algs.c > > @@ -61,8 +61,9 @@ static void virtio_crypto_akcipher_finalize_req( > > vc_akcipher_req->src_buf =

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

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 06:20:45PM +0300, Yishai Hadas wrote: > On 21/09/2023 22:58, Alex Williamson wrote: > > On Thu, 21 Sep 2023 15:40:40 +0300 > > Yishai Hadas wrote: > > > > > Introduce a vfio driver over virtio devices to support the legacy > > > interface functionality for VFs. > > > > >

Re: [PATCH vhost v13 12/12] virtio_net: merge dma operations when filling mergeable buffers

2023-09-26 Thread Michael S. Tsirkin
On Thu, Aug 10, 2023 at 08:30:57PM +0800, Xuan Zhuo wrote: > Currently, the virtio core will perform a dma operation for each > buffer. Although, the same page may be operated multiple times. > > This patch, the driver does the dma operation and manages the dma > address based the feature

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

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 10:32:39AM +0800, Jason Wang wrote: > It's the implementation details in legacy. The device needs to make > sure (reset) the driver can work (is done before get_status return). I think that there's no way to make it reliably work for all legacy drivers. They just assumed

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

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 02:14:01PM +0300, Yishai Hadas wrote: > On 22/09/2023 12:54, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 03:40:39PM +0300, Yishai Hadas wrote: > > > Expose admin commands over the virtio device, to be used by the > > > vfio-virtio

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

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 01:51:13PM +0300, Yishai Hadas wrote: > On 21/09/2023 23:34, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 03:40:39PM +0300, Yishai Hadas wrote: > > > Expose admin commands over the virtio device, to be used by the > > > vfio-virtio

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

2023-09-25 Thread Michael S. Tsirkin
On Mon, Sep 25, 2023 at 09:40:59PM -0300, Jason Gunthorpe wrote: > On Mon, Sep 25, 2023 at 03:44:11PM -0400, Michael S. Tsirkin wrote: > > > VDPA is very different from this. You might call them both mediation, > > > sure, but then you need another word to describe the add

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

2023-09-25 Thread Michael S. Tsirkin
On Mon, Sep 25, 2023 at 09:40:59PM -0300, Jason Gunthorpe wrote: > On Mon, Sep 25, 2023 at 03:44:11PM -0400, Michael S. Tsirkin wrote: > > > VDPA is very different from this. You might call them both mediation, > > > sure, but then you need another word to describe the add

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

2023-09-25 Thread Michael S. Tsirkin
On Mon, Sep 25, 2023 at 03:53:18PM -0300, Jason Gunthorpe wrote: > On Mon, Sep 25, 2023 at 02:16:30PM -0400, Michael S. Tsirkin wrote: > > > I do want to understand if there's a use-case that vdpa does not address > > simply because it might be worth while to extend it to do s

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

2023-09-25 Thread Michael S. Tsirkin
On Mon, Sep 25, 2023 at 09:26:07AM -0300, Jason Gunthorpe wrote: > > > So, as I keep saying, in this scenario the goal is no mediation in the > > > hypervisor. > > > > That's pretty fine, but I don't think trapping + relying is not > > mediation. Does it really matter what happens after trapping?

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

2023-09-25 Thread Michael S. Tsirkin
On Mon, Sep 25, 2023 at 08:26:33AM +, Parav Pandit wrote: > > > > From: Jason Wang > > Sent: Monday, September 25, 2023 8:00 AM > > > > On Fri, Sep 22, 2023 at 8:25 PM Parav Pandit wrote: > > > > > > > > > > From: Jason Gunthorpe > > > > Sent: Friday, September 22, 2023 5:53 PM > > > > >

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

2023-09-25 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 01:19:28PM -0300, Jason Gunthorpe wrote: > On Fri, Sep 22, 2023 at 11:39:19AM -0400, Michael S. Tsirkin wrote: > > On Fri, Sep 22, 2023 at 09:25:01AM -0300, Jason Gunthorpe wrote: > > > On Fri, Sep 22, 2023 at 11:02:50AM +0800, Jason Wang wrote: > >

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

2023-09-25 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 01:22:33PM -0300, Jason Gunthorpe wrote: > On Fri, Sep 22, 2023 at 11:40:58AM -0400, Michael S. Tsirkin wrote: > > On Fri, Sep 22, 2023 at 12:15:34PM -0300, Jason Gunthorpe wrote: > > > On Fri, Sep 22, 2023 at 11:13:18AM -0400, Michael S. Tsirkin wrote: &

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

2023-09-22 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:40PM +0300, Yishai Hadas wrote: > Introduce a vfio driver over virtio devices to support the legacy > interface functionality for VFs. > > Background, from the virtio spec [1]. > > In some systems,

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

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 09:23:28AM -0300, Jason Gunthorpe wrote: > On Fri, Sep 22, 2023 at 05:47:23AM -0400, Michael S. Tsirkin wrote: > > > it will require maintainance effort when virtio changes are made. For > > example it pokes at the device state - I don't see specific r

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

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 12:15:34PM -0300, Jason Gunthorpe wrote: > On Fri, Sep 22, 2023 at 11:13:18AM -0400, Michael S. Tsirkin wrote: > > On Fri, Sep 22, 2023 at 12:25:06PM +, Parav Pandit wrote: > > > > > > > From: Jason Gunthorpe > > > >

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

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 09:25:01AM -0300, Jason Gunthorpe wrote: > On Fri, Sep 22, 2023 at 11:02:50AM +0800, Jason Wang wrote: > > On Fri, Sep 22, 2023 at 3:53 AM Jason Gunthorpe wrote: > > > > > > On Thu, Sep 21, 2023 at 03:34:03PM -0400, Michael S. Tsirkin wrote

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

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 12:25:06PM +, Parav Pandit wrote: > > > From: Jason Gunthorpe > > Sent: Friday, September 22, 2023 5:53 PM > > > > > And what's more, using MMIO BAR0 then it can work for legacy. > > > > Oh? How? Our team didn't think so. > > It does not. It was already discussed.

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

2023-09-22 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 07:55:26PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 04:45:45PM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 04:49:46PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 03:13:10PM -0400, Michael S. Tsirkin wrote: &

Re: [PATCH v14 30/42] virtio_pci: introduce helper to get/set queue reset

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 09:49:18AM +0800, Xuan Zhuo wrote: > On Thu, 21 Sep 2023 10:02:53 -0400, "Michael S. Tsirkin" > wrote: > > On Mon, Aug 01, 2022 at 02:38:50PM +0800, Xuan Zhuo wrote: > > > Introduce new helpers to implement queue reset and get queue reset &

Re: Weird locking hierarchy in virtcrypto

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 10:36:59AM +0200, Juergen Gross wrote: > While backporting an upstream patch to one of our older distro kernels I've > found a weird locking hierarchy in the virtio crypto driver: > > virtio_config_changed(): > spin_lock_irqsave() > ->__virtio_config_changed() >

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

2023-09-22 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:40PM +0300, Yishai Hadas wrote: > Introduce a vfio driver over virtio devices to support the legacy > interface functionality for VFs. > > Background, from the virtio spec [1]. > > In some systems,

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

2023-09-22 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:39PM +0300, Yishai Hadas wrote: > Expose admin commands over the virtio device, to be used by the > vfio-virtio driver in the next patches. > > It includes: list query/use, legacy write/read, read notify_info. > > Signed-off-by: Yishai Hadas This stuff is pure

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

2023-09-22 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 07:48:36PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 04:16:25PM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 04:53:45PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 03:34:03PM -0400, Michae

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 04:51:15PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 03:17:25PM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 03:39:26PM -0300, Jason Gunthorpe wrote: > > > > What is the huge amount of work am I asking to do? > >

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 04:49:46PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 03:13:10PM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 03:39:26PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 12:53:04PM -0400, Michael S. Tsirkin wro

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:39PM +0300, Yishai Hadas wrote: > Expose admin commands over the virtio device, to be used by the > vfio-virtio driver in the next patches. > > It includes: list query/use, legacy write/read, read notify_info. > > Signed-off-by: Yishai Hadas > --- >

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 05:01:21PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 01:58:32PM -0600, Alex Williamson wrote: > > > > +static const struct pci_device_id virtiovf_pci_table[] = { > > > + { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_REDHAT_QUMRANET, > > > PCI_ANY_ID) }, >

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 04:53:45PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 03:34:03PM -0400, Michael S. Tsirkin wrote: > > > that's easy/practical. If instead VDPA gives the same speed with just > > shadow vq then keeping this hack in vfio seems like

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:16:37PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 01:55:42PM -0400, Michael S. Tsirkin wrote: > > > That's not what I'm asking about though - not what shadow vq does, > > shadow vq is a vdpa feature. > > That's just VDPA then. We

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:39:26PM -0300, Jason Gunthorpe wrote: > > What is the huge amount of work am I asking to do? > > You are asking us to invest in the complexity of VDPA through out > (keep it working, keep it secure, invest time in deploying and > debugging in the field) I'm asking you

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:39:26PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 12:53:04PM -0400, Michael S. Tsirkin wrote: > > > vdpa is not vfio, I don't know how you can suggest vdpa is a > > > replacement for a vfio driver. They are completely different > >

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 02:44:50PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 01:21:26PM -0400, Michael S. Tsirkin wrote: > > Yea it's very useful - it's also useful for vdpa whether this patchset > > goes in or not. At some level, if vdpa can't keep up then maybe goi

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 05:09:04PM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Thursday, September 21, 2023 10:31 PM > > > Another question I'm interested in is whether there's actually a performance > > benefit to using this as compar

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 02:07:09PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 01:01:12PM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 01:52:24PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 10:43:50AM -0600, Ale

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 01:52:24PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 10:43:50AM -0600, Alex Williamson wrote: > > > > With that code in place a legacy driver in the guest has the look and > > > feel as if having a transitional device with legacy support for both its > > >

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 01:41:39PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 10:16:04AM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 11:11:25AM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 09:16:21AM -0400, Michae

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 11:11:25AM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 09:16:21AM -0400, Michael S. Tsirkin wrote: > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > index bf0f54c24f81..5098418c8389 100644 > > > --- a/MAINTAINERS > >

Re: [PATCH v14 30/42] virtio_pci: introduce helper to get/set queue reset

2023-09-21 Thread Michael S. Tsirkin
On Mon, Aug 01, 2022 at 02:38:50PM +0800, Xuan Zhuo wrote: > Introduce new helpers to implement queue reset and get queue reset > status. > > https://github.com/oasis-tcs/virtio-spec/issues/124 > https://github.com/oasis-tcs/virtio-spec/issues/139 > > Signed-off-by: Xuan Zhuo > Acked-by:

Re: [PATCH vfio 03/11] virtio-pci: Introduce admin virtqueue

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:32PM +0300, 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 vfio 01/11] virtio-pci: Use virtio pci device layer vq info instead of generic one

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:30PM +0300, Yishai Hadas wrote: > From: Feng Liu > > Currently VQ deletion callback vp_del_vqs() processes generic > virtio_device level VQ list instead of VQ information available at PCI > layer. > > To adhere to the layering, use the pci device level VQ

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:40PM +0300, Yishai Hadas wrote: > +#define VIRTIO_LEGACY_IO_BAR_HEADER_LEN 20 > +#define VIRTIO_LEGACY_IO_BAR_MSIX_HEADER_LEN 4 This is exactly part of VIRTIO_PCI_CONFIG_OFF duplicated. -- MST ___ Virtualization mailing

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

2023-09-21 Thread Michael S. Tsirkin
> MAINTAINERS | 6 + > drivers/vfio/pci/Kconfig | 2 + > drivers/vfio/pci/Makefile| 2 + > drivers/vfio/pci/virtio/Kconfig | 15 + > drivers/vfio/pci/virtio/Makefile | 4 + > drivers/vfio/pci/virtio/cmd.c| 4 +- >

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

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:39PM +0300, Yishai Hadas wrote: > Expose admin commands over the virtio device, to be used by the > vfio-virtio driver in the next patches. > > It includes: list query/use, legacy write/read, read notify_info. > > Signed-off-by: Yishai Hadas I don't get the

Re: [PATCH net-next v9 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-19 Thread Michael S. Tsirkin
On Tue, Sep 19, 2023 at 03:35:51PM +0200, Stefano Garzarella wrote: > On Tue, Sep 19, 2023 at 03:19:54PM +0200, Paolo Abeni wrote: > > On Tue, 2023-09-19 at 09:54 +0200, Stefano Garzarella wrote: > > > On Mon, Sep 18, 2023 at 07:56:00PM +0300, Arseniy Krasnov wrote: > > > > Hi Stefano, > > > > > >

Re: virtio-sound linux driver conformance to spec

2023-09-19 Thread Michael S. Tsirkin
On Tue, Sep 19, 2023 at 04:18:57PM +0200, Matias Ezequiel Vara Larsen wrote: > On Tue, Sep 19, 2023 at 05:43:56AM -0400, Michael S. Tsirkin wrote: > > On Wed, Sep 13, 2023 at 05:04:24PM +0200, Matias Ezequiel Vara Larsen wrote: > > > Hello, > > > > > >

Re: virtio-sound linux driver conformance to spec

2023-09-19 Thread Michael S. Tsirkin
On Wed, Sep 13, 2023 at 05:04:24PM +0200, Matias Ezequiel Vara Larsen wrote: > Hello, > > This email is to report a behavior of the Linux virtio-sound driver that > looks like it is not conforming to the VirtIO specification. The kernel > driver is moving buffers from the used ring to the

Re: [PATCH net-next v9 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-18 Thread Michael S. Tsirkin
Documentation/. > 3) Updates for tests and utils. > > This series enables handling of fragged skbs in virtio and vhost parts. > Newly logic won't be triggered, because SO_ZEROCOPY options is still > impossible to enable at this moment (next bunch of patches from big > set above

Re: [PATCH net-next] virtio: kdoc for struct virtio_pci_modern_device

2023-09-12 Thread Michael S. Tsirkin
On Mon, Sep 11, 2023 at 02:31:04PM -0700, Shannon Nelson wrote: > Finally following up to Simon's suggestion for some kdoc attention > on struct virtio_pci_modern_device. > > Link: https://lore.kernel.org/netdev/ze%2fqs0lnuvxfa...@corigine.com/ > Cc: Simon Horman > Signed-off-by: Shannon Nelson

Re: [PATCH net-next] virtio: kdoc for struct virtio_pci_modern_device

2023-09-12 Thread Michael S. Tsirkin
by: Shannon Nelson > Acked-by: Eugenio Pérez Acked-by: Michael S. Tsirkin > --- > include/linux/virtio_pci_modern.h | 34 --- > 1 file changed, 22 insertions(+), 12 deletions(-) > > diff --git a/include/linux/virtio_pci_modern.h > b/in

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-06 Thread Michael S. Tsirkin
On Sat, Sep 02, 2023 at 09:24:26AM +, Bobby Eshleman wrote: > On Sat, Sep 02, 2023 at 04:41:28AM -0400, Michael S. Tsirkin wrote: > > On Sat, Sep 02, 2023 at 04:37:19AM +, Bobby Eshleman wrote: > > > On Fri, Sep 01, 2023 at 09:31:03AM -0400, Michael S. Tsirkin wrote: >

[GIT PULL] virtio: features

2023-09-03 Thread Michael S. Tsirkin
can be sure we got the security store right. Signed-off-by: Michael S. Tsirkin Eugenio Pérez (4): vdpa: add VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK flag vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-02 Thread Michael S. Tsirkin
On Sat, Sep 02, 2023 at 04:37:19AM +, Bobby Eshleman wrote: > On Fri, Sep 01, 2023 at 09:31:03AM -0400, Michael S. Tsirkin wrote: > > On Wed, Aug 30, 2023 at 12:43:03AM +, Bobby Eshleman wrote: > > > On Tue, Aug 29, 2023 at 06:21:35PM -0400, Michael S. Tsirkin wrote: >

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-02 Thread Michael S. Tsirkin
On Sat, Sep 02, 2023 at 04:56:42AM +, Bobby Eshleman wrote: > On Fri, Sep 01, 2023 at 02:45:14PM +0200, Stefano Garzarella wrote: > > On Tue, Aug 29, 2023 at 09:29:45PM +, Bobby Eshleman wrote: > > > This adds support for datagrams to the virtio-vsock device. > > > > > > virtio-vsock

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-01 Thread Michael S. Tsirkin
On Wed, Aug 30, 2023 at 12:43:03AM +, Bobby Eshleman wrote: > On Tue, Aug 29, 2023 at 06:21:35PM -0400, Michael S. Tsirkin wrote: > > On Tue, Aug 29, 2023 at 09:29:45PM +, Bobby Eshleman wrote: > > > This adds support for datagrams to the virtio-vsock device. > &g

Re: [PATCH net-next V1 0/4] virtio_net: add per queue interrupt coalescing support

2023-08-30 Thread Michael S. Tsirkin
On Fri, Jul 14, 2023 at 10:10:51AM +0800, Xuan Zhuo wrote: > On Thu, 13 Jul 2023 07:40:12 -0400, "Michael S. Tsirkin" > wrote: > > On Mon, Jul 10, 2023 at 12:20:01PM +0300, Gavin Li wrote: > > > Currently, coalescing parameters are grouped for all transm

Re: [PATCH v3 0/3] vduse: add support for networking devices

2023-08-30 Thread Michael S. Tsirkin
On Wed, Aug 30, 2023 at 01:27:18PM +0200, Maxime Coquelin wrote: > > > On 8/29/23 19:05, Michael S. Tsirkin wrote: > > On Tue, Aug 29, 2023 at 03:34:06PM +0200, Maxime Coquelin wrote: > > > > > > > > > On 8/11/23 00:00, Jakub Kicinski wrote: > >

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-08-29 Thread Michael S. Tsirkin
On Tue, Aug 29, 2023 at 09:29:45PM +, Bobby Eshleman wrote: > This adds support for datagrams to the virtio-vsock device. > > virtio-vsock already supports stream and seqpacket types. The existing > message types and header fields are extended to support datagrams. > Semantic differences

Re: [PATCH v3 0/3] vduse: add support for networking devices

2023-08-29 Thread Michael S. Tsirkin
On Tue, Aug 29, 2023 at 03:34:06PM +0200, Maxime Coquelin wrote: > > > On 8/11/23 00:00, Jakub Kicinski wrote: > > On Thu, 10 Aug 2023 17:42:11 -0400 Michael S. Tsirkin wrote: > > > > Directly into the stack? I thought VDUSE is vDPA in user space, > > > >

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-27 Thread Michael S. Tsirkin
t; > On Tue, Aug 8, 2023 at 7:00 PM Yuan Yao wrote: > > Sorry for the confusing mail, I didn't understand how it works. > Thanks > > On Tue, Aug 8, 2023 at 6:13 PM Michael S. Tsirkin wrote: > > On Tue, Aug 08, 2023 at 05:37:29PM +0900, Yuan Yao wrote:

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-15 Thread Michael S. Tsirkin
On Tue, Aug 15, 2023 at 03:50:23PM +0800, Jason Wang wrote: > On Tue, Aug 15, 2023 at 2:32 PM Xuan Zhuo wrote: > > > > > > Hi, Jason > > > > Could you skip this patch? > > I'm fine with either merging or dropping this. > > > > > Let we review other patches firstly? > > I will be on vacation

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-14 Thread Michael S. Tsirkin
On Mon, Aug 14, 2023 at 04:56:53PM +0800, Xuan Zhuo wrote: > On Mon, 14 Aug 2023 11:05:49 +0800, Jason Wang wrote: > > On Thu, Aug 10, 2023 at 8:31 PM Xuan Zhuo > > wrote: > > > > > > Added virtqueue_dma_dev() to get DMA device for virtio. Then the > > > caller can do dma operation in advance.

[GIT PULL] virtio: bugfixes

2023-08-13 Thread Michael S. Tsirkin
-by: Michael S. Tsirkin Allen Hubbe (2): pds_vdpa: reset to vdpa specified mac pds_vdpa: alloc irq vectors on DRIVER_OK David Hildenbrand (4): virtio-mem: remove unsafe unplug in Big Block Mode (BBM) virtio-mem

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-08-13 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 01:51:36PM -0500, Mike Christie wrote: > On 8/10/23 1:57 PM, Michael S. Tsirkin wrote: > > On Sat, Jul 22, 2023 at 11:03:29PM -0500, michael.chris...@oracle.com wrote: > >> On 7/20/23 8:06 AM, Michael S. Tsirkin wrote: > >>> On Thu, Feb 02,

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

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:54:15PM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 5:51 PM Michael S. Tsirkin wrote: > > > > On Fri, Aug 11, 2023 at 05:43:25PM +0800, Jason Wang wrote: > > > On Fri, Aug 11, 2023 at 5:21 PM Michael S. Tsirkin > > > wrote: >

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

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:43:25PM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 5:21 PM Michael S. Tsirkin wrote: > > > > On Fri, Aug 11, 2023 at 05:18:51PM +0800, Jason Wang wrote: > > > On Fri, Aug 11, 2023 at 1:42 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:41:44PM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 5:25 PM Michael S. Tsirkin wrote: > > > > On Fri, Aug 11, 2023 at 05:15:39AM -0400, Jason Wang wrote: > > > We try to build affinity mask via create_affinity_masks() > > > uncon

Re: [PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:15:39AM -0400, Jason Wang wrote: > We try to build affinity mask via create_affinity_masks() > unconditionally which may lead several issues: > > - the affinity mask is not used for parent without affinity support > (only VDUSE support the affinity now) > - the logic

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

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:18:51PM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 1:42 PM Michael S. Tsirkin wrote: > > > > On Fri, Aug 11, 2023 at 10:23:15AM +0800, Jason Wang wrote: > > > On Fri, Aug 11, 2023 at 3:41 AM Michael S. Tsirkin > > > wrote: >

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

2023-08-10 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 10:23:15AM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 3:41 AM Michael S. Tsirkin wrote: > > > > On Tue, Aug 08, 2023 at 10:30:56AM +0800, Jason Wang wrote: > > > On Mon, Jul 31, 2023 at 2:30 PM Jason Wang wrote: > > > > >

Re: [PATCH v3 0/3] vduse: add support for networking devices

2023-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2023 at 02:29:49PM -0700, Jakub Kicinski wrote: > On Thu, 10 Aug 2023 15:04:27 -0400 Michael S. Tsirkin wrote: > > Another question is that with this userspace can inject > > packets directly into net stack. Should we check CAP_NET_ADMIN > > or such? > >

Re: [PATCH] virtio: a new vcpu watchdog driver

2023-08-10 Thread Michael S. Tsirkin
On Mon, Jul 31, 2023 at 09:25:12AM +0800, zhanghao1 wrote: > A new virtio pci driver is added for listening to vcpus > inside guest. Each vcpu creates a corresponding thread to > periodically send data to qemu's back-end watchdog device. > If a vCPU is in the stall state, data cannot be sent to >

Re: [PATCH] virtio_mmio: add suspend and resume calls for virtio_mmio devices

2023-08-10 Thread Michael S. Tsirkin
On Fri, Jul 28, 2023 at 12:31:27PM +0530, Anvesh Jain P wrote: > Handle suspend and resume calls for virtio mmio devices from > PM core. Expose these notifications to virtio drivers that can quiesce and > resume vq operations. Update virtio pm ops to handle freeze& restore and > suspend & resume

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

2023-08-10 Thread Michael S. Tsirkin
On Tue, Aug 08, 2023 at 10:30:56AM +0800, Jason Wang wrote: > On Mon, Jul 31, 2023 at 2:30 PM Jason Wang wrote: > > > > On Thu, Jul 27, 2023 at 5:46 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Jul 27, 2023 at 04:59:33PM +0800, Jason Wang wrote: > >

Re: [PATCH V3 04/14] virtio-blk: limit max allowed submit queues

2023-08-10 Thread Michael S. Tsirkin
er to apply > wrong queue mapping for handling IO, and IO timeout is triggered. > > Meantime, single queue makes much less resource utilization, and reduce > risk of kernel failure. > > Cc: Michael S. Tsirkin > Cc: Jason Wang > Cc: virtualization@lists.linux-foundation.org > S

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-10 Thread Michael S. Tsirkin
On Tue, Aug 08, 2023 at 07:05:38PM +0900, Yuan Yao wrote: > Sorry, but please ignore this thread. ok, dropped. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v3 0/3] vduse: add support for networking devices

2023-08-10 Thread Michael S. Tsirkin
On Wed, Jul 05, 2023 at 12:04:27PM +0200, Maxime Coquelin wrote: > This small series enables virtio-net device type in VDUSE. > With it, basic operation have been tested, both with > virtio-vdpa and vhost-vdpa using DPDK Vhost library series > adding VDUSE support using split rings layout (merged

Re: [PATCH v1 0/2] vduse: add support for networking devices

2023-08-10 Thread Michael S. Tsirkin
On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote: > This small series enables virtio-net device type in VDUSE. > With it, basic operation have been tested, both with > virtio-vdpa and vhost-vdpa using DPDK Vhost library series > adding VDUSE support using split rings layout (merged

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-08-10 Thread Michael S. Tsirkin
On Sat, Jul 22, 2023 at 11:03:29PM -0500, michael.chris...@oracle.com wrote: > On 7/20/23 8:06 AM, Michael S. Tsirkin wrote: > > On Thu, Feb 02, 2023 at 05:25:17PM -0600, Mike Christie wrote: > >> For vhost workers we use the kthread API which inherit's its values from >

Re: [PATCH 0/2] vdpa/mlx5: Fixes for ASID handling

2023-08-10 Thread Michael S. Tsirkin
On Wed, Aug 02, 2023 at 08:12:16PM +0300, Dragos Tatulea wrote: > This patch series is based on Eugenio's fix for handling CVQs in > a different ASID [0]. > > The first patch is the actual fix. > > The next 2 patches are fixing a possible issue that I found while > implementing patch 1. The

Re: [PATCH] virtio-net: Zero max_tx_vq field for VIRTIO_NET_CTRL_MQ_HASH_CONFIG case

2023-08-10 Thread Michael S. Tsirkin
quot;drivers/net/virtio_net: Added basic RSS support.") Cc: Andrew Melnychenko Acked-by: Michael S. Tsirkin And this is stable material I believe. > --- > > TestStep > > 1. Boot QEMU with one virtio-net-pci net device with `mq` and `hash` > feature on, comma

Re: [PATCH] virtio-net: Zero max_tx_vq field for VIRTIO_NET_CTRL_MQ_HASH_CONFIG case

2023-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2023 at 11:15:57AM +0800, Hawkins Jiawei wrote: > Kernel uses `struct virtio_net_ctrl_rss` to save command-specific-data > for both the VIRTIO_NET_CTRL_MQ_HASH_CONFIG and > VIRTIO_NET_CTRL_MQ_RSS_CONFIG commands. > > According to the VirtIO standard, "Field reserved MUST contain

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2023 at 02:37:20PM +0800, Jason Wang wrote: > On Thu, Aug 10, 2023 at 9:59 AM Xuan Zhuo wrote: > > > > > > Ping!! > > > > Could we push this to the next linux version? > > How about implementing the wrappers along with virtqueue_dma_dev() to > see if Christoph is happy? > >

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