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

Re: [PATCH 05/11] xen/arm: Introduce helper for static memory pages


  • To: Luca Fancellu <luca.fancellu@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 20 Mar 2024 11:41:36 +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=Ahkl+so/vWN4QFLNrbnQu94+YQ9o6SWrby7EpEPkVQA=; b=EuQi8uWEmdXww4xwwNbBdOftpAAhkEo8wrJw91DPXCbxqvt8GXn7N/PXyI9IHzLc5/Nu5s/l01nSsSCKgm8dpXRamEd8l0fnNH+knhZ9QF6p3Ozfmc2ZL1bg2m6Pk1//wq3VmQAM78btVMfYs4+W6rBBeYKzMztA3EcFVmIZDpinCiSOXi3AyLyc73Y04qF5SurudUZ0NvgukPbuXkUsusfz9XNw55bw6otNFnLh8ukQwVObFF7Ypbo+ZLnVNBFtV2yxhuYpebMQG/t3vw8OLUzjldL6MDeRZsNRNxozMlJ5BiwJAJ14Z6On2RfsoF+5V1dUZtdVDTovAhE9sDGb3w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lXSmWGDpHWVU4QTneCknMpgRneWlzchX+EXwawKACnDViuF/0GfLeI9cusFkr3MmPABT+2XxYDJaICk51SZFR0GjFMq1cbSn1kqaP57XsneH2+Hrl5jeZX5/j6MOVPgeensebTUa2ctbUeDLAjZFpBm2QPYOz+9mjsi5BinI7BEKxJRn2GnXIrqyD6uNhU4Bnjb+k8sFnXAwden3DjcdCN1k+AGwH8VvmDt0PUbeItroQ+7Zw8RVcuXPvWmpFYSW/oyhkdXJmlizetubLHmaZHomPuYz4TEXxw2kZkAG28jEdtr0BaNVJxSFqtcd29yE1fciq9ziytrf/+BQsJH9BQ==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 20 Mar 2024 10:41:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Luca,

On 12/03/2024 14:03, Luca Fancellu wrote:
> 
> 
> Introduce a new helper function in the static-memory module
> that can be called to manage static memory banks, this is
> done to reuse the code when other modules would like to
> manage static memory banks that are not part of the
> reserved_mem structure.
The placement of this patch in a series is a bit strange given no use of 
init_staticmem_bank()
in the subsequent patch. I would move it right before patch #8.

Also, you could mention that this is because the information about shared 
memory regions
will no longer be stored in reserved_mem.

> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> ---
>  xen/arch/arm/include/asm/static-memory.h | 12 ++++++++++++
>  xen/arch/arm/static-memory.c             | 12 +-----------
>  2 files changed, 13 insertions(+), 11 deletions(-)
> 
> diff --git a/xen/arch/arm/include/asm/static-memory.h 
> b/xen/arch/arm/include/asm/static-memory.h
> index 3e3efd70c38d..665d4df50eda 100644
> --- a/xen/arch/arm/include/asm/static-memory.h
> +++ b/xen/arch/arm/include/asm/static-memory.h
> @@ -7,6 +7,18 @@
> 
>  #ifdef CONFIG_STATIC_MEMORY
> 
> +static inline void init_staticmem_bank(const struct membank *bank)
> +{
> +    mfn_t bank_start = _mfn(PFN_UP(bank->start));
The header should be self-contained so you should add <xen/pfn.h> that is not 
included in asm/kernel.h path.

Other than that:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal



 


Rackspace

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