[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: Fri, 14 Oct 2022 11:57:04 +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=flqInWQZxGRF0ioNLqiyj9BRYh9uxf1z2FRcSHpWxow=; b=jBDHHuFe7E86GYUAGBfPs8yyN21qE4vsMNo4VhBGcChqQg/tp0H0iu4sIE1gGWtqjvDz2cz96ANYk3KJ2Zo+McQQWuiokleyCNsyScOxI1ax9ABPMhQgDa1lfiZOMtrftunhS0Yi6ghL33+cmmLCRUUrIG5vM6ODquMNZRBGsNaXvqbU/nLkpooA/+kvB9zGQFitt1ssI1K5mQ9Kx6VKFsN9apgrz3G4etVDCcgLPXJffS0qV+g0mgQyYPo1TAJSoSDiYOB/NCloUp+gcS26UDmpX6dpuOmig0R74suljlp49BdjTLPDilFcpdmsR97YFD9nfyFwCD4ftNv+gmPt8A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jGlYY9MpyJ+gor9nnYYsDU4JisuEY5r0b51D18fUSa525OCkCN4brY0S8n/EfKE4mEhwtjLBkqnVGbuV2YtG1mj/Qgqntrfkdbf31unaURYLNYQOHkLO2juwVdBIneXSAnv/kv67o+09ucKmtylREMwFmRRaIYhGi01VQHdSUpC7Ux+bBhfV1FWns44jV7cIQDU0BYpqwPzm6FXYYUuArEAHf3zM2bhQlh0PgesffstN8EAsepkRYX9iLe8VJ0EmeAweUdh77s84+Rh7V3sWMm1yJvacaImR9NwuVMscE1pDr0R/XWP+QU2vbPxstAyoCxFhpHj7PJwW9d8ONQywJg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 14 Oct 2022 09:57:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.10.2022 11:28, Henry Wang wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>>
>> On 14.10.2022 10:09, Henry Wang wrote:
>>> @@ -1736,6 +1736,17 @@ void p2m_final_teardown(struct domain *d)
>>>      if ( !p2m->domain )
>>>          return;
>>>
>>> +    if ( !page_list_empty(&p2m->pages) )
>>> +        p2m_teardown(d, false);
>>> +
>>> +    if ( d->arch.paging.p2m_total_pages != 0 )
>>> +    {
>>> +        spin_lock(&d->arch.paging.lock);
>>> +        p2m_set_allocation(d, 0, NULL);
>>> +        spin_unlock(&d->arch.paging.lock);
>>> +        ASSERT(d->arch.paging.p2m_total_pages == 0);
>>> +    }
>>
>> Is it intentional to largely open-code p2m_teardown_allocation() here?
> 
> Yes, AFAICT p2m_teardown_allocation() is preemptible and we don't want
> any preemption here.

Well, this can be dealt with by adding a parameter to the function, or
by looping over it until it returns other than -ERESTART. Both would
seem better to me than this duplication of functionality (but I'm not
a maintainer of this code, as you know).

Jan



 


Rackspace

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