Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-24 Thread Jason Gunthorpe
On Fri, Feb 21, 2025 at 11:42:06AM +, Jean-Philippe Brucker wrote: > > There is no requirement that an iommu driver implement identity, this > > is all an optimization. If it doesn't work in alot of cases can we > > just remove it? It would simplfy a lot.. > > No objection. Identity domains a

Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-21 Thread Jean-Philippe Brucker
On Wed, Feb 12, 2025 at 08:50:07AM -0400, Jason Gunthorpe wrote: > On Tue, Feb 11, 2025 at 04:41:51PM -0800, Jacob Pan wrote: > > > I see the same on arm64 with v9.0, assigned an ixgbe nic via VFIO. > > Huh, I figured it worked on ARM.. Crosvm would be a more useful test because it doesn't imple

Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-12 Thread Robin Murphy
On 2025-02-12 6:50 pm, Jacob Pan wrote: Hi Jason, On Wed, 12 Feb 2025 08:50:07 -0400 Jason Gunthorpe wrote: On Tue, Feb 11, 2025 at 04:41:51PM -0800, Jacob Pan wrote: I see the same on arm64 with v9.0, assigned an ixgbe nic via VFIO. Huh, I figured it worked on ARM.. There is no requirem

Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-12 Thread Jean-Philippe Brucker
On Wed, Feb 12, 2025 at 09:05:35AM -0800, Jacob Pan wrote: > > Does reproducing this require > > modifying QEMU or Linux to disable support for F_BYPASS_CONFIG, or > > just passing QEMU/kernel parameters? > I only modified guest code to pretend F_BYPASS_CONFIG is not supported, > a couple of plac

Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-12 Thread Jacob Pan
Hi Jason, On Wed, 12 Feb 2025 08:50:07 -0400 Jason Gunthorpe wrote: > On Tue, Feb 11, 2025 at 04:41:51PM -0800, Jacob Pan wrote: > > > I see the same on arm64 with v9.0, assigned an ixgbe nic via VFIO. > > Huh, I figured it worked on ARM.. > > There is no requirement that an iommu driver im

Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-12 Thread Jacob Pan
Hi Jean-Philippe, On Wed, 12 Feb 2025 11:58:45 + Jean-Philippe Brucker wrote: > Hi Jacob, > > On Tue, Feb 11, 2025 at 04:41:51PM -0800, Jacob Pan wrote: > > > However, there seem to be some unrelated qemu bugs. 7.0.0 does not > > > have working VIRTIO_IOMMU_F_BYPASS_CONFIG and neither qemu

Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-12 Thread Jason Gunthorpe
On Tue, Feb 11, 2025 at 04:41:51PM -0800, Jacob Pan wrote: > I see the same on arm64 with v9.0, assigned an ixgbe nic via VFIO. Huh, I figured it worked on ARM.. There is no requirement that an iommu driver implement identity, this is all an optimization. If it doesn't work in alot of cases can

Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-12 Thread Jean-Philippe Brucker
Hi Jacob, On Tue, Feb 11, 2025 at 04:41:51PM -0800, Jacob Pan wrote: > > However, there seem to be some unrelated qemu bugs. 7.0.0 does not > > have working VIRTIO_IOMMU_F_BYPASS_CONFIG and neither qemu works with > > an IDENTITY domain using !VIRTIO_IOMMU_F_BYPASS_CONFIG. It prints: > > > > qem

Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-11 Thread Jacob Pan
Hi Jason, On Fri, 7 Feb 2025 10:46:00 -0400 Jason Gunthorpe wrote: > virtio-iommu and fsl_pamu are the only two drivers left that still > rely on ops.domain_alloc() > > Update virtio-iommu to have a global static identity domain, implement > domain_alloc_paging(), and finalize its domain durin

[PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()

2025-02-07 Thread Jason Gunthorpe
virtio-iommu and fsl_pamu are the only two drivers left that still rely on ops.domain_alloc() Update virtio-iommu to have a global static identity domain, implement domain_alloc_paging(), and finalize its domain during allocation instead of on first attach. As virtio-iommu was the last real iommu