[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: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 7 Sep 2022 13:45:32 +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=kW8kksXgCohTQpA5fJT/sgCrHtu4S8LSud7hm/Mh7Eg=; b=XDS3DqJp8qHdBtpFH60jerYJ7Q2xU08ntHv/+TyH5ZfDKXzpi+OpJM8l1WyenRbVJjbB9RHY8sdc+S/hqajepaJJZHyR6g9/tuA+U4fka/tY56pLRk0xJlAE4m+pPzGBzMzu7H+W4RYUPJ+lpm+fizg5QQtZg+AlyUHkcwmhYFo+R9yUygd3jSSmg3Ij/87nqXXkXvjJrDs9wDKlrcGOhY/6kCCUlbMU5ZpIZGdRu4FUTe+Bjr3ZC6zA/g8osluW9GunUzewQJv0r0jOVFho/y4484/BEXr9PIC3JObUTY41lCe5snuvz8UfYgj/9X3dyk01CXIBc0ntF/ahO+pnTg==
  • 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=kW8kksXgCohTQpA5fJT/sgCrHtu4S8LSud7hm/Mh7Eg=; b=ApiTo+iEFZB3DAlh2y3rW4ME52vIfyAO8YU4IxjWIcLUQvKNombIN89uIQlwkbxvTB6gENyxm2HShv/wtmf8e0OYyffrMtoe6axNw1K3j1DLGZMt1akXGg5qxa3bQ4jpe+JcjkRFJpVv86Xbe7gvWtYQPc1FCaTOJ2/GxjhR5v8nzHiuzgMZiyrc/GQvm1HCKoPbkEQyK7APzODlhKAORCpIdOXmcgHsEuXhE4r29UJe4l6E9VEQzRso8IpG/5ndRhbSF1ttS+MWGZcxJm/q1usZ44fIe5YSgkXZ8BM8CqhJ6M9Yl6ANrHCwKgSYoA4TA7H8iW5xl9dwQPN7RP1h4g==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=OZjV2yfvtU45OoNNjd2lnSL7KdWiLM6GEJ86macBmDJpsElzsGcV/17iRX7mFDjuFQb1/VNh7e7ZW1B+qA6IrwGw5u1JRQ7bEzxv8bzxi7Rxp7Ey11cDEzrTrdlXTo7THKHOFadPePQuhIzK45mE4CtXGiZIKBGda0yuzUuCQ0UzkyBY1gSemS+NPPqitWeFCqoboL7zxQiMfpPYjDS07+G4a5WkryQvbUMGrqDEmDmAlS5ntvYZxleEMJ3QnlaV0cmQkYLHzw/mmJ0jSt+z9T4BByFeQYmzWC5GiQ6atIjhy0XOV3W/fJ1NE7Wfb1ZeovALDuUwVlHB9Vchcx/eyg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oA0m7JKOEmSxIRQLEQBAj5J1/8WGic28ZQC+2ixPMoZJtz714zr+emxChoGjMA1MqS7YB0EGW6uYmrQh1cirzuneNJQGaRHMYIjYjM7nDoEMr3patRkpv9OKsQ3WP2OPdO8HcdL+C2217p6B7hAle1S9ZpS4JzD4zja3eVkJsaN+pmdc7YaVFnho+gl3vn/UZvvjunqreQKCXB6hE6IYOWnVv5t9fWzUDL7Tuy/QG7jnGUSMhIpfPYR9+g0emyBcLpSvKcDxorZzC9XgKiBc7MxlbXHPWyaKg2gtNrR7ajdDTLP4ubkbkn3M8LSrQwwFYZxRehPV5nM4SPYLB0G3Bg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Julien Grall <julien@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:45:53 +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: AQHYwpUJ4p6pfICa8EGhkwL2mg6iHK3T1xaAgAAKD4CAAAVdgIAAAr4AgAAA5ICAAAbIgIAABXCAgAAA4QCAAAB+gIAAARoAgAACMwA=
  • Thread-topic: [PATCH v3 2/4] docs, xen/arm: Introduce static heap memory

Hi,

> On 7 Sep 2022, at 14:37, Michal Orzel <michal.orzel@xxxxxxx> wrote:
> 
> 
> 
> On 07/09/2022 15:33, Bertrand Marquis wrote:
>> 
>>> On 7 Sep 2022, at 14:31, Michal Orzel <michal.orzel@xxxxxxx> wrote:
>>> 
>>> 
>>> 
>>> On 07/09/2022 15:28, Bertrand Marquis wrote:
>>>> 
>>>> Hi Michal,
>>>> 
>>>>> On 7 Sep 2022, at 14:09, Michal Orzel <michal.orzel@xxxxxxx> wrote:
>>>>> 
>>>>> 
>>>>> On 07/09/2022 14:45, Julien Grall 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.devicetree.org%2Fspecifications%2F&amp;data=05%7C01%7Cmichal.orzel%40amd.com%7Cc677a7983cd94e48620708da90d5a15f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637981544487489692%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=1uwtf%2F6shf2PiKu0XZPFNQ%2B6iyhLrMsYb1XEru3IGlg%3D&amp;reserved=0:
>>>>>>> "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 think this is a matter of how someone reads these sentences.
>>>>> I do not think that such documents need to state:
>>>>> "This property is for the reg. Do not use it for other purposes."
>>>>> The first part of the sentence is enough to inform what is supported.
>>>>> 
>>>>> On the other hand, looking at [1] these properties got new purposes
>>>>> so I think we could do the same. Now the question is whether we want that.
>>>>> I think it is doable to just have a single pair of #address/#size 
>>>>> properties.
>>>>> For instance xen,shared-mem requiring just 0x1 for address/size
>>>>> and reg requiring 0x2. This would just imply putting additional 0x00.
>>>> 
>>>> I think we want in general to reduce complexity when possible.
>>>> Here we are adding a lot of entries in the device tree where we know that
>>>> in all cases having only 2 will work all the time.
>>>> 
>>>> I am not convinced by the arguments on not using #address-cells and will
>>>> leave that one to Stefano
>>>> 
>>>> But in any case we should only add one pair here for sure, as you say the
>>>> only implication is to add a couple of 0 in the worst case.
>>> I agree. The only drawback is the need to modify the already introduced 
>>> properties
>>> to be coherent.
>> 
>> Agree, someone will need to do a pass on the whole doc which might be easier 
>> with all things in.
>> 
> Well, not only docs. If we decide to use a single pair of #address-cells and 
> #size-cells, then
> we need to modify the code that expects different properties e.g. 
> xen,static-mem-{address/size}-cells.

Right I forgot that some parts are already in.
So we will need an extra patch to handle those.

Bertrand

> 
>> Cheers
>> Bertrand
>> 
>>> 
>>>> 
>>>> Cheers
>>>> Bertrand
>>>> 
>>>>> 
>>>>>> 
>>>>>> Cheers,
>>>>>> 
>>>>>> --
>>>>>> Julien Grall


 


Rackspace

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