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

Re: [PATCH v4 2/8] xen/arm: allocate static shared memory to the default owner dom_io


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 18 May 2022 08:35:56 +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=MUnxJlf70ABxdlGX1Cvqac8nk0xl2eQ6Y7R03gLXchY=; b=iZCSB28Cluddu/sBK9npjYwJksmHGSlwOMRSN7XxmM1FbF0mNuLb8U66EGqrEGNMzKYiMD4Ufosst2VhY2+Tn/VzMHCJkIjxlUZ28CA4iLYSzj8xNDJyZxFEDBgMI2ObYwSAZmszNdV2X30x1ouzajsMX1dp4pVv7iVmZrwAYlFmOt0XWT3vjXgkj/a960afpykrGCfJBlza8wyQziRCis/DvcZl8mo7RyULH5EbBxGFEkFbBgFpYbNtr+n3SsLiHU1bRLyLtNislX6/priFt5pXzdGX7aZrAyNEm/afQExmXTdKJrgV+ttcHnkqYE9CULdOwQXW/4Q+misrwIfQMw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e/nppf4wkvN+pCPLsWF+BIBYZ06K8XBksDNPruCVEUF+W8IP0X1RBZW3x46DVZ4oLrE5/j8VivMWapzm8Xwrz8mVaXm8J5xhDW80RSfOjBKFxu8lE/Hlnam943APukOQ9ffcVQT6Brme/wPUrjOyxHhMvikIa5VSEDzT1QF0vCNecWYTGUBxOELgDaHCQGKgtlMT8jpU6Nq94Y6idcMJ0pK3/TvZUIZghuvVK7fGeIdIgugbTdYOY0FeMPIv6tcZNvuaDycl5vJWVvBcTOsgWIHbKCUT38dGBGbr/SCxPsNwbwFHGQ8vFN3htZUy+fxbH/sWgQ+yCzcqMe2WvFXjVA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Chen <Wei.Chen@xxxxxxx>, 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>
  • Delivery-date: Wed, 18 May 2022 06:36:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.05.2022 05:14, Penny Zheng wrote:
> Hi Jan 
> 
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: Wednesday, May 18, 2022 12:01 AM
>> To: Penny Zheng <Penny.Zheng@xxxxxxx>
>> Cc: Wei Chen <Wei.Chen@xxxxxxx>; 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
>> Subject: Re: [PATCH v4 2/8] xen/arm: allocate static shared memory to the
>> default owner dom_io
>>
>> On 17.05.2022 11:05, Penny Zheng wrote:
>>> --- a/xen/common/domain.c
>>> +++ b/xen/common/domain.c
>>> @@ -780,6 +780,11 @@ void __init setup_system_domains(void)
>>>       * This domain owns I/O pages that are within the range of the 
>>> page_info
>>>       * array. Mappings occur at the priv of the caller.
>>>       * Quarantined PCI devices will be associated with this domain.
>>> +     *
>>> +     * DOMID_IO could also be used for mapping memory when no explicit
>>> +     * domain is specified.
>>> +     * For instance, DOMID_IO is the owner of memory pre-shared among
>>> +     * multiple domains at boot time, when no explicit owner is specified.
>>>       */
>>>      dom_io = domain_create(DOMID_IO, NULL, 0);
>>>      if ( IS_ERR(dom_io) )
>>
>> I'm sorry: The comment change is definitely better now than it was, but it is
>> still written in a way requiring further knowledge to understand what it 
>> talks
>> about. Without further context, "when no explicit domain is specified" only
>> raises questions. I would have tried to make a suggestion, but I can't really
>> figure what it is that you want to get across here.
> 
> How about I only retain the "For instance, xxx" and make it more in details.
> "
> DOMID_IO is also the default owner of memory pre-shared among multiple 
> domains at
> boot time, when no explicit owner is specified with "owner" property in 
> static shared
> memory device node. See section docs/misc/arm/device-tree/booting.txt: Static 
> Shared Memory
> for more details. 
> "

This reads quite a bit better. Yet I continue to be puzzled about the
apparent conflict of "pre-shared" and "no explicit owner": How can
memory be (pre-)shared when the owner isn't known? Shouldn't all
memory have an owner? Or alternatively if this sharing model doesn't
require ownership, shouldn't all shared memory be owned by DomIO? In
any event, to leave such details out of here, perhaps the comment
could consist of just the first part of what you wrote, ending at
where the first comma is?

Jan




 


Rackspace

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