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

Re: [for-4.19] xen/arm64: head: only use the macro load_paddr() in the MMU code


  • To: Julien Grall <julien@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 17 Oct 2023 16:07:17 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org 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
  • 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=SsKVDvh2ecqYCHCl3DPVr8ayxOXgqnPZCxpgmjm0d/0=; b=AP0tdLGuo/CBJt0APlFpaYT4hK8+DDy+H9A2q1x6ZcDdJJeRlqdKLEIXYe/9YP2t3dyiVE50Aaqu4bira5KY2YqrfrMkkI5zvPiYzSKVRS1MA5ir+kaAS5Y7lCw9qTfLMjNkHyPEW+pO/EzpSwxQnhI8hT3qVEup0ldkZqwLThLO5bwx6WRSr39zPhB5+0UIASh4uvMDsk96UBBSeY5sEBpsrX+XlcYrzQ1h7xp4Wog+4ki9tWJd1VR/+BxGbiyhGR1vpbPSENrsTuHmQK37zGSPFGkteN1gM0sGWMs6d+BYPLFAKTVz/DvSiHFt7jS3AZI+j8NwLKy4ib6gLkGWTw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mHOCBYOaiBMK7I4WUzs8ikMvNpj2WLC5g8oBW5kQXCHhcltP8PXJLGlI8ffWdh3dvcZuypklO6ovIxLo6XKnwGFtQsugXhPbTtC+4VCNtOwKyfcdDM/9kIzZ/SYH+8KToOBcEtkfPqDq7nvbtLODYXi0eLHfWVgZbpUJksj6WRdA81GKwmzhst03PyZSjEUIgDu6v5SuRvT/Wa/v0F9w8CaMBE9mG9O8SmK2h1CyJYlEdb3OrP3qQ2y8o2RtZddsdm6iBO9ZNDQV/4CoEEgQy4daOb7EqEtxuf5iZdhsyRMer4hmusoclRcupgSDhPCB1QmN03+Ry+KKhHgOF0fFbw==
  • Cc: <ayan.kumar.halder@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 17 Oct 2023 14:07:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 17/10/2023 14:52, Julien Grall wrote:
> 
> 
> The macro load_paddr() requires to know the offset between the
> physical location of Xen and the virtual location.
> 
> When using the MPU, x20 will always be 0. Rather than wasting
> a register for a compile-time constant value, it would be best if
> we can avoid using load_paddr() altogher in the common head.S code.
s/altogher/altogether/

> 
> The current use of load_paddr() are equivalent to adr_l() because
> the MMU is off.
> 
> All the use of load_paddr() in arm64/head.S are now replaced with
> adr_l(). With that, load_paddr() can now be moved in arm64/mmu/head.S.
> 
> For now, x20 is still unconditionally set. But this could change
> in the future if needed.
> 
> Signed-off-by: Julien Grall <julien@xxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

Side note:
Looking at all the uses of load_paddr(), none of them takes place after 
enabling MMU
which would indicate that we actually don't need this macro at all. Do you 
agree?

~Michal
 



 


Rackspace

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