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

Re: [XEN v7 08/11] xen/arm: Introduce choice to enable 64/32 bit physical addressing


  • To: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 19 May 2023 11:01:59 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.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=KOUjcdEH9fDlsrAVmFsfUK4vNJ6hQlSxplVv/eOZy/8=; b=i0xsMhWguTf6qqUVmWLc6Q5y3ehY7XgHa5TVN7teFofhRQMtBYB5L9fHjEKhjYOVnvLGrzV0iZkdmal9mv5UmJ5W5SwrXJ3vnNBOyLkn8MR9hwg8zz4oZ1mdScwN2dUK0VG8BoGFJCxavcpKocSTjMmzZKn9uxTbjZ51kLNEyA15W8KWq5o2S1qp8a4Ek2ZmwJQS4ciceM6c/DARmtieUilIRVrZDFqdYsfNrrv4nw/Jhnt8Sd2AP40wOWL9FOL2ImxofrB65vNC85EDJx2LYBS+sSgJxnxPP5lep8OkO0a5mwi3MtDGI9iYIBfm3+SWJbqNsE5/KIqUc8XRED+dwQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q/sOPuPCfqeA5d5eK0IYYiJC0huvLBoKzwOcvWRJ0QDZswhqwx9HQNS4BfwSNbLA5zH6DM4pNMba5z3BhkABhmrVDo5z5cwRdOhRh3YasGNjI3kLySET6pmVKx0KicUIxA+60HPopeYXONyn80X5XeplEWEa4PYLcG1VPvEZQBIYu/d4mwW+7Pa7CCiA5GfIT9Hkhbm0ugiR7FlUdxfWSlNSadHOBRw6mHipu8DN3o5R4QD0n2cAQXemgquGX/P6ckZ1R0nzGGOLwY9gBU0AQ3SRu8Ib8QJooVMAITUQW2UURIl3EMoGKIhpT7X4y5NXra5OvNIWI7J21w8fn7D7VQ==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefano.stabellini@xxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, <andrew.cooper3@xxxxxxxxxx>, <george.dunlap@xxxxxxxxxx>, <jbeulich@xxxxxxxx>, <wl@xxxxxxx>, <rahul.singh@xxxxxxx>
  • Delivery-date: Fri, 19 May 2023 09:02:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Ayan,

On 18/05/2023 16:39, Ayan Kumar Halder wrote:
> Some Arm based hardware platforms which does not support LPAE
> (eg Cortex-R52), uses 32 bit physical addresses.
> Also, users may choose to use 32 bits to represent physical addresses
> for optimization.
> 
> To support the above use cases, we have introduced arch independent
> config to choose if the physical address can be represented using
> 32 bits (PHYS_ADDR_T_32) or 64 bits (!PHYS_ADDR_T_32).
> For now only ARM_32 provides support to enable 32 bit physical
> addressing.
> 
> When PHYS_ADDR_T_32 is defined, PADDR_BITS is set to 32. Note that we
> use "unsigned long" (not "uint32_t") to denote the datatype of physical
> address. This is done to avoid using a cast each time PAGE_* macros are
> used on paddr_t. On 32-bit architecture, "unsigned long" is 32-bit
> wide. Thus, it can be used to denote physical address.
I think the only issue is when printing but you do not mention it as the root 
cause.
Also, FWIR it all comes down to PAGE_SIZE being defined as L.

I leave it up to you to decide if this is sufficient explanation.

Small notice:
Generally each commit in a series should build successfully. This is not the 
case starting from this patch
if user (or randconfig) selects 32-bit PA. But I know that other patches depend 
on PHYS_ADDR_T_32 so
I guess it would be difficult.

> 
> When PHYS_ADDR_T_32 is not defined for ARM_32, PADDR_BITS is set to 40.
> For ARM_64, PADDR_BITS is set to 48.
> The last two are same as the current configuration used today on Xen.
> 
> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>

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®.