[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5] xen/arm: Check for Static Heap feature when freeing resources
- To: Michal Orzel <michal.orzel@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Wed, 11 Dec 2024 12:18:56 +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=arm.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=arcselector10001; 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=tNX26RZp2IJJcVJeS8hXI8ZhhvBhOwf+/QnOaB9Ck4Y=; b=jOj9PSfV08w39NmU+Ez1EjfRBvnVP4khVGhBbEDn3cMV/rkYMimDzHwKD9Vqt6hybxT61RMI5+LI46opTB7Q6eVZFy8ErlHXPzBaaT67YFYi/qQC14VZ5xvEcbcYc0wuISJr7vJDk5J1KNSUk3T1l6jAaWSbYl/usiOpxKrGYalIWJmt8YFuHixUD92/pkjIp6msxDgxSXwzmc7t5k4l8yAJWNyTukNa6tgcLUK1HFTqtPbc+p2hJcmuAB1rLCk46RJNT41vHk130BrlnttVlbEyhmVoPU4rmOPbs2/WRt0JWJI/yJNwoOdnviVfdsbZKNHqFchPAxv+B+vD+q0AjA==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=tNX26RZp2IJJcVJeS8hXI8ZhhvBhOwf+/QnOaB9Ck4Y=; b=j2Dpbt/E2VXnddY4zsyPp018oMdWagIDPoKLncaMbyhPByo/zS2pFqvnNn5T/IouQl7nHZvybxouK5NiwGHto5I5MiL+tKwuLm9Gak5lVUFiITmBWPeXTsyBXi3GeFly7HiN+on8X54my+amTS0nlTrYTmdRl1ErI3U1w8kJYL0zNKMdVqFlbIpfG1mgUo9N0uTcP75Zym5raCqvtg6CAMV372SaUwXF0mAXOuma0tbNZnbqKyZ0+9ErMbJgM7wWck52/2V2GUdwhR9gaMZx/zvstKUEbdBsGt3ozP2aw0wS+WzoMkoxctbXhan4pZLImefXSumWKld55hxnCG5k6A==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ZW5YPIatvUXRYRzrF5uWoAvZE04BmUR96A+gfNUpmxqY79r4DgB/3cXUAinwNY0B/herJ08ce0JOPrLezqKJJ61b+/Z7moK5asMxjzjzoo2hDi2SQRKRJThSdKtOLHrbvcpzdrKZF7NoTAIOUdLY/pzGb1eCmhYmUo0dk3pLMDbmr1jopKkrTDg52T04oxa46M/qILmRzhBQuD5FbLR4AsUxvrTzse/yQJFU2QqoWENYvQeq3hrGw0SVAdE5OHRFOIlD9N/p9aL4apaCnaxNO5Pl9r3Z1ZdT1uFxbfi+JIV+7N469YPr3xeFkes87yCMoBQnxsbie0rG1iTWSfM19g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rHTUf1a6Zd9DxsVv14+AN1SjdPWn2tM+01LeZlHbS4DYYM8T4UY/eg0y/LyLU3nbm1A3GKwe9rDtpJznwwO3v8FQ0kHOOzDzyYYRTB29ryYx7IcEBqSVRTfci35NNQeaka6spqu2BDyJiDdAGR7Oq1iD09ZPFqQGez4YXl0VI95ovtNmwv3nF/g8xuDueEmAvbjNGq/ucCMNxCIRpDksCSmrIZ2iq2n6rzskxab9VRHblQHW3ckkGQyibxopHIL6mwPRq+zZ18WObo72+v4WqO3w1TtQZhmhXDI5/GyUBgJB7k24+ELA3LjOiP1TWRPb0+2ngAKkiLEQyNQmaGIglg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
- Delivery-date: Wed, 11 Dec 2024 12:19:23 +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: AQHbS72LrOmoHoF88U+ox0p78LJ4nbLg8LeAgAAFXAA=
- Thread-topic: [PATCH v5] xen/arm: Check for Static Heap feature when freeing resources
Hi Michal,
> On 11 Dec 2024, at 11:59, Michal Orzel <michal.orzel@xxxxxxx> wrote:
>
>
>
> On 11/12/2024 12:11, Luca Fancellu wrote:
>>
>>
>> From: Penny Zheng <Penny.Zheng@xxxxxxx>
>>
>> If the Xen heap is statically configured in Device Tree, its size is
>> definite, so only the defined memory shall be given to the boot
>> allocator. Have a check where init_domheap_pages() is called
>> which takes into account if static heap feature is used.
>>
>> Extract static_heap flag from init data bootinfo, as it will be needed
>> after destroying the init data section, rename it to using_static_heap
>> and use it to tell whether the Xen static heap feature is enabled.
>>
>> Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
>> Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
>> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> # common
>
> [...]
>
>> +#ifdef CONFIG_STATIC_MEMORY
>> +extern bool using_static_heap;
>> +#else
>> +#define using_static_heap false
>> +#endif
> Why?
>
> Static heap feature is not protected by CONFIG_STATIC_MEMORY today, so you
> would introduce a silent regression
> (i.e. without config enabled, property would be ignored and there would be no
> static heap with no error message).
>
> ~Michal
>
Thanks for pointing that out, I based my assumption on trusting the functional
changes form the original patch, now that
you point out that, seems also to me that the static heap feature is not
dependent on the static memory, it can work with
or without it.
I’ll do the changes in order to address that.
Cheers,
Luca
|