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

Re: [PATCH v3 2/4] docs, xen/arm: Introduce static heap memory


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 7 Sep 2022 13:09:07 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=pu90OKSD6I9CjvlJHqdkQC2NU9v6LeR4717/HITzoyo=; b=Yt6KZT15aCDKIp+I8YYYbPU0K3BQ6Qxag/o3cglq7W5woQDkaAD+vtyNJqco9YxXtuntXKxVc4TmBAheVoPNYAPXlSrMgPrE12HoD0nss6Ct2sqvs3n9jQT7OXefyk5MR9t6ZFM0Dbavez/oBStiTnMiWMkOGcyx850M2+bCTxeBYShERMmUslIdcID53m5Ncz56VYXxh9dQeAjM0qii0ra0Rbv/qEWUqQuofY0qhuaPPV2Wix4w/Lo+q/9JLirdpIvolagMgXvaX4RPjxgQzEnUZrzF+0f/9eehQXY6Mi2cUwmG/685q7QRRrbJuqQ6XWzcpYeD11saoHhyKbWtQg==
  • 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=pu90OKSD6I9CjvlJHqdkQC2NU9v6LeR4717/HITzoyo=; b=RpzvxUomOqNcmdWrdJoUuzHGNSQK+CaOjToelJgO0gKAitn/yUJUzJeZwGOML6NaCRAHrbJ8m4q0ss4yajViEWj9/jVH0x8KRKhJBMrLHZITqZU/J0/UkPCxv8toHHtzWDu8dMtFItg6FHDrtGwqm7xV/g65HdTI6XjU1YSWoaXdQ9iy52E1Pmr5ooZBajGixwhmdap6/ixorrOpmlh15WzWVUa6YbzpNu/oeajok0WK/xsm/dWi/YRllhXwpjzuwR7uYxmVyTnaB5W+Cfk2ZNIN9VG5DXpm8QqeVGrzDom+6A8LrbiTiLLi4NJMNwv8WuslbvCyC+CGeJQDUZUUaw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=PkNk1rMEfdkOyAoG0XNCLu1t54VV1POCYWJrOD2B6092Oq3/PZZ9bAitOUXP29nQugo7MlUyJUSbIjSJNgysjAXBghKF5E/YUaTe/IHgFispDc8jLd9L/qIJQjkaOQX52gmElwJSllAnNyMvyKLqkwldOlyQfXllglce/T62uAqb7nYzjMeOmm8vFfo7tbfFmhIM4NgMf4uKhlGizShbcBoPk5vSL+biaZOicEbaSg8EwgHEYwyFRS8HrQwz1lm52EeB6U2eZtUi9VDf8Xso1uaDlW3ComJofi49ltpdIYd6jG1bZMHPHJij+YCgAs2ZBp+FjnABj99A9XPj9++3tg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lGF7T1Bwsta672YT6KledCZPIAXNUebUYOTqPlYJUm1XFx7XJPMtmaCJbuV7Se5jc/idmn8VGfFLaZvsZ1DNgnvhxzAANcAUBh4zwSbKEBSVx76Vb57jgJtaTwxUynU+/BZcfdnDIeV62cKpU9qM0wlZC9hkVjiUFXEDwQrjHPagmj5v0kCEwlWVhCy240OkAQNYluqbM4LbKhQFbQf02ACMrFynbYeDC0kOCdwblCQU6UcT6K0Dg452To3IoiywxUCjh+ABW126GqYIHv807yW7SsfBK3ib9fKr3EuSpbIRzHUZ9IuCEv3tBVtHGbvlHNrlZpohe2NLt8x2EbJoLA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>
  • Delivery-date: Wed, 07 Sep 2022 13:09:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYwpUJ4p6pfICa8EGhkwL2mg6iHK3T1xaAgAAKD4CAAAVdgIAAAr4AgAAA5ICAAAa2AA==
  • Thread-topic: [PATCH v3 2/4] docs, xen/arm: Introduce static heap memory

Hi,

> On 7 Sep 2022, at 13:45, Julien Grall <julien@xxxxxxx> wrote:
> 
> 
> 
> On 07/09/2022 13:41, Michal Orzel wrote:
>> On 07/09/2022 14:32, Julien Grall wrote:
>>> [CAUTION: External Email]
>>> 
>>> On 07/09/2022 13:12, Michal Orzel wrote:
>>>> Hi Julien,
>>> 
>>> Hi Michal,
>>> 
>>>> On 07/09/2022 13:36, Julien Grall wrote:
>>>>> 
>>>>> Hi Henry,
>>>>> 
>>>>> While reviewing the binding sent by Penny I noticed some inconsistency
>>>>> with the one you introduced. See below.
>>>>> 
>>>>> On 07/09/2022 09:36, Henry Wang wrote:
>>>>>> +- xen,static-heap
>>>>>> +
>>>>>> +    Property under the top-level "chosen" node. It specifies the address
>>>>>> +    and size of Xen static heap memory. Note that at least a 64KB
>>>>>> +    alignment is required.
>>>>>> +
>>>>>> +- #xen,static-heap-address-cells and #xen,static-heap-size-cells
>>>>>> +
>>>>>> +    Specify the number of cells used for the address and size of the
>>>>>> +    "xen,static-heap" property under "chosen".
>>>>>> +
>>>>>> +Below is an example on how to specify the static heap in device tree:
>>>>>> +
>>>>>> +    / {
>>>>>> +        chosen {
>>>>>> +            #xen,static-heap-address-cells = <0x2>;
>>>>>> +            #xen,static-heap-size-cells = <0x2>;
>>>>> 
>>>>> Your binding, is introduce #xen,static-heap-{address, size}-cells
>>>>> whereas Penny's one is using #{address, size}-cells even if the property
>>>>> is not "reg".
>>>>> 
>>>>> I would like some consistency in the way we define bindings. Looking at
>>>>> the tree, we already seem to have introduced
>>>>> #xen-static-mem-address-cells. So maybe we should follow your approach?
>>>>> 
>>>>> That said, I am wondering whether we should just use one set of property
>>>>> name.
>>>>> 
>>>>> I am open to suggestion here. My only request is we are consistent (i.e.
>>>>> this doesn't depend on who wrote the bindings).
>>>>> 
>>>> In my opinion we should follow the device tree specification which states
>>>> that the #address-cells and #size-cells correspond to the reg property.
>>> 
>>> Hmmm.... Looking at [1], the two properties are not exclusive to 'reg'
>>> Furthermore, I am not aware of any restriction for us to re-use them. Do
>>> you have a pointer?
>> As we are discussing re-usage of #address-cells and #size-cells for custom 
>> properties that are not "reg",
>> I took this info from the latest device tree specs found under 
>> https://www.devicetree.org/specifications/:
>> "The #address-cells property defines the number of <u32> cells used to 
>> encode the address field in a child node's reg property"
>> and
>> "The #size-cells property defines the number of <u32> cells used to encode 
>> the size field in a child node’s reg property"
> 
> Right. But there is nothing in the wording suggesting that #address-cells and 
> #size-cells can't be re-used. From [1], it is clear that the meaning has 
> changed.
> 
> So why can't we do the same?

I agree here, those are used for how reg is encoded but nothing says that we 
cannot reuse them for the encoding of something else.
Even if we do not use “reg” for those sets, they are still defining memory 
addresses and sizes which is coherent.

In some cases reg is used to encode something different so those could have 
different values that we could not use but for the chosen node, they should 
always set the encoding for something addressing a memory area.

So if we have a good reason then I would vote for xen,memory-* proposal but so 
far I could not find a reason not to use the standard ones.

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall


 


Rackspace

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