Hi Jason,

> -----Original Message-----
> From: Jason Gunthorpe <[email protected]>
> Sent: Tuesday, November 7, 2023 3:32 AM
> To: Zhang, Tina <[email protected]>
> Cc: Jean-Philippe Brucker <[email protected]>; Tian, Kevin
> <[email protected]>; Lu Baolu <[email protected]>; [email protected];
> [email protected]; Liu, Yi L <[email protected]>; [email protected]
> foundation.org; [email protected]; [email protected]
> Subject: Re: [RFC PATCH 2/5] iommu/vt-d: Add generic IO page table support
> 
> On Mon, Nov 06, 2023 at 02:12:23AM -0500, Tina Zhang wrote:
> > Add basic hook up code to implement generic IO page table framework.
> >
> > Signed-off-by: Tina Zhang <[email protected]>
> > ---
> >  drivers/iommu/intel/Kconfig |  1 +
> >  drivers/iommu/intel/iommu.c | 94
> > +++++++++++++++++++++++++++++++++++++
> >  drivers/iommu/intel/iommu.h |  7 +++
> >  drivers/iommu/io-pgtable.c  |  3 ++
> >  include/linux/io-pgtable.h  |  2 +
> >  5 files changed, 107 insertions(+)
> 
> If this is going to happen can we also convert vt-d to actually use the io 
> page
> table stuff directly and shuffle the code around so it is structured like the 
> rest of
> the io page table implementations?
Converting VT-d driver to use io page table involves much code change. I made a 
local version of it, and it didn't prove much benefit.

VT-d only supports one 1st-stage IO pgtable format and one 2nd-stage IO pgtable 
format. So, the current IO pgtable handling operations seems more efficient 
comparing to adding another layer callbacks in them.

We have a plan to add a new io_pgtable.c file under VT-d driver directory and 
use that file to collect IO pgtable related functions. But we want to hold on 
converting VT-d to use the IO page table directly unless we can see some 
benefits.

Regards,
-Tina
> 
> Jason

Reply via email to