All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN v2 00/11] Add support for 32 bit physical address
@ 2023-01-17 17:43 Ayan Kumar Halder
  2023-01-17 17:43 ` [XEN v2 01/11] xen/ns16550: Remove unneeded truncation check in the DT init code Ayan Kumar Halder
                   ` (11 more replies)
  0 siblings, 12 replies; 64+ messages in thread
From: Ayan Kumar Halder @ 2023-01-17 17:43 UTC (permalink / raw)
  To: xen-devel
  Cc: sstabellini, stefano.stabellini, julien, Volodymyr_Babchuk,
	bertrand.marquis, Ayan Kumar Halder

Hi All,

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.

Changes from :

v1 - 1. Reordered the patches such that the first three patches fixes issues in
the existing codebase. These can be applied independent of the remaining patches
in this serie,

2. Dropped translate_dt_address_size() for the address/size translation between
paddr_t and u64 (as parsed from the device tree). Also, dropped the check for
truncation (while converting u64 to paddr_t).
Instead now we have modified device_tree_get_reg() and typecasted the return for
dt_read_number(), to obtain paddr_t. Also, introduced wrappers for
fdt_get_mem_rsv() and dt_device_get_address() for the same purpose. These can be
found in patch 4/11 and patch 6/11.

3. Split "Other adaptations required to support 32bit paddr" into the following
individual patches for each adaptation :
  xen/arm: smmu: Use writeq_relaxed_non_atomic() for writing to
    SMMU_CBn_TTBR0
  xen/arm: guest_walk: LPAE specific bits should be enclosed within
    "ifndef CONFIG_ARM_PA_32"

4. Introduced "xen/arm: p2m: Enable support for 32bit IPA".

Ayan Kumar Halder (11):
  xen/ns16550: Remove unneeded truncation check in the DT init code
  xen/arm: Use the correct format specifier
  xen/arm: domain_build: Replace use of paddr_t in find_domU_holes()
  xen/arm: Typecast the DT values into paddr_t
  xen/arm: Use paddr_t instead of u64 for address/size
  xen/arm: Introduce a wrapper for dt_device_get_address() to handle
    paddr_t
  xen/arm: smmu: Use writeq_relaxed_non_atomic() for writing to
    SMMU_CBn_TTBR0
  xen/arm: guest_walk: LPAE specific bits should be enclosed within
    "ifndef CONFIG_ARM_PA_32"
  xen/arm: Introduce ARM_PA_32 to support 32 bit physical address
  xen/arm: Restrict zeroeth_table_offset for ARM_64
  xen/arm: p2m: Enable support for 32bit IPA

 xen/arch/arm/Kconfig                   |  9 ++++
 xen/arch/arm/bootfdt.c                 | 23 ++++++----
 xen/arch/arm/domain_build.c            | 32 +++++++-------
 xen/arch/arm/gic-v2.c                  | 17 ++++----
 xen/arch/arm/gic-v3.c                  | 11 ++---
 xen/arch/arm/guest_walk.c              |  2 +
 xen/arch/arm/include/asm/device_tree.h | 59 ++++++++++++++++++++++++++
 xen/arch/arm/include/asm/lpae.h        |  4 ++
 xen/arch/arm/include/asm/page-bits.h   |  2 +
 xen/arch/arm/include/asm/setup.h       |  2 +-
 xen/arch/arm/include/asm/types.h       |  7 +++
 xen/arch/arm/mm.c                      |  9 +---
 xen/arch/arm/p2m.c                     | 10 +++--
 xen/arch/arm/platforms/exynos5.c       | 33 +++++++-------
 xen/arch/arm/platforms/sunxi.c         |  3 +-
 xen/arch/arm/setup.c                   | 14 +++---
 xen/arch/arm/smpboot.c                 |  2 +-
 xen/drivers/char/exynos4210-uart.c     |  5 ++-
 xen/drivers/char/ns16550.c             | 16 +++----
 xen/drivers/char/omap-uart.c           |  5 ++-
 xen/drivers/char/pl011.c               |  7 +--
 xen/drivers/char/scif-uart.c           |  5 ++-
 xen/drivers/passthrough/arm/smmu.c     | 24 ++++++-----
 23 files changed, 199 insertions(+), 102 deletions(-)
 create mode 100644 xen/arch/arm/include/asm/device_tree.h

-- 
2.17.1



^ permalink raw reply	[flat|nested] 64+ messages in thread

