On 16.09.2021 10:18, Tian, Kevin wrote:
>> @@ -1737,23 +1737,33 @@ static int domain_context_unmap(struct d
>> return ret;
>>
>> /*
>> - * if no other devices under the same iommu owned by this domain,
>> - * clear iommu in iommu_bitmap and clear domain_id in domid_bitmp
>> + * If no other devices under the same iommu owned by this domain,
>> + * clear iommu in iommu_bitmap and clear domain_id in domid_bitmap.
>
> what is changed above?
A style and a spelling correction: Capital letter at the start and
a missing 'a' in domid_bitmap.
>> */
>> - for_each_pdev ( domain, pdev )
>> + for ( found = false; ; domain = dom_xen )
>
> honesty speaking I had to read several times to understand the break
> condition of this loop. It'd be easier to understand if putting for_each_
> pdev(){} into a function and then:
>
> found = func(domain);
> if (!found && is_hardware_domain(domain))
> found = func(dom_xen);
Can do so, sure.
Jan