Re: [PATCH V4 vfio 8/9] vfio/pci: Expose vfio_pci_iowrite/read##size()

2023-11-30 Thread Alex Williamson
On Wed, 29 Nov 2023 16:37:45 +0200 Yishai Hadas wrote: > Expose vfio_pci_iowrite/read##size() to let it be used by drivers. > > This functionality is needed to enable direct access to some physical > BAR of the device with the proper locks/checks in place. > > The next patches from this series

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

2023-11-30 Thread Alex Williamson
On Wed, 29 Nov 2023 16:37:46 +0200 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, there

Re: [PATCH V4 vfio 8/9] vfio/pci: Expose vfio_pci_iowrite/read##size()

2023-12-04 Thread Alex Williamson
On Sun, 3 Dec 2023 16:14:15 +0200 Yishai Hadas wrote: > On 30/11/2023 21:20, Alex Williamson wrote: > > On Wed, 29 Nov 2023 16:37:45 +0200 > > Yishai Hadas wrote: > > > >> Expose vfio_pci_iowrite/read##size() to let it be used by drivers. > >> >

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

2023-12-04 Thread Alex Williamson
On Sun, 3 Dec 2023 16:54:41 +0200 Yishai Hadas wrote: > On 01/12/2023 0:10, Alex Williamson wrote: > > On Wed, 29 Nov 2023 16:37:46 +0200 > > Yishai Hadas wrote: > > > >> Introduce a vfio driver over virtio devices to support the legacy > &

Re: [PATCH V5 vfio 8/9] vfio/pci: Expose vfio_pci_core_iowrite/read##size()

2023-12-05 Thread Alex Williamson
On Tue, 5 Dec 2023 19:06:22 +0200 Yishai Hadas wrote: > Expose vfio_pci_core_iowrite/read##size() to let it be used by drivers. > > This functionality is needed to enable direct access to some physical > BAR of the device with the proper locks/checks in place. > > The next patches from this ser

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

2023-12-13 Thread Alex Williamson
On Wed, 13 Dec 2023 14:25:10 +0200 Yishai Hadas wrote: > On 13/12/2023 10:23, Tian, Kevin wrote: > >> + > >> +static int virtiovf_pci_probe(struct pci_dev *pdev, > >> +const struct pci_device_id *id) > >> +{ > >> + const struct vfio_device_ops *ops = &virtiovf_vfio_pci_

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

2023-12-14 Thread Alex Williamson
On Thu, 14 Dec 2023 11:37:10 +0200 Yishai Hadas wrote: > On 14/12/2023 11:19, Michael S. Tsirkin wrote: > > On Thu, Dec 14, 2023 at 11:03:49AM +0200, Yishai Hadas wrote: > >> On 14/12/2023 8:38, Michael S. Tsirkin wrote: > >>> On Thu, Dec 07, 2023 at 12:28:20PM +0200, Yishai Hadas wrote: >

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

2023-12-14 Thread Alex Williamson
On Thu, 14 Dec 2023 18:03:30 +0200 Yishai Hadas wrote: > On 14/12/2023 17:05, Michael S. Tsirkin wrote: > > On Thu, Dec 14, 2023 at 07:59:05AM -0700, Alex Williamson wrote: > >> On Thu, 14 Dec 2023 11:37:10 +0200 > >> Yishai Hadas wrote: > >>>>>

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

2023-12-18 Thread Alex Williamson
On Mon, 18 Dec 2023 10:37:55 +0200 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, there

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

2023-12-19 Thread Alex Williamson
On Tue, 19 Dec 2023 11:32:38 +0200 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]. > > In some sys

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

2023-12-19 Thread Alex Williamson
On Tue, 19 Dec 2023 13:44:25 -0500 "Michael S. Tsirkin" wrote: > On Tue, Dec 19, 2023 at 10:14:52AM -0700, Alex Williamson wrote: > > On Tue, 19 Dec 2023 11:32:38 +0200 > > Yishai Hadas wrote: > > > > > This series introduce a vfio driver over vi

Re: [PATCH vfio 0/7] Enhances the vfio-virtio driver to support live migration

2024-10-29 Thread Alex Williamson
On Mon, 28 Oct 2024 17:46:57 + Parav Pandit wrote: > > From: Alex Williamson > > Sent: Monday, October 28, 2024 10:24 PM > > > > On Mon, 28 Oct 2024 13:23:54 -0300 > > Jason Gunthorpe wrote: > > > > > On Mon, Oct 28, 2024 at 10:13:48AM -06

Re: [PATCH V1 vfio 5/7] vfio/virtio: Add support for the basic live migration functionality

2024-11-05 Thread Alex Williamson
On Mon, 4 Nov 2024 12:21:29 +0200 Yishai Hadas wrote: > diff --git a/drivers/vfio/pci/virtio/main.c b/drivers/vfio/pci/virtio/main.c > index b5d3a8c5bbc9..e2cdf2d48200 100644 > --- a/drivers/vfio/pci/virtio/main.c > +++ b/drivers/vfio/pci/virtio/main.c ... > @@ -485,16 +478,66 @@ static bool virti

