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

Re: [PATCH 2/5] xen/arm: mpu: Enclose access to MMU specific registers under CONFIG_MMU (arm32)


  • To: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Thu, 6 Feb 2025 14:48:48 +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=tvYeLjhRMVix6j3+b+I1nzZTZB9MQX1UmICd5i77dN4=; b=F6QEvdG0TCAUcm90E1HDxvv/rkBwyNLR4alGDecGF9KQZaPeIE71sPAuUN1BkxSCJndAixD/enh+bXQ/jXNQcqFIrsUwMgKtLplYNrYTYz2whVR/hHGsrv4PzdrGOrrnL3ageRVGBa08VlA3o740FEZQTvpafKTByJEL/H0Hl7p15mogPF4KtBsrYARG18owhNjMtxG2EeWXm7sqrYS/+UylAKgtLA3iU29ZNeM89x7qEYfnhMNCVetmYtvRVBUpnrme2KCcIHDGr9ElsSjVM2VDZGbzHkfDgk/lPm+sTC8UUWPc9hJiUhD3uRqCLJh1Em7RPOk27Cn/osa+EuT/8g==
  • 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=tvYeLjhRMVix6j3+b+I1nzZTZB9MQX1UmICd5i77dN4=; b=FrEDcVvA+88SqAODDapOyIv1PHRy2/Tc3cxzH7MmeTgul3/+kn+E8pVxVOuwGglNqODtcBmXL4Uho/2ndvE7K6Pxf7ujTHOxhPmssNFKYHXHjSyu6u+Ky+90uFSncBRh5fe6jyX6CfJbl4E95x9XJbqkk8cktuL40sIlXYLalE46xtEAQ0dKwpTxOe7c3Aw8nCA+WMGzmK5b54MWjlFvdOUl26rC99FS8o4doqFng/4VEhR8AfFIo+hkYLZH/DtfKVuxdZ1dkpmenobxmUHGID/vd8Ed+Af8L/pIRDm72WhPW/XaIhXErMAO3/SA3ld1oi/Yk+5w3Bojdx/S3yHbyQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=iKIJCKAmxlRRmTIM8C5Q5E/by1xtGWiwsxb0bHu3IQZtpKHqEdFRZZLlJRvNL9BgJ0z/DW//JCXBoM+dnbOY+ZUIIyF3frZXcF3yBm22Tl/aVbPDivbQxwp1najlQSeT2NPHuLaQzupB9QPMrF4SwDR/PxJVSpwnRq/K9DW+OLD5rmeGKQPrndzw+vcVBxhFRKXEqZ2M7BPL7J9+R8jAWeXOodz+c113nqCE1y9/e6qNUWNjJi6sgw70UTZ827/dG9RGSc9O/znm6sPBXie/AWSoTbR4zQny6FtZlT00MUKPz3VXNqma90XFVKOQ6uJt1OE/JpEK2r8madOEsmzS4Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oBcRemQh33pvjKjWJaJnGn8/1NYVKHJY0B71WYQYs30Ashj2O8rS1wrKJm2edkPAjqcpa/KPJ7raU7vwE0A8pz4TLzafBZl79eqfgX3SsrykUjs14oAI1jZAGXCyh4Ec2zlDLKTppVfP9DnOGdOK1/PyyuGkV379Dm/RcPhwj2N/SKGmYMkKpM8Z+5i0TvXqe3tJxapx403Yl74CiUfH4XYJNXILTs/7yVNKYFAZKO/q0rwabfIrcmmAJMnscO3OjyhF29Gb+biZsOBfmPg/JTHp9rw36ClgczFpRmysx6p4Jt+Sz7+9VdYKxzL5IB47+J0/xfVkY0A3B+Juo1pOcw==
  • 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>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 06 Feb 2025 14:49:11 +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: AQHbdzpqJMaBGUVj3UeUNZWdRXxdfLM6XfYA
  • Thread-topic: [PATCH 2/5] xen/arm: mpu: Enclose access to MMU specific registers under CONFIG_MMU (arm32)

Hi Ayan,

> On 4 Feb 2025, at 19:23, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> wrote:
> 
> All the EL2 MMU specific registers in head.S are enclosed within CONFIG_MMU.
> 
> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
> ---
> xen/arch/arm/arm32/head.S | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
> index 4ff5c220bc..1d0f84b18f 100644
> --- a/xen/arch/arm/arm32/head.S
> +++ b/xen/arch/arm/arm32/head.S
> @@ -224,6 +224,7 @@ cpu_init_done:
>         mcr   CP32(r0, HMAIR0)
>         mcr   CP32(r1, HMAIR1)
> 
> +#ifdef CONFIG_MMU
>         /*
>          * Set up the HTCR:
>          * PT walks use Inner-Shareable accesses,
> @@ -232,6 +233,7 @@ cpu_init_done:
>          */
>         mov_w r0, 
> (TCR_RES1|TCR_SH0_IS|TCR_ORGN0_WBWA|TCR_IRGN0_WBWA|TCR_T0SZ(0))
>         mcr   CP32(r0, HTCR)
> +#endif

I was wondering if here it was better, for readability, to have this part 
defined in the arm32/mmu/head.S and
arm32/mpu/head.S could have implemented a stub, maybe the maintainer could help 
with that.

Anyway this solution works for me.

Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>

> 
>         mov_w r0, HSCTLR_SET
>         mcr   CP32(r0, HSCTLR)
> -- 
> 2.25.1
> 
> 




 


Rackspace

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