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

Re: [PATCH 1/2] docs, xen/arm: Introduce reserved heap memory


  • To: Henry Wang <Henry.Wang@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 30 Aug 2022 08:29:17 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=YyajryxF180DWmJgAewL5x7UrRMojQKX3SP65hVH3hw=; b=bP4PIJpG1lF2htqwUmeI+KtMvrh6QGjtBd+MahixrHj9Psr626MnRnJP+2wLc5+wrUHioXxWgJe5ptOaY5+cNWLUjBUCP7CNaORm8QonEF91iVaLMrhYGyX9m6ctZdErbUisZt3NSRu5hxBYce6lOU/1x8w92Xstfq5jAYqVG/OmaSs/xftRVINrj/pHyOIKCJSJUA+26Zz3V+V9JAKdXlhRsu9fVgWMiySRTd3vtPV+yrKh+xTJffbhmSKD10qwus+nC0HXA3w5S8eSf/SWqXr/FhH96FI93lcbSsvBEgCle0OUx/CJGuulnORmYEcUY+y9/QHdUQc0OGbTymgrgw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n08m62TXfnmHVSNgg9yRb+K1lmukoIVJMid4vGdF8/pqdw4IGSz1/6gqo06LDKOhoqkar7uBfqDexl6cMbBjt6E8GlhHmR4PPTjqfuGYCn4abQ9Udwlgqxsl5YyiFIZbBllU9ZyEb9HreXiOZdFQXJ3QjcO6C0hKRK+Lx82Pw1MH0UguWGmI5wq1kT57HANmaWIfpmii0xL+KArZJ4u7gYRlOuu8Ii5H2KrC0jeGudpY+OU3WwCkIabK0jbOkJAsUPLiS6lyFuJfv+PIYYsF+tRj9oqFdQ9UU64aGAKzgQFhTksr+fYmRrISNcDLtdqxRd9lvmTNBVlm159Ao8cBOQ==
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "Penny Zheng" <Penny.Zheng@xxxxxxx>
  • Delivery-date: Tue, 30 Aug 2022 06:29:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Henry,

On 30/08/2022 02:58, Henry Wang wrote:
> 
> Hi Stefano and Michal,
> 
>> -----Original Message-----
>> From: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>> Sent: Tuesday, August 30, 2022 8:47 AM
>> To: Henry Wang <Henry.Wang@xxxxxxx>
>> Cc: Michal Orzel <michal.orzel@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
>> Stefano Stabellini <sstabellini@xxxxxxxxxx>; Julien Grall <julien@xxxxxxx>;
>> Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; Wei Chen
>> <Wei.Chen@xxxxxxx>; Volodymyr Babchuk
>> <Volodymyr_Babchuk@xxxxxxxx>; Penny Zheng <Penny.Zheng@xxxxxxx>
>> Subject: RE: [PATCH 1/2] docs, xen/arm: Introduce reserved heap memory
>>
>> On Thu, 25 Aug 2022, Henry Wang wrote:
>>>>>                                         const char *name,
>>>>>                                         u32 address_cells, u32 size_cells)
>>>>>  {
>>>>> @@ -301,16 +303,40 @@ static void __init process_chosen_node(const
>>>> void *fdt, int node,
>>>>>      paddr_t start, end;
>>>>>      int len;
>>>>>
>>>>> +    if ( fdt_get_property(fdt, node, "xen,static-mem", NULL) )
>>>>> +    {
>>>>> +        u32 address_cells = device_tree_get_u32(fdt, node,
>>>>> +                                                
>>>>> "#xen,static-mem-address-cells",
>>>>> +                                                0);
>>>>> +        u32 size_cells = device_tree_get_u32(fdt, node,
>>>>> +                                             
>>>>> "#xen,static-mem-size-cells", 0);
>>>>> +        int rc;
>>>>> +
>>>>> +        printk("Checking for reserved heap in /chosen\n");
>>>>> +        if ( address_cells < 1 || size_cells < 1 )
>>>> address_cells and size_cells cannot be negative so you could just check if
>>>> there are 0.
>>>
>>> In bootfdt.c function device_tree_get_meminfo(), the address and size cells
>>> are checked using <1 instead of =0. I agree they cannot be negative, but I
>> am
>>> not very sure if there were other reasons to do the "<1" check in
>>> device_tree_get_meminfo(). Are you fine with we don't keep the
>> consistency
>>> here?
>>
>> I would keep the < 1 check but it doesn't make much difference either
>> way
> 
> I also would prefer to keep these two places consistent and I agree Michal is
> making a good point.
I'm ok with that so let's keep the consistency.

> 
> Kind regards,
> Henry
> 

~Michal



 


Rackspace

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