[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/4] VT-d: consider hidden devices when unmapping


  • To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 16 Sep 2021 10:31:30 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+KuwO8Ac+v8fcT7Ie21OEUa2zI/DBon1ywm4ELSnZqI=; b=TlZ142/2CtffU87WlBKm01rDOhdXGiWVOMviIa7mvkuDz6TD4uoSXxlXTR4Nke3u7nqYeAA2wub8YHf9zlG4u9pPi9fngzhmJ+uuy112h3SCeGyvXkm2G98Ikd6czimhknP62YGaK79wgwMN5aJV4mkKZ/VeQKxxFRj8yxVFfEEkD1uZQHLbWugqN0Fght/MAPFOfwG6TGe7l68ms1HjmvIFJZ1Cnvp1cnp9W0c0KTFhnJcAf/iQetQwlpxEXWzcWHXUv7m54VeNpz39bosLV1xXRDzIOh0xl1a5QsLXdmk8pr/xPuMiDjpPPNG083NCRMHwFm1evbkP5MHbDZXUZQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CA/8ZeOFQC4LIz4MvM4fMGL5Ad7MmwNfjOPLOF+gF3St7Ed41ewgyaHHfPbcjg52PeoL4OlZgKDEivLBs/cfsLKGbsBTrAsgi0/VXPWDCzFaU045vqSCqZuBCGHUOrStYXCwO0ygRgLiPifM0GKqVl1i7p03NJo6/IlO9a5nhxTw/xGKXlmH03x2CMv2DTdg6/9CaS5qs/BMlintydI5OgnDtcv6NDauLI3ZPQUchBW0P9xvrPyuoMNUhiI/o7mRKeNA54+SgR19Dv/IFwNFyrKVl9gvFbLJWLVDA4TKJYtPAJMKLYiINbMq72ONR/89EU0eR9N2R92DD/vbT7K3SQ==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Paul Durrant <paul@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 16 Sep 2021 08:31:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.