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

Re: [PATCH v3] xen/arm: p2m: Populate pages for GICv2 mapping in arch_domain_create()



Hi Andrew,

On 17/10/2022 16:21, Andrew Cooper wrote:
On 17/10/2022 08:46, Henry Wang wrote:
Looking at between 4.13 and staging, you want to be calling
set_allocation(0) in p2m_final_teardown() ahead of of the p->domain
check.

Hmm... IIUC, you are suggesting the following code:

p2m_set_allocation(0);

if ( p->domain )
  return;

If yes, this is in theory not safe because 'p2m' is technically not initialized. All the list use are thankfully protected with zeroed field. But this is quite fragile.

I think it would be better if p->domain is set ahead of the first error returned in p2m_init().

Cheers,

--
Julien Grall



 


Rackspace

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