end of thread, other threads:[~2023-02-10 17:58 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-17 17:43 [XEN v2 00/11] Add support for 32 bit physical address Ayan Kumar Halder
2023-01-17 17:43 ` [XEN v2 01/11] xen/ns16550: Remove unneeded truncation check in the DT init code Ayan Kumar Halder
2023-01-17 17:43 ` [XEN v2 02/11] xen/arm: Use the correct format specifier Ayan Kumar Halder
2023-01-19 22:54   ` Stefano Stabellini
2023-01-20  9:32     ` Julien Grall
2023-01-20 11:09       ` Ayan Kumar Halder
2023-01-20 14:40       ` Michal Orzel
2023-01-20 15:09         ` Julien Grall
2023-01-20 16:03           ` Michal Orzel
2023-01-20 17:49             ` Julien Grall
2023-01-20 18:08               ` Ayan Kumar Halder
2023-01-20 23:01                 ` Stefano Stabellini
2023-01-21 10:24                   ` Michal Orzel
2023-01-17 17:43 ` [XEN v2 03/11] xen/arm: domain_build: Replace use of paddr_t in find_domU_holes() Ayan Kumar Halder
2023-01-19 23:02   ` Stefano Stabellini
2023-01-20  9:48     ` Julien Grall
2023-01-20  9:52       ` Julien Grall
2023-01-17 17:43 ` [XEN v2 04/11] xen/arm: Typecast the DT values into paddr_t Ayan Kumar Halder
2023-01-19 23:20   ` Stefano Stabellini
2023-01-19 23:34     ` Stefano Stabellini
2023-01-20 10:16       ` Julien Grall
2023-01-31 10:51         ` Ayan Kumar Halder
2023-01-31 15:57           ` Julien Grall
2023-01-17 17:43 ` [XEN v2 05/11] xen/arm: Use paddr_t instead of u64 for address/size Ayan Kumar Halder
2023-01-18  8:40   ` Jan Beulich
2023-01-18 11:15     ` Ayan Kumar Halder
2023-01-18 13:14       ` Jan Beulich
2023-01-18 13:34         ` George Dunlap
2023-01-18 13:58           ` Jan Beulich
2023-01-18 14:45             ` George Dunlap
2023-01-19 23:24   ` Stefano Stabellini
2023-02-06 19:21     ` Ayan Kumar Halder
2023-02-07  9:03       ` Julien Grall
2023-02-07 10:59         ` Ayan Kumar Halder
2023-02-07 12:18           ` Julien Grall
2023-01-20 10:34   ` Julien Grall
2023-01-17 17:43 ` [XEN v2 06/11] xen/arm: Introduce a wrapper for dt_device_get_address() to handle paddr_t Ayan Kumar Halder
2023-01-19 23:35   ` Stefano Stabellini
2023-01-17 17:43 ` [XEN v2 07/11] xen/arm: smmu: Use writeq_relaxed_non_atomic() for writing to SMMU_CBn_TTBR0 Ayan Kumar Halder
2023-01-19 23:40   ` Stefano Stabellini
2023-01-17 17:43 ` [XEN v2 08/11] xen/arm: guest_walk: LPAE specific bits should be enclosed within "ifndef CONFIG_ARM_PA_32" Ayan Kumar Halder
2023-01-19 23:43   ` Stefano Stabellini
2023-01-20 10:39     ` Julien Grall
2023-01-17 17:43 ` [XEN v2 09/11] xen/arm: Introduce ARM_PA_32 to support 32 bit physical address Ayan Kumar Halder
2023-01-18  8:50   ` Jan Beulich
2023-01-18 11:57     ` Ayan Kumar Halder
2023-01-18 13:19       ` Jan Beulich
2023-01-19 23:48         ` Stefano Stabellini
2023-01-18  9:18   ` Julien Grall
2023-01-30 22:00   ` Julien Grall
2023-01-17 17:43 ` [XEN v2 10/11] xen/arm: Restrict zeroeth_table_offset for ARM_64 Ayan Kumar Halder
2023-01-20  0:19   ` Stefano Stabellini
2023-01-20 10:53     ` Julien Grall
2023-01-20 16:53       ` Stefano Stabellini
2023-01-17 17:43 ` [XEN v2 11/11] xen/arm: p2m: Enable support for 32bit IPA Ayan Kumar Halder
2023-01-20  0:05   ` Stefano Stabellini
2023-01-20 11:06   ` Julien Grall
2023-02-07 15:34     ` Ayan Kumar Halder
2023-02-09 11:45       ` Julien Grall
2023-02-10 15:39         ` Ayan Kumar Halder
2023-02-10 16:19           ` Julien Grall
2023-02-10 17:51             ` Ayan Kumar Halder
2023-02-10 17:58               ` Julien Grall
2023-01-18 10:12 ` [XEN v2 00/11] Add support for 32 bit physical address Michal Orzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.