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

Re: [PATCH v2 6/6] arm/mpu: Implement remove_early_mappings for MPU systems


  • To: Hari Limaye <hari.limaye@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Wed, 9 Jul 2025 10:37:37 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • 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=puUVD09YFPTxmCbI0jYZ0EqnQO/T3V3D9xwYQiiOJF4=; b=F0VM4wfAshFRXV2ADDTGMq9eYnd3fGwRXx0jnSbjIaJOWz7xwimJFIZagBsmDpqY+3bfnlM6zUi5iKjikCsFWTKmnY4hRVmtCgIn5Xml9joz/HlRgCM1v/faxrUXTcUdFfIVVydLh5IViFDDOYjtb474Xp16a+ivY3fpXb9zMYCo/fEVKzFlISq09ikrNi1dnqBiD+dcxcRgS5VFVz3BcN4cTghuCIfqJ2Uo9b4rbEeAZgtBncH9uHMjpTDO1SkGaY75GmjdHFmb8dtrtr+NddNd96laLcArth8AAHFObCMkJyPbR3O+LxX5UN08xNTJxHOd6yJFDjsW9M/ICbeFRQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Bq68NcJCL0csx7MANB13+5TRSoNbHddpsGvT8hXr+lis+NOLR14/erVe4dRWW2Sk1n3RV+vsnoeUc65c+IMHv6enxLtNR4b8SjpRY4c7TmcYrKioAvOX+YycODN+0ojmi/jenmK9GXqqZb9IJLZMGGR/hdlU7DXJTii4btJEiA7YMU34U/FpshDZHiJyOUwSP3VhfdGmmI6KQAUHtoRVzmuc47PmRI+DULKEWyfrbk3V5WtBypi1WMAGAFI5Fs4cKdhqw+/5oBWCGNt8ig3HIBi0zaF/3YVYnU2gaCisri7XUD009zhs1HbUaqmxPyX6gFCTkgqk7uEs28/qM8j70Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: luca.fancellu@xxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Wed, 09 Jul 2025 08:37:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 02/07/2025 16:14, Hari Limaye wrote:
> From: Luca Fancellu <luca.fancellu@xxxxxxx>
> 
> Implement remove_early_mappings for MPU systems.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> Signed-off-by: Hari Limaye <hari.limaye@xxxxxxx>
> Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
> ---
> Changes from v1:
> - Add Ayan's R-b
> ---
>  xen/arch/arm/mpu/setup.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/mpu/setup.c b/xen/arch/arm/mpu/setup.c
> index ab00cb944b..5928b534d5 100644
> --- a/xen/arch/arm/mpu/setup.c
> +++ b/xen/arch/arm/mpu/setup.c
> @@ -97,7 +97,14 @@ void __init copy_from_paddr(void *dst, paddr_t paddr, 
> unsigned long len)
>  
>  void __init remove_early_mappings(void)
>  {
> -    BUG_ON("unimplemented");
> +    int rc;
> +
> +    if ( mapped_fdt_paddr == INVALID_PADDR )
Hmm, I cannot think of a scenario where this is true. What am I missing?

> +        return;
> +
> +    rc = destroy_xen_mappings(round_pgdown(mapped_fdt_paddr), 
> mapped_fdt_limit);
> +    if ( rc )
> +        panic("Unable to unmap the device-tree.\n");
NIT: please, no dots at the end

>  }
>  
>  /*

~Michal




 


Rackspace

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