Re: [PATCH V1 vfio 6/7] vfio/virtio: Add PRE_COPY support for live migration

2024-11-05 Thread Alex Williamson
On Mon, 4 Nov 2024 12:21:30 +0200 Yishai Hadas wrote: > Add PRE_COPY support for live migration. > > This functionality may reduce the downtime upon STOP_COPY as of letting > the target machine to get some 'initial data' from the source once the > machine is still in its RUNNING state and let it

Re: [PATCH V1 vfio 7/7] vfio/virtio: Enable live migration once VIRTIO_PCI was configured

2024-11-05 Thread Alex Williamson
On Mon, 4 Nov 2024 12:21:31 +0200 Yishai Hadas wrote: > Now that the driver supports live migration, only the legacy IO > functionality depends on config VIRTIO_PCI_ADMIN_LEGACY. > > Move the legacy IO into a separate file to be compiled only once > VIRTIO_PCI_ADMIN_LEGACY was configured and let

Re: [PATCH vfio 0/7] Enhances the vfio-virtio driver to support live migration

2024-11-01 Thread Alex Williamson
On Thu, 31 Oct 2024 15:04:51 + Parav Pandit wrote: > > From: Alex Williamson > > Sent: Wednesday, October 30, 2024 1:58 AM > > > > On Mon, 28 Oct 2024 17:46:57 + > > Parav Pandit wrote: > > > > > > From: Alex Williamson

Re: [PATCH vfio 0/7] Enhances the vfio-virtio driver to support live migration

2024-10-28 Thread Alex Williamson
On Sun, 27 Oct 2024 12:07:44 +0200 Yishai Hadas wrote: > > - According to the Virtio specification, a device has only two states: > RUNNING and STOPPED. Consequently, certain VFIO transitions (e.g., > RUNNING_P2P->STOP, STOP->RUNNING_P2P) are treated as no-ops. When > transitioning to RUNNI

Re: [PATCH vfio 0/7] Enhances the vfio-virtio driver to support live migration

2024-10-28 Thread Alex Williamson
On Mon, 28 Oct 2024 13:23:54 -0300 Jason Gunthorpe wrote: > On Mon, Oct 28, 2024 at 10:13:48AM -0600, Alex Williamson wrote: > > > If the virtio spec doesn't support partial contexts, what makes it > > beneficial here? > > It stil lets the receiver 'wa

Re: [PATCH vfio 0/7] Enhances the vfio-virtio driver to support live migration

2024-10-28 Thread Alex Williamson
On Sun, 27 Oct 2024 12:07:44 +0200 Yishai Hadas wrote: > This series enhances the vfio-virtio driver to support live migration > for virtio-net Virtual Functions (VFs) that are migration-capable. What's the status of making virtio-net VFs in QEMU migration capable? There would be some obvious b

Re: [PATCH V1 vfio 7/7] vfio/virtio: Enable live migration once VIRTIO_PCI was configured

2024-11-11 Thread Alex Williamson
On Mon, 11 Nov 2024 15:30:47 + Joao Martins wrote: > On 11/11/2024 14:17, Yishai Hadas wrote: > > On 11/11/2024 12:32, Joao Martins wrote: > >    depends on VIRTIO_PCI > >    select VFIO_PCI_CORE > >    select IOMMUFD_DRIVER > > IIUC, this is

Re: [PATCH V3 vfio 5/7] vfio/virtio: Add support for the basic live migration functionality

2024-11-12 Thread Alex Williamson
On Tue, 12 Nov 2024 10:37:27 +0200 Yishai Hadas wrote: > diff --git a/drivers/vfio/pci/virtio/migrate.c > b/drivers/vfio/pci/virtio/migrate.c > new file mode 100644 > index ..3d5eaa1cbcdb > --- /dev/null > +++ b/drivers/vfio/pci/virtio/migrate.c ... > +static int virtiovf_add_migratio

Re: [PATCH V1 vfio 7/7] vfio/virtio: Enable live migration once VIRTIO_PCI was configured

2024-11-07 Thread Alex Williamson
On Thu, 7 Nov 2024 14:57:39 +0200 Yishai Hadas wrote: > On 07/11/2024 0:27, Alex Williamson wrote: > > On Wed, 6 Nov 2024 09:59:09 -0400 > > Jason Gunthorpe wrote: > > > >> On Tue, Nov 05, 2024 at 04:29:04PM -0700, Alex Williamson wrote: > >>>

Re: [PATCH V1 vfio 7/7] vfio/virtio: Enable live migration once VIRTIO_PCI was configured

2024-11-06 Thread Alex Williamson
On Wed, 6 Nov 2024 09:59:09 -0400 Jason Gunthorpe wrote: > On Tue, Nov 05, 2024 at 04:29:04PM -0700, Alex Williamson wrote: > > > @@ -1,7 +1,7 @@ > > > # SPDX-License-Identifier: GPL-2.0-only > > > config VIRTIO_VFIO_PCI > > > tristate &

Re: [PATCH V1 vfio 0/7] Enhance the vfio-virtio driver to support live migration

