[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN v3 6/9] xen/arm: Introduce choice to enable 64/32 bit physical addressing
Hi Stefano, On 11/02/2023 00:34, Stefano Stabellini wrote: On Wed, 8 Feb 2023, 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 configs to choose if the physical address can be represented using 32 bits (PHYS_ADDR_32) or 64 bits (PHYS_ADDR_64). For now only ARM_32 provides support to enable 32 bit physical addressing. Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> --- Changes from - v1 - 1. Extracted from "[XEN v1 8/9] xen/arm: Other adaptations required to support 32bit paddr". v2 - 1. Introduced Kconfig choice. ARM_64 can select PHYS_ADDR_64 only whereas ARM_32 can select PHYS_ADDR_32 or PHYS_ADDR_64. 2. For CONFIG_ARM_PA_32, paddr_t is defined as 'unsigned long'. (Jan,Julien please let me know if I understood your suggestion about Kconfig correctly). xen/arch/Kconfig | 12 +++++++++++ xen/arch/arm/Kconfig | 31 ++++++++++++++++++++++++++++ xen/arch/arm/include/asm/page-bits.h | 2 ++ xen/arch/arm/include/asm/types.h | 6 ++++++ 4 files changed, 51 insertions(+) diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig index 7028f7b74f..1eff312b51 100644 --- a/xen/arch/Kconfig +++ b/xen/arch/Kconfig @@ -1,6 +1,18 @@ config 64BIT bool+config PHYS_ADDR_32+ bool + help + Select this option if the physical addresses can be represented by + 32 bits. + +config PHYS_ADDR_64 + bool + help + Select this option if the physical addresses can be represented + 64 bits.These two config symbols should be defined in xen/arch/arm/Kconfig (unless you plan to also define them for x86). We discussed with Jan to consolidate types.h as RISC-V may want to use a 32-bit paddr_t. This would mean paddr_t would be defined a common header and therefore those config needs to be in common. I am not asking Ayan to work on the consolidation, but I think they should be defined in common (assuming arm will make use of it) and I would at least consider to add "select PHYS_ADDR_64" in "config X86". Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |