[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: Luca Fancellu <luca.fancellu@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Wed, 11 Dec 2024 12:59:15 +0100
- 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 (0)
- 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=IuRQHK89G/HNx5Gca97LlUCXEdGKy20FhP/9AKb8fkQ=; b=hpAJjJoTYjmkFBWOI3Qc7ZtzFQHbkFtcMtxL+PK1Pz2Q2YTSiWH+hD5vQKA+a7yBzIrB0/hskWHgJKHTY3hn6NLrZw/zn410Kpu0GGZyBefsSgD7c9N+d0mRNRQ7CSfsTfyqETlHvTrc6v5dWy8SXPNXAvY6nHlTUpQqaNNN/j+SuK5KZgVc4/Nfg6rY65U2eX0q6bEaEz3s1FrnUk54p1UxJP2JP3pGcBgrxWZZAQ+YnR0XZkk0MVngeEIULInRSt4hJGw6pPOlNL/3nUuw0tuoO7fCXkK8VgvXBDQztvZsKXbih/8PvaSWQhAmb4GfL+vuZ1t5uZYNlHrr4AhXuA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gpSQDH3y0fYsH096SNJxkHtUFokDOmf6fYnN09bxj6a7iyBcj5B0BpldPRPNTw8UQEDrJLSEhb4tWSGnz8o3Hnag7VmRYKbaJp9+7nNqEuHKZ0FnRgRt79b2l8QA1T2vIn29TAjW9j/44OiLPfsgB/aD4vD9fCLmtUEcPiHBSR6IZmJd2CXhCGZy8ofsegJJkx+HtqVZQXDM0jOeBIlUPJGg4Ecs8Rt+KCQNQSCu+RLJSfrw+g+SWWI2gDKkMWFgJw3hlcSrqipSJ5/bO2OoHxHH/kWreS6tHnu0664WtRkxokgMA5YJ7irChaum2j1h1dikzWPNAfF4BnlLWToMFg==
- Cc: 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 11:59:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|