Re: [PATCH 09/16] iommu/iommufd: use page allocation function provided by iommu-pages.h

2023-11-29 Thread Pasha Tatashin
On Tue, Nov 28, 2023 at 6:52 PM Jason Gunthorpe wrote: > > On Tue, Nov 28, 2023 at 08:49:31PM +, Pasha Tatashin wrote: > > Convert iommu/iommufd/* files to use the new page allocation functions > > provided in iommu-pages.h. > > > > Signed-off-by: Pasha Tatashin > > --- > >

Re: [PATCH 04/16] iommu/io-pgtable-dart: use page allocation function provided by iommu-pages.h

2023-11-29 Thread Pasha Tatashin
> Reviewed-by: Janne Grunau Thank you, Pasha

Re: [PATCH 16/16] vfio: account iommu allocations

2023-11-29 Thread Pasha Tatashin
On Tue, Nov 28, 2023 at 6:53 PM Jason Gunthorpe wrote: > > On Tue, Nov 28, 2023 at 08:49:38PM +, Pasha Tatashin wrote: > > iommu allocations should be accounted in order to allow admins to > > monitor and limit the amount of iommu memory. > > > > Signed-off-by: Pasha Tatashin > > --- > >

Re: [PATCH 08/16] iommu/fsl: use page allocation function provided by iommu-pages.h

2023-11-29 Thread Pasha Tatashin
On Wed, Nov 29, 2023 at 3:03 PM Jason Gunthorpe wrote: > > On Wed, Nov 29, 2023 at 02:45:03PM -0500, Pasha Tatashin wrote: > > > > same kind of big systems where IOMMU pagetables would be of any concern. > > > I believe some of the some of the "serious" NICs can easily run up > > > hundreds of

Re: [PATCH 08/16] iommu/fsl: use page allocation function provided by iommu-pages.h

2023-11-29 Thread Jason Gunthorpe
On Wed, Nov 29, 2023 at 02:45:03PM -0500, Pasha Tatashin wrote: > > same kind of big systems where IOMMU pagetables would be of any concern. > > I believe some of the some of the "serious" NICs can easily run up > > hundreds of megabytes if not gigabytes worth of queues, SKB pools, etc. > > -

Re: [PATCH 08/16] iommu/fsl: use page allocation function provided by iommu-pages.h

2023-11-29 Thread Pasha Tatashin
> >> We can separate the metric into two: > >> iommu pagetable only > >> iommu everything > >> > >> or into three: > >> iommu pagetable only > >> iommu dma > >> iommu everything > >> > >> What do you think? > > > > I think I said this at LPC - if you want to have fine grained > > accounting of

Re: [PATCH 08/16] iommu/fsl: use page allocation function provided by iommu-pages.h

2023-11-29 Thread Robin Murphy
On 28/11/2023 11:50 pm, Jason Gunthorpe wrote: On Tue, Nov 28, 2023 at 06:00:13PM -0500, Pasha Tatashin wrote: On Tue, Nov 28, 2023 at 5:53 PM Robin Murphy wrote: On 2023-11-28 8:49 pm, Pasha Tatashin wrote: Convert iommu/fsl_pamu.c to use the new page allocation functions provided in

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

2023-11-29 Thread Yishai Hadas
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/virtio coming driver. Signed-off-by: Yishai Hadas ---

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

2023-11-29 Thread Yishai Hadas
Introduce APIs to execute legacy IO admin commands. It includes: io_legacy_read/write for both common and the device configuration, io_legacy_notify_info. In addition, exposing an API to check whether the legacy IO commands are supported. (i.e. virtio_pci_admin_has_legacy_io()). Those APIs will

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

2023-11-29 Thread Yishai Hadas
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 generic layer, enables multiple types of upper layer drivers such as vfio,

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

2023-11-29 Thread Yishai Hadas
From: Feng Liu Add support for sending admin command through admin virtqueue interface. Abort any inflight admin commands once device reset completes. Activate admin queue when device becomes ready; deactivate on device reset. To comply to the below specification statement [1], the admin

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

2023-11-29 Thread Yishai Hadas
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 systems, there is a need to support a virtio legacy driver with a

[PATCH V4 vfio 1/9] virtio: Define feature bit for administration virtqueue

2023-11-29 Thread Yishai Hadas
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file changed, 7 insertions(+), 1