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

2025-02-19 Thread Yu Zhang
On Thu, Feb 20, 2025 at 10:58:05AM +0800, Baolu Lu wrote: > On 2/19/25 18:35, Jean-Philippe Brucker wrote: > > On Wed, Feb 19, 2025 at 05:39:19PM +0800, Yu Zhang wrote: > > > On Thu, Feb 13, 2025 at 06:09:19PM +, Jean-Philippe Brucker wrote: > > > > On Fri, Feb 14, 2025 at 01:03:43AM +0800, Yu

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

2025-02-19 Thread Baolu Lu
On 2/19/25 18:35, Jean-Philippe Brucker wrote: On Wed, Feb 19, 2025 at 05:39:19PM +0800, Yu Zhang wrote: On Thu, Feb 13, 2025 at 06:09:19PM +, Jean-Philippe Brucker wrote: On Fri, Feb 14, 2025 at 01:03:43AM +0800, Yu Zhang wrote: On Thu, Feb 13, 2025 at 09:46:01AM +, Jean-Philippe Bruc

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

2025-02-19 Thread Yi Liu
On 2025/2/19 18:35, Jean-Philippe Brucker wrote: On Wed, Feb 19, 2025 at 05:39:19PM +0800, Yu Zhang wrote: On Thu, Feb 13, 2025 at 06:09:19PM +, Jean-Philippe Brucker wrote: On Fri, Feb 14, 2025 at 01:03:43AM +0800, Yu Zhang wrote: On Thu, Feb 13, 2025 at 09:46:01AM +, Jean-Philippe Br

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

2025-02-19 Thread Jean-Philippe Brucker
On Wed, Feb 19, 2025 at 07:11:43PM +0800, Yu Zhang wrote: > On Wed, Feb 19, 2025 at 10:35:18AM +, Jean-Philippe Brucker wrote: > > On Wed, Feb 19, 2025 at 05:39:19PM +0800, Yu Zhang wrote: > > > On Thu, Feb 13, 2025 at 06:09:19PM +, Jean-Philippe Brucker wrote: > > > > On Fri, Feb 14, 2025

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

2025-02-19 Thread Yu Zhang
On Wed, Feb 19, 2025 at 10:35:18AM +, Jean-Philippe Brucker wrote: > On Wed, Feb 19, 2025 at 05:39:19PM +0800, Yu Zhang wrote: > > On Thu, Feb 13, 2025 at 06:09:19PM +, Jean-Philippe Brucker wrote: > > > On Fri, Feb 14, 2025 at 01:03:43AM +0800, Yu Zhang wrote: > > > > On Thu, Feb 13, 2025

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

2025-02-19 Thread Jean-Philippe Brucker
On Wed, Feb 19, 2025 at 05:39:19PM +0800, Yu Zhang wrote: > On Thu, Feb 13, 2025 at 06:09:19PM +, Jean-Philippe Brucker wrote: > > On Fri, Feb 14, 2025 at 01:03:43AM +0800, Yu Zhang wrote: > > > On Thu, Feb 13, 2025 at 09:46:01AM +, Jean-Philippe Brucker wrote: > > > > Hi Jacob, > > > > >

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

2025-02-19 Thread Yu Zhang
On Thu, Feb 13, 2025 at 06:09:19PM +, Jean-Philippe Brucker wrote: > On Fri, Feb 14, 2025 at 01:03:43AM +0800, Yu Zhang wrote: > > On Thu, Feb 13, 2025 at 09:46:01AM +, Jean-Philippe Brucker wrote: > > > Hi Jacob, > > > > > > On Wed, Feb 12, 2025 at 09:47:23PM -0800, Jacob Pan wrote: > > >

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

2025-02-18 Thread Jason Gunthorpe
On Wed, Feb 12, 2025 at 09:47:23PM -0800, Jacob Pan wrote: > Hi Jason, > > On Wed, 12 Feb 2025 19:30:53 -0400 > Jason Gunthorpe wrote: > > > On Wed, Feb 12, 2025 at 11:22:35AM -0800, Jacob Pan wrote: > > > > > Do you foresee the implementation can leverage your generic iommu_pt > > > work? i.e.

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

2025-02-13 Thread Jean-Philippe Brucker
On Fri, Feb 14, 2025 at 01:03:43AM +0800, Yu Zhang wrote: > On Thu, Feb 13, 2025 at 09:46:01AM +, Jean-Philippe Brucker wrote: > > Hi Jacob, > > > > On Wed, Feb 12, 2025 at 09:47:23PM -0800, Jacob Pan wrote: > > > Our code and backend support are still in the early stages, that is why > > > I

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

2025-02-13 Thread Yu Zhang
On Thu, Feb 13, 2025 at 09:46:01AM +, Jean-Philippe Brucker wrote: > Hi Jacob, > > On Wed, Feb 12, 2025 at 09:47:23PM -0800, Jacob Pan wrote: > > Our code and backend support are still in the early stages, that is why > > I am attempting to convert virtio-iommu driver to iommu_pt. Not sure if

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

2025-02-13 Thread Jean-Philippe Brucker
Hi Jacob, On Wed, Feb 12, 2025 at 09:47:23PM -0800, Jacob Pan wrote: > Our code and backend support are still in the early stages, that is why > I am attempting to convert virtio-iommu driver to iommu_pt. Not sure if > anyone has done the QEMU part to support VIRTIO_IOMMU_F_ATTACH_TABLE? > @Jean @

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

2025-02-12 Thread Jacob Pan
Hi Jason, On Wed, 12 Feb 2025 19:30:53 -0400 Jason Gunthorpe wrote: > On Wed, Feb 12, 2025 at 11:22:35AM -0800, Jacob Pan wrote: > > > Do you foresee the implementation can leverage your generic iommu_pt > > work? i.e. for building guest IO page tables. It will add a new > > flavor (page table

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

2025-02-12 Thread Jason Gunthorpe
On Wed, Feb 12, 2025 at 11:22:35AM -0800, Jacob Pan wrote: > Do you foresee the implementation can leverage your generic iommu_pt > work? i.e. for building guest IO page tables. It will add a new flavor > (page table based in addition to map/unmap) to > viommu_domain_alloc_paging() i think. Yes I

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

2025-02-12 Thread Jacob Pan
Hi Jason, On Fri, 7 Feb 2025 10:46:03 -0400 Jason Gunthorpe wrote: > virtio has the complication that it sometimes wants to return a paging > domain for IDENTITY which makes this conversion a little different > than other drivers. > > Add a viommu_domain_alloc_paging() that combines > viommu_d

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

2025-02-07 Thread Jason Gunthorpe
virtio has the complication that it sometimes wants to return a paging domain for IDENTITY which makes this conversion a little different than other drivers. Add a viommu_domain_alloc_paging() that combines viommu_domain_alloc() and viommu_domain_finalise() to always return a fully initialized and