[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] xen/arm: p2m: Populate pages for GICv2 mapping in arch_domain_create()
 
- To: Henry Wang <Henry.Wang@xxxxxxx>
 
- From: Jan Beulich <jbeulich@xxxxxxxx>
 
- Date: Mon, 17 Oct 2022 10:40:50 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Lilq9s/yizeDzbYvu/Q0GRC29vCyzeA8REdcQymakko=; b=MiB/eoixS4YDEKXiOwixcZIKG+/Aji5Pjkn9LbCZCKRDCyIEEPlAklHEgukZoYQJ6edEHEa7m6xc7cvfhludCL8DC9vBoV5+VohLr+zAhdNTPR+wR9kZ/e558fyVRexcwBH2iW8Wh2DaqfdXeP3hfi3zvifNyqq9nDEdzk2eysx4Dds/cA4dYQn8iIqyZjqm/nla+hCDsjSQM+ob9kl9gAESCyTuY1pI38xu0wLsIdR/0xACdohWRT59ae0kvhp6yPNPsqLkO9Hxj7MukNDle/B95cbbfdCpxE5A5btRWyVysvuQ9+dvhzVJYWcfyEiVaE3B/N4ht5gUlOJ8nWC6qA==
 
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TZ5wn7LXQSgMLJgAVzsJUY9M+t3NCoizJd6KKRDwqsDOJQ57lcmnH/ZTuL6/NHPg0m36BtNISZFii26DxVnSsMHUnLmNEbZ1Lv1Ah1+iI/0+7gVgHCwtzkZ7+qXur7zWOYPmZnd4kNkPDleeFV7/OPMTOaSoma9nej2jd0VBq3w9C5NDaLvLEJ9AbClWi2AtQEr0RTADNMk5ruRAm8016Eb99xrrJIJU245K9q6Wy0jJx5ZEsIYmas5BlqM/uZ/dxDSFBnQQITNqiqToICdpdTdY6VbcuYkwHblaDXerf8TW6EikZUf4FOuC2jiil+p1OKqth7QnMgMKw0/GRNT3ZA==
 
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
 
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
 
- Delivery-date: Mon, 17 Oct 2022 08:40:59 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On 15.10.2022 15:14, Henry Wang wrote:
> 
>> -----Original Message-----
>> From: Julien Grall <julien@xxxxxxx>
>> On 14/10/2022 12:19, Henry Wang wrote:
>>
>>>> -----Original Message-----
>>>> From: Julien Grall <julien@xxxxxxx>
>>>>> +        p2m_teardown(d, false);
>>>>
>>>> Today, it should be fine to ignore p2m_teardown(). But I would prefer if
>>>> we add an ASSERT()/BUG_ON() (or else) to make confirm this is the case.
>>>
>>> Sorry I do not really understand why we can ignore the p2m_teardown()
>>> probably because of my English.
>>
>> No, I forgot a word in my sentence. I was meant to say that the return
>> of p2m_teardown() can be ignored in our situation because it only return
>> 0 or -ERESTART. The latter cannnot happen when the preemption is not
>> enabled.
>>
>> But I would like to add some code (either ASSERT() or BUG_ON()) to
>> confirm that p2m_teardown() will always return 0.
> 
> I added the doc asked in your previous email. Also, I will use a
> 
> ASSERT(p2m_teardown(d, false) == 0);
> 
> in p2m_final_teardown() here.
Hopefully this was meant only as an abstract plan, not the exact code
you mean to add? ASSERT() expressions generally should not have side
effects (which includes function calls).
Jan
 
 
    
     |