Re: [PATCH v8 08/10] iommu/vt-d: Add custom allocator for IOASID

2020-01-09 Thread Lu Baolu
Hi, On 1/10/20 6:06 AM, Jacob Pan wrote: +static void register_pasid_allocator(struct intel_iommu *iommu) +{ + if (!intel_iommu_sm) { Use sm_supported(iommu) instead. sounds good, seems we could separate the sm code more cleanly in the future to avoid all these checks. Agreed. Best

Re: [PATCH v8 08/10] iommu/vt-d: Add custom allocator for IOASID

2020-01-09 Thread Jacob Pan
On Wed, 18 Dec 2019 12:10:55 +0800 Lu Baolu wrote: > Hi, > > On 12/17/19 3:24 AM, Jacob Pan wrote: > > When VT-d driver runs in the guest, PASID allocation must be > > performed via virtual command interface. This patch registers a > > custom IOASID allocator which takes precedence over the defa

Re: [PATCH v8 08/10] iommu/vt-d: Add custom allocator for IOASID

2019-12-17 Thread Lu Baolu
Hi, On 12/17/19 3:24 AM, Jacob Pan wrote: When VT-d driver runs in the guest, PASID allocation must be performed via virtual command interface. This patch registers a custom IOASID allocator which takes precedence over the default XArray based allocator. The resulting IOASID allocation will alwa

[PATCH v8 08/10] iommu/vt-d: Add custom allocator for IOASID

2019-12-16 Thread Jacob Pan
When VT-d driver runs in the guest, PASID allocation must be performed via virtual command interface. This patch registers a custom IOASID allocator which takes precedence over the default XArray based allocator. The resulting IOASID allocation will always come from the host. This ensures that PASI