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

Re: [PATCH] xen/arm64: head: document missing input registers for MMU functions


  • To: Mykola Kvach <xakep.amatop@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 2 Jun 2025 09:10: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=hyUNW9kSP/98q59S4vT6keD2i0uxNIIX6C152C3yvdE=; b=irAOPO9K12cm2yxT1gDal/Byx448vDDVVGTaDSF5X8B7K8ojAhvE1qOYAsBGc/bNgKkBfUvgVUxAYgFogvcGswA+R1yHML6u+hd+EqTmV1024ZBZ+Dk5FZK88QDA5CdMhof1eDpwNAGPvRfrXYcRjLw4XKN6jmDtTf1IG8mRSLKj3Hl0P6kX5iq32lp6z8dcJ/ggjkxNQLx7XzjQSlky6iJkYXSU7QT2wCnDaUiCm661qF98aFvEb6bNsPSU5GSL2oF69Amddfp9R2V9IVck6yJHPtShFrzFuRddvI+VUQnI6N4uMEn9KMl3A9s6J8a9K1CpjaAeXBY+vMMLwDn2jQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pny9ONUV1SxPtKl8TXN4Yeu6C7MzlLxeeqCiMA+eSAa43JRf81904CTV/SsFNcDXc3FQ5eboCyXEJJAZOUYNZWw/f/2TFiGEODU/CT476/Xbr1mxITehvxfCGJjpByjdN/4DVkLCwbXDZyRKo0oGafg5D/BAPB75rF7a3Pz7yQyMn//VeDUB74CkrOJxdMiFfyS59wOvZcuUWxPC7xpl/QBhiD3gs3PzwNYncu3fiRL/cmbwgCGE+Vs+aXi8zfs5/Evm5ro9STBR/bMuZdoTgOMluUAuyWPszsxwvAuq5LFUiF6sTNOd/VljFMAMkbICn4+MvAFwfMGIovOYLrggSg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Mykola Kvach <mykola_kvach@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 02 Jun 2025 07:10:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 30/05/2025 22:31, Mykola Kvach wrote:
> From: Mykola Kvach <mykola_kvach@xxxxxxxx>
> 
> Add missing input register descriptions to enable_secondary_cpu_mm
> and enable_boot_cpu_mm functions.
> 
> Specifically:
> - x19 is used in enable_boot_cpu_mm as physical start address.
> - x20 is used in both functions for physical offset passed to load_paddr.
I'm not sure if we need to document register usage that is part of a comment in
so called "Common register usage". It's repeating information for me. That said,
I can see that Arm32 does that too so no objection.

> 
> This update improves code clarity and consistency in comments.
> 
> No functional changes are introduced by this patch.
> 
> Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
> ---
>  xen/arch/arm/arm64/mmu/head.S | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/xen/arch/arm/arm64/mmu/head.S b/xen/arch/arm/arm64/mmu/head.S
> index 634156f83d..033b3a018a 100644
> --- a/xen/arch/arm/arm64/mmu/head.S
> +++ b/xen/arch/arm/arm64/mmu/head.S
> @@ -313,6 +313,7 @@ END(enable_mmu)
>   *
>   * Inputs:
>   *   lr : Virtual address to return to.
> + *   x20: phys offset (used by load_paddr)
>   *
>   * Clobbers x0 - x6
>   */
> @@ -337,6 +338,8 @@ END(enable_secondary_cpu_mm)
>   *
>   * Inputs:
>   *   lr : Virtual address to return to.
> + *   x19: paddr(start) (used by remove_identity_mapping)
AFAICT it's also used by create_page_tables. I don't see it beneficial to
mention the places the register is used. It can easily go stale.

With the remark addressed:
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®.