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

Re: [PATCH v1 02/13] xen/arm: introduce a special domain DOMID_SHARED


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 19 Apr 2022 10:10:07 +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=zF/OE+Y3rr6iM/XxMP4ir7Vp9xquV5aHacM2tYu/eqM=; b=JWn3EghmrPk0FtURO7e1Cq8tpRwnruxCnIOLQyxVzSSH/Wum5sDf8gPjM2Dc1tRsWF1tEwxmhfPs73TfivW5bKiQmOHEFGXYsixNof3hrP+01ZJ4Epb7xYhbgookwKXu3FxLZmir8+Dti9JfZCQhN1bONq1gV8af89SOE+l1Qv5+OxMvwNwG9VYr8Si+Lmdktd+p93HlxooxEMigFn39QbzNjMi/uE3LyPC3eUd+iVL7PPtuYo1nPhhbnQVgytXZcQ8NIvy17xZl+lqb03UUWk28NrxqCLenIVGtuDA3KMZZyNETig5i2AMo0M3JiqGz+8ZI0XaA0D9RHtY2ukUNZA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XfR9ymNg9FNK3nwo8AqJsIWHPZ17m+4Uppb3PrLNAr4BnemEhfT4c15nYfst83Y3bsMaLejuPE4n7psIIyPbV7YwjZ5+9rGtQPFW4TUBDUS9bJJhH5sFtLOkoag7q+6DZCEwFWsFMcjUVQnFfZJtDP/uH/oXEKQ8WHffjWbvOOorCIcw/qjcWA0oKIVM+J71vcBTUX89gCQEeeqkIhno+uE6y7Q8VrLD69ngI7ICXAkE276gGKoaFr8vyzJCKxPB+ceFWLJNF1dBwtegz02TfkrpjK3UvtYxU+z12txxfgQVv5M+mXU6uUZfS3X9T5/iCxaHuQjUC6PBX7vh14ZFRQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: nd <nd@xxxxxxx>, Penny Zheng <penzhe01@xxxxxxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
  • Delivery-date: Tue, 19 Apr 2022 08:10:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.04.2022 11:52, Penny Zheng wrote:
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: Friday, March 18, 2022 4:53 PM
>>
>> On 11.03.2022 07:11, Penny Zheng wrote:
>>> --- a/xen/arch/arm/setup.c
>>> +++ b/xen/arch/arm/setup.c
>>> @@ -855,6 +855,20 @@ static bool __init is_dom0less_mode(void)
>>>      return ( !dom0found && domUfound );  }
>>>
>>> +#ifdef CONFIG_STATIC_SHM
>>> +static void __init setup_shared_domain(void) {
>>> +    /*
>>> +     * Initialise our DOMID_SHARED domain.
>>> +     * This domain owns statically shared pages when owner domain is not
>>> +     * explicitly defined.
>>> +     */
>>> +    dom_shared = domain_create(DOMID_SHARED, NULL, CDF_directmap);
>>> +    if ( IS_ERR(dom_shared) )
>>> +        panic("Failed to create d[SHARED]: %ld\n",
>>> +PTR_ERR(dom_shared));
>>
>> I don't think this should be a panic - the system ought to be able to come up
>> fine, just without actually using this domain. After all this is an optional
>> feature which may not actually be used.
>>
>> Also, along the lines of what Stefano has said, this setting up of the domain
>> would also better live next to where the other special domains are set up. 
>> And
>> even if it was to remain here, ...
>>
> 
> The reason why I place the setting up here is that DOMID_SHARED needs to map
> pre-configured static shared memory in its p2m table, so it must be set up
> after system P2M initialization(setup_virt_paging()). setup_system_domains()
> is called before system P2M initialization on xen/arch/arm/setup.c, which
> can't meet the requirement.

While possibly moot with the plan to use DomIO (and my hope that you don't
mean to move DomIO's creation), I'd like to point out that there can't be
"too early" setting up of something. If it happens earlier than where you
need it, all you need to do is arrange for the further setup you mean to
add to be invoked separately, whenever it's time to do so.

Jan




 


Rackspace

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