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

[XEN v1 0/9] Add support for 32 bit physical address


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Thu, 15 Dec 2022 19:32:36 +0000
  • 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=L5zcmeRFz8lDxQOJjYxclv81XepsraOXmyBCIc/D3dI=; b=gKk4+5wDPSr2BbGc1o8qALpQLBSRSVktlgBCQUxpXWRIdLUvO7C2XoqLZEaXEyZ9kj+xNvxcWZ2fikU4M/C5BTKBVoxR2FL2yuuRX1Zc5CMxB1omFTQ9eOQQgVTOBBm+6L+RdcEQxhTJsFiqQdqx5jbcu1z3mOrW6kmcHWI/BLuf4Fjd1o7Jt46/GpOF/mzUXulMvMAL2MAoLlJDg3B1hqcb6iNQcqPr7XUoCvznmMLGAsGOzxZ5zoM5lZUUnA2INcv87qrdPcT75tBZrWtGNpzOGZxMGJJxvVteJNUbcoi+Q23TZf5D+Oz2daE4DN9X535xPf5uEtPyO26wUi3Bfg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dq2TwASc3+cW3sfM+peayYzbs0oNA+1u7pvUN33tVE4eMv57a15HkZgF2I/w8XriKORVDMfKH1tzflvQKXUjYaQFwWwc2GXgpvWBwOUz3F+PzgRnNgi2IFU3BOM8jWu4x06lVgbpookPglovtjy1qQ25LeKXtpA+H2An+oZ/UVPGbSTh8P7Cc3kJkCAPO7+/esfNBxAzCTQlzBnXY5rZhBSD58CY4GWg1XUKS6yvhbRW0UV9g7xKhjVyDFUOVh2O6sxk+FNwvA3XySGMxdsHE9Z5ugHYYdAGLF8+qA+UBbV8uh1warvEBoNPlXZ5tvQvGVgUltk/s0JQRBXCAJBrDg==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefano.stabellini@xxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Thu, 15 Dec 2022 19:33:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi,

Please have a look at 
https://lists.xenproject.org/archives/html/xen-devel/2022-11/msg01465.html
for the context.

The benefits of using 32 bit physical addresses are as follows :-

1. It helps to use Xen on platforms (for eg R52) which supports 32 bit
physical addresses and has no support for large page address extension.
On 32 bit MPU systems which supports flat-mapping (for eg R52), it helps
to translate 32 bit VA into 32 bit PA.

2. It also helps in code optimization when the underlying platform does not
use large page address extension.


The following points are to be noted :-
1. Device tree always use u64 for address and size. The caller needs to
translate between u64 and u32 (when 32 bit physical addressing is used).
2. Currently, we have enabled this option for Arm_32 as the MMU for Arm_64
uses 48 bit physical addressing.
3. https://lists.xenproject.org/archives/html/xen-devel/2022-12/msg00117.html
has been added to this series.

Ayan Kumar Halder (9):
  xen/arm: Remove the extra assignment
  xen/arm: Define translate_dt_address_size() for the translation
    between u64 and paddr_t
  xen/arm: Always use 'u64' instead of 'paddr_t' for address and size in
    DT
  xen/arm: Use translate_dt_address_size() to translate between device
    tree addr/size and paddr_t
  xen/arm: Use 'PRIpaddr' to display 'paddr_t' variable
  xen/arm: Use 'u64' to represent 'unsigned long long'
  xen/arm: Restrict zeroeth_table_offset for ARM_64
  xen/arm: Other adaptations required to support 32bit paddr
  xen/arm: Introduce ARM_PA_32 to support 32 bit physical address

 xen/arch/arm/Kconfig                 |  9 ++++
 xen/arch/arm/bootfdt.c               | 22 +++++----
 xen/arch/arm/domain_build.c          | 69 ++++++++++++++++++++--------
 xen/arch/arm/gic-v2.c                | 39 ++++++++++++----
 xen/arch/arm/gic-v3.c                | 33 +++++++++++--
 xen/arch/arm/guest_walk.c            |  2 +
 xen/arch/arm/include/asm/lpae.h      | 10 ++++
 xen/arch/arm/include/asm/page-bits.h |  2 +
 xen/arch/arm/include/asm/platform.h  | 26 +++++++++++
 xen/arch/arm/include/asm/types.h     |  7 +++
 xen/arch/arm/mm.c                    |  6 ++-
 xen/arch/arm/platforms/brcm.c        |  9 +++-
 xen/arch/arm/platforms/exynos5.c     | 48 +++++++++++++------
 xen/arch/arm/platforms/sunxi.c       | 11 ++++-
 xen/arch/arm/setup.c                 | 18 +++++++-
 xen/drivers/char/exynos4210-uart.c   | 10 +++-
 xen/drivers/char/ns16550.c           | 16 ++++---
 xen/drivers/char/omap-uart.c         | 10 +++-
 xen/drivers/char/pl011.c             | 10 +++-
 xen/drivers/char/scif-uart.c         | 10 +++-
 xen/drivers/passthrough/arm/smmu.c   | 18 ++++++--
 xen/include/xen/serial.h             |  2 +-
 22 files changed, 305 insertions(+), 82 deletions(-)

-- 
2.17.1




 


Rackspace

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