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

2023-12-13 Thread Tian, Kevin
> From: Yishai Hadas > Sent: Thursday, December 7, 2023 6:28 PM > > Any read/write towards the control parts of the BAR will be captured by > the new driver and will be translated into admin commands towards the > device. > > Any data path read/write access (i.e. virtio driver notifications) wil

RE: [PATCH V7 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-12-13 Thread Tian, Kevin
> From: Yishai Hadas > Sent: Thursday, December 7, 2023 6:28 PM > > Expose vfio_pci_core_setup_barmap() to be used by drivers. > > This will let drivers to mmap a BAR and re-use it from both vfio and the > driver when it's applicable. > > This API will be used in the next patches by the vfio/vi

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

2023-12-13 Thread Tian, Kevin
> From: Yishai Hadas > Sent: Thursday, December 7, 2023 6:28 PM > > 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 f

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

2023-12-13 Thread Tian, Kevin
> From: Alex Williamson > Sent: Thursday, December 14, 2023 4:24 AM > > 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

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

2023-12-13 Thread Tian, Kevin
> From: Yishai Hadas > Sent: Wednesday, December 13, 2023 8:25 PM > > On 13/12/2023 10:23, Tian, Kevin wrote: > >> From: Yishai Hadas > >> Sent: Thursday, December 7, 2023 6:28 PM > >> > >> + > >> +static ssize

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

2023-12-14 Thread Tian, Kevin
> From: Yishai Hadas > Sent: Thursday, December 14, 2023 4:58 PM > > On 14/12/2023 8:07, Tian, Kevin wrote: > >> From: Yishai Hadas > >> Sent: Wednesday, December 13, 2023 8:25 PM > >> > >> On 13/12/2023 10:23, Tian, Kevin wrote: > >>

RE: [PATCH V8 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-12-14 Thread Tian, Kevin
> From: Yishai Hadas > Sent: Thursday, December 14, 2023 8:38 PM > > 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: mmap_assert_write_locked warnings during for vhost_vdpa_fault

2024-06-17 Thread Tian, Kevin
> From: Jason Wang > Sent: Tuesday, June 18, 2024 9:18 AM > > On Mon, Jun 17, 2024 at 11:51 PM Dragos Tatulea > wrote: > > > > Hi, > > > > After commit ba168b52bf8e "mm: use rwsem assertion macros for > > mmap_lock") was submitted, we started getting a lot of the > > following warnings about a m

RE: [PATCH v4 1/5] iommu/virtio: Break out bypass identity support into a global static

2025-04-09 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, April 9, 2025 12:36 AM > > To make way for a domain_alloc_paging conversion add the typical global > static IDENTITY domain. This supports VMMs that have a > VIRTIO_IOMMU_F_BYPASS_CONFIG config. > > If the VMM does not have support then the domain_alloc

RE: [PATCH v4 5/5] iommu: Hide ops.domain_alloc behind CONFIG_FSL_PAMU

2025-04-09 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, April 9, 2025 12:36 AM > > +#if IS_ENABLED(CONFIG_FSL_PAMU) > struct iommu_domain *(*domain_alloc)(unsigned > iommu_domain_type); > +#endif what about directly calling it as domain_alloc_fsl(), given no more drivers can support it? Reviewed-by: K

RE: [PATCH v4 4/5] iommu: Do not call domain_alloc() in iommu_sva_domain_alloc()

2025-04-09 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, April 9, 2025 12:36 AM > > No driver implements SVA under domain_alloc() anymore, this is dead > code. > > Reviewed-by: Lu Baolu > Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian

RE: [PATCH v4 3/5] iommu/virtio: Move to domain_alloc_paging()

2025-04-10 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, April 9, 2025 12:36 AM > > +static struct iommu_domain *viommu_domain_alloc_identity(struct device > *dev) > +{ > + struct viommu_endpoint *vdev = dev_iommu_priv_get(dev); > + struct iommu_domain *domain; > + int ret; > + > + if (virtio_h

RE: [PATCH v4 2/5] iommu: Add domain_alloc_identity()

2025-04-10 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, April 9, 2025 12:36 AM > > + * @domain_alloc_identity: allocate an IDENTITY domain. Drivers should > prefer to > + * use identity_domain instead. This should only be > used > + * if dynamic logic is necess

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

2025-02-27 Thread Tian, Kevin
> From: Alex Williamson > Sent: Friday, February 28, 2025 6:55 AM > > 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, 202

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

2025-02-26 Thread Tian, Kevin
> 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 for VIRTIO NET,BLOCK PCI VF devices" > depends on VIRTIO_PCI > select VFIO_PCI_CORE > help > -

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

2025-07-10 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, July 3, 2025 9:41 PM > > On Thu, Jul 03, 2025 at 06:40:48AM +, Tian, Kevin wrote: > > > From: Jason Gunthorpe > > > Sent: Wednesday, June 25, 2025 2:35 AM > > > > > > @@ -1583,

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

2025-07-10 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, July 10, 2025 11:30 PM > > 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-f

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

2025-07-02 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, June 25, 2025 2:35 AM > > 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-f

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

2025-07-14 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Tuesday, July 15, 2025 12:08 AM > > 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-f5