2024-11-06 Thread Alex Williamson
On Wed, 6 Nov 2024 04:32:31 -0500 "Michael S. Tsirkin" wrote: > On Mon, Nov 04, 2024 at 12:21:24PM +0200, Yishai Hadas wrote: > > This series enhances the vfio-virtio driver to support live migration > > for virtio-net Virtual Functions (VFs) that are migration-capable. > > > > This series foll

Re: [PATCH V1 vfio 5/7] vfio/virtio: Add support for the basic live migration functionality

2024-11-06 Thread Alex Williamson
On Wed, 6 Nov 2024 12:21:03 +0200 Yishai Hadas wrote: > On 06/11/2024 0:47, Alex Williamson wrote: > > On Mon, 4 Nov 2024 12:21:29 +0200 > > Yishai Hadas wrote: > >> diff --git a/drivers/vfio/pci/virtio/main.c > >> b/drivers/vfio/pci/virtio/main.c > >&g

Re: [PATCH V1 vfio 6/7] vfio/virtio: Add PRE_COPY support for live migration

2024-11-06 Thread Alex Williamson
On Wed, 6 Nov 2024 13:16:34 +0200 Yishai Hadas wrote: > On 06/11/2024 1:18, Alex Williamson wrote: > > On Mon, 4 Nov 2024 12:21:30 +0200 > > Yishai Hadas wrote: > > > >> Add PRE_COPY support for live migration. > >> > >> This functionality may

Re: [PATCH V4 vfio 5/7] vfio/virtio: Add support for the basic live migration functionality

2024-11-13 Thread Alex Williamson
On Wed, 13 Nov 2024 13:51:58 +0200 Yishai Hadas wrote: > diff --git a/drivers/vfio/pci/virtio/migrate.c > b/drivers/vfio/pci/virtio/migrate.c > new file mode 100644 > index ..a0ce3ec2c734 > --- /dev/null > +++ b/drivers/vfio/pci/virtio/migrate.c ... > +static int virtiovf_add_migratio

Re: [PATCH V4 vfio 0/7] Enhance the vfio-virtio driver to support live migration

2024-11-14 Thread Alex Williamson
On Wed, 13 Nov 2024 13:51:53 +0200 Yishai Hadas wrote: > This series enhances the vfio-virtio driver to support live migration > for virtio-net Virtual Functions (VFs) that are migration-capable. Applied to vfio next branch for v6.13. Thanks, Alex

Re: [PATCH V1 vfio] vfio/virtio: Enable support for virtio-block live migration

2025-03-10 Thread Alex Williamson
On Sun, 2 Mar 2025 18:27:23 +0200 Yishai Hadas wrote: > With a functional and tested backend for virtio-block live migration, > add the virtio-block device ID to the pci_device_id table. > > Currently, the driver supports legacy IO functionality only for > virtio-net, and it is accounted for in

Re: [PATCH vfio] vfio/virtio: Enable support for virtio-block live migration

2025-02-27 Thread Alex Williamson
On Wed, 26 Feb 2025 13:51:17 +0200 Yishai Hadas wrote: > On 26/02/2025 10:06, Tian, Kevin wrote: > >> From: Yishai Hadas > >> Sent: Monday, February 24, 2025 8:19 PM > >> > >> config VIRTIO_VFIO_PCI > >> - tristate "VFIO support for VIRTIO NET PCI VF devices" > >> + tristate "VFIO support fo

Re: [PATCH] vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD

2025-06-24 Thread Alex Williamson
On Tue, 24 Jun 2025 15:34:40 -0300 Jason Gunthorpe wrote: > This was missed during the initial implementation. The VFIO PCI encodes > the vf_token inside the device name when opening the device from the group > FD, something like: > > ":04:10.0 vf_token=bd8d9d2b-5a5f-4f5a-a211-f591514ba1f3

Re: [PATCH v3] vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD

2025-07-16 Thread Alex Williamson
On Tue, 15 Jul 2025 20:06:18 -0300 Jason Gunthorpe wrote: > On Wed, Jul 16, 2025 at 01:55:45AM +0300, Dan Carpenter wrote: > > 5fcc26969a164e Yi Liu 2023-07-18 117 > > mutex_lock(&device->dev_set->lock); > > 5fcc26969a164e Yi Liu 2023-07-18 118 /* one device cannot

Re: [PATCH v2] vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD

2025-07-14 Thread Alex Williamson
On Mon, 14 Jul 2025 11:29:04 -0300 Jason Gunthorpe wrote: > On Mon, Jul 14, 2025 at 09:12:30PM +0800, Yi Liu wrote: > > On 2025/7/10 23:30, Jason Gunthorpe wrote: > > > This was missed during the initial implementation. The VFIO PCI encodes > > > the vf_token inside the device name when opening

Re: [PATCH v3] vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD

2025-07-16 Thread Alex Williamson
On Mon, 14 Jul 2025 13:08:25 -0300 Jason Gunthorpe wrote: > This was missed during the initial implementation. The VFIO PCI encodes > the vf_token inside the device name when opening the device from the group > FD, something like: > > ":04:10.0 vf_token=bd8d9d2b-5a5f-4f5a-a211-f591514ba1f3