[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:57:57 +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=r8ZPteuKXnMCvcc9aLo97gd0lWtGPEbdX+3VRAr4tlI=; b=OtxgFWkfeOx7RpQKwsAlJQdYstE0RUFkMAzfOiVmZ7gmLu6fa9zBqGj5SWAq5LOqvorqdx+2rv6aHtgQvkq0ccZEXywEAe1zXFabhq8sc26mnQhMyUIUBFK755XfzMIfZr9vWMYlcUca8aK9l6sCPtp8gtGO2HNhR2nVNW+KM8y5PRAt0Tuhe/cljk3sf5dhUPsVQGnCt6bSX0DKK3X+CHu8mcDtWNDWrSSqjkMSZLeqM51AOrq9f210FhtsbVOmldMCbvOKnYvkNt+nSyY3VlkSB8Hga+VVBItf8XSr+CVMTOlZSUPcTf+kJDsO+4Io/tzGPy/Ga8gRMPaSdXsD4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l171V+zMgIAFQLvOSU6YiKpsQzKQsbamBzv9vt71gPmxTBMeV6N6NKas4krQHWohbDB1ftUEt35JfiWeuWq+mpOlHKGULANPThzmPGLo9y2xeba5DQSbYLmF1zPBaLnAA8zivrm8lma7dED2LO4vnckAqjJx3bK9ncIc4z4snXsTJ4oLIQqLwj+nkfQkbCcESY3X5o0MsPJdWUmwMjLzw8t1Y3nzOvkcv9oAx1UQbHENao0NbRpQdNd8GF2MuS/xdVbn8BOnmzXUdmEoMyiME+s92rSqL4CHTvqDnoNCL024JkrpnSBW9HleeytZOx+s3sdClkauL4axOTECtbeQ7A==
  • 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:58:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.10.2022 10:43, Henry Wang wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>>> 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).
> 
> Yeah, when I wrote the v3 code I noticed that ASSERT might be limited
> to the CONFIG_DEBUG so in the v3 I switched to BUG_ON which IIUC
> can make sure the function call is valid all the time.

But in the past we still recommended against doing so even with BUG_ON().
More recently Andrew (iirc) has voiced an opinion in the opposite
direction, but I'm not aware of us actually having changed direction in
this regard. Apart from that ASSERT() and BUG_ON() aren't meant to be
freely interchanged - the the respective part of ./CODFING_STYLE.

Jan



 


Rackspace

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