RE: [RFC PATCH 4/4] iommu/vt-d: Identify domains using first level page table

2019-09-25 Thread Tian, Kevin
> From: Peter Xu [mailto:pet...@redhat.com] > Sent: Wednesday, September 25, 2019 2:50 PM > > On Mon, Sep 23, 2019 at 08:24:54PM +0800, Lu Baolu wrote: > > +/* > > + * Check and return whether first level is used by default for > > + * DMA translation. > > + */ > > +static bool

Re: [RFC PATCH 4/4] iommu/vt-d: Identify domains using first level page table

2019-09-25 Thread Peter Xu
On Mon, Sep 23, 2019 at 08:24:54PM +0800, Lu Baolu wrote: > +/* > + * Check and return whether first level is used by default for > + * DMA translation. > + */ > +static bool first_level_by_default(void) > +{ > + struct dmar_drhd_unit *drhd; > + struct intel_iommu *iommu; > + > +

[RFC PATCH 4/4] iommu/vt-d: Identify domains using first level page table

2019-09-23 Thread Lu Baolu
This checks whether a domain should use first level page table for map/unmap. And if so, we should attach the domain to the device in first level translation mode. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Cc: Yi Sun Cc: Sanjay Kumar Signed-off-by: Lu Baolu ---