[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/11] xen/arm: Conditional compilation of kernel_info.shm_mem member
- To: Luca Fancellu <luca.fancellu@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Tue, 19 Mar 2024 15:58:00 +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=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=Oh6tmfvN8fcDo+SfSU22ZT+cMk+cmr5zybKRLkkMs8E=; b=mcpHUkqIDNtOpip0mQ4ljqLuscm3HWZb8lgCLj7QiX2OkYAXg/M9wE0PUdVWKvA1ploesJEhy1wwYN9pt4MEeSCUEf0p6+7ZIuUxQ4K5NbPltj1g/VF6hBmNFXqKDq3vh5LbMKokn/SZtt9lklBg+9/T9zPDnqnDA3kCyXCQju7lW7IEj87bfoM/WyXe/PdU4OkkUb6Vce7ssrZAAK5XF8ysJ8qlpQDaHuE/r4He1V+FDrkemCMW/sUSJUkBKbcHKVUcfTI2bZdUcKHlkBgn+/d6806Vik6wxNBUQlMme9lS8Fnjxb4DpYT8qJW5jVww/1U02CgcFWHheZ+Jwmpzhg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CkWxsPbwapFMqkH1k5eCSd+TNL5ZLnJURvTytWbzAUBVYPVsRYqQTPzEMIvpzDEXADKN3sx7kzu3a5r1U+OPO6mKFwuUMdTD2XOq6PhipqPkhtWNkFK6ryfHC/QBKyJARfEa4oMShUmiBMZtLv/3L8wKeBtG7TKLrUOfHMmPbaJIiOBub8Nd2OySbsHj/twhFc/wGluAQRin53LIwPQBjjvw0u/w3CM3VOyep4Jj7W1SDcKA/EcOhwZDh70j93RBf4JOPrSvuv3RaBhe6YzO9aA+CfhUtJ8qemTNpgVDRsiQHJBOvfhluMOtB9C9xwUkosRA10pufa6qggH+Kx9RAg==
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 19 Mar 2024 14:58:18 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Luca,
On 12/03/2024 14:03, Luca Fancellu wrote:
>
>
> The user of shm_mem member of the 'struct kernel_info' is only
> the code managing the static shared memory feature, which can be
> compiled out using CONFIG_STATIC_SHM, so in case the feature is
> not requested, that member won't be used and will waste memory
> space.
>
> To address this issue, protect the member with the Kconfig parameter
> and modify the signature of the only function using it to remove
> any reference to the member from outside the static-shmem module.
>
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
NIT: I always wonder why we have hundreds of functions taking both struct
domain and
struct kernel_info as arguments if the latter has the former as its member. As
you are
revisiting the function and modifying parameter list, you could take the
opportunity
to change it. But you don't have to.
~Michal
|