Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-09 Thread Lu Baolu
Hi, On 3/9/19 7:49 PM, James Sewart wrote: Hey Lu, On 9 Mar 2019, at 01:53, Lu Baolu wrote: Hi James, On 3/9/19 12:57 AM, James Sewart wrote: Hey Lu, On 8 Mar 2019, at 03:09, Lu Baolu wrote: Do you mind if I work on top of your patches for further cleanups and sign off a v2 together

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-08 Thread James Sewart via iommu
Hey Lu, > On 8 Mar 2019, at 03:09, Lu Baolu wrote: > > Hi James, > > On 3/7/19 6:21 PM, James Sewart wrote: >> Hey Lu, >>> On 7 Mar 2019, at 06:31, Lu Baolu wrote: >>> >>> Hi James, >>> >>> On 3/7/19 2:08 AM, James Sewart wrote: - /* - * For each rmrr -

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-07 Thread Lu Baolu
Hi James, On 3/7/19 6:21 PM, James Sewart wrote: Hey Lu, On 7 Mar 2019, at 06:31, Lu Baolu wrote: Hi James, On 3/7/19 2:08 AM, James Sewart wrote: - /* -* For each rmrr -* for each dev attached to rmrr -* do -* locate drhd for dev, alloc

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-07 Thread Lu Baolu
Hi, On 3/7/19 6:21 PM, James Sewart wrote: Hey Lu, On 7 Mar 2019, at 06:31, Lu Baolu wrote: Hi James, On 3/7/19 2:08 AM, James Sewart wrote: - /* -* For each rmrr -* for each dev attached to rmrr -* do -* locate drhd for dev, alloc domain for

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-07 Thread James Sewart via iommu
Hey Lu, > On 7 Mar 2019, at 06:31, Lu Baolu wrote: > > Hi James, > > On 3/7/19 2:08 AM, James Sewart wrote: >> -/* >> - * For each rmrr >> - * for each dev attached to rmrr >> - * do >> - * locate drhd for dev, alloc domain

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-06 Thread Lu Baolu
Hi James, On 3/7/19 2:08 AM, James Sewart wrote: - /* -* For each rmrr -* for each dev attached to rmrr -* do -* locate drhd for dev, alloc domain for dev -* allocate free domain -* allocate page table entries for rmrr -

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-06 Thread James Sewart via iommu
Hey, > On 6 Mar 2019, at 07:00, Lu Baolu wrote: > > Hi, > > On 3/5/19 7:46 PM, James Sewart wrote: >> Hey Lu, >>> On 5 Mar 2019, at 06:59, Lu Baolu wrote: >>> >>> Hi, >>> >>> It's hard for me to understand why do we remove the rmrr related >>> code in this patch. >> The RMRR code removed

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-05 Thread Lu Baolu
Hi, On 3/5/19 7:46 PM, James Sewart wrote: Hey Lu, On 5 Mar 2019, at 06:59, Lu Baolu wrote: Hi, It's hard for me to understand why do we remove the rmrr related code in this patch. The RMRR code removed here requires the lazy allocation of domains to exist, as it is run before iommu.c

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-05 Thread James Sewart via iommu
Hey Lu, > On 5 Mar 2019, at 06:59, Lu Baolu wrote: > > Hi, > > It's hard for me to understand why do we remove the rmrr related > code in this patch. The RMRR code removed here requires the lazy allocation of domains to exist, as it is run before iommu.c would assign IOMMU groups and attach

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-04 Thread Lu Baolu
Hi, It's hard for me to understand why do we remove the rmrr related code in this patch. And, now we have two places to hold a domain for a device: group and dev->info. We can consider to optimize the use of per device iommu arch data. This should be later work anyway. More comments inline.