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

Re: [PATCH v3 03/52] xen/arm: add an option to define Xen start address for Armv8-R


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • Date: Tue, 4 Jul 2023 11:36:51 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=PJUjuyEd1TRdKKm1b4FR9xxd+vZ5JueFE4Et58xUmqs=; b=KO2EHMN4+p6ou6ixrO/7ShOmkHKmk83tlC9uUz6gJKdaLiWCD/21hK7rGYU+CjX6z18pFQQledpWOg8eYeSYUUS40smowrKwwS76AEvGL9aaiGWleL81+QxXmnUVY6WPZ/aG9O6H+rPiZHMO798Rrd0t3Bgj6i4dvQNLWttHnc4d1bfeaLJdYxg061EC/kG+eIGbTDlizIAY6TeGck2PiF51PyCiDHwbIFt6FVg+HGFVbgzyDFOW/QtyHm2XC2a2KowYMbEWEHum/TVyQiT0XIzRqR6ZH3cdp3d9e7YEOZ8V6j+/Z17FCa1oARUgY8IbUArx3YUSP6miXwkYNsMwkQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YV/ULC8jdRav2Z/oiP2bCUuzmVFplGVxOLROBKw880zctX5NjsbUou/j+9gml0E0hCK4fjQdt51PcLoaXrrwK13iFgADQWDWLeaUTsM9X1KzyAJHzIMFWHSTmN3W6ZLPaMyR72jJYE5wTGliiI/gfuN+xGJ0TqZGRrzwoQ7SiyZQKrBogqGWnTk9ejXDca0vy/lX4Ids27r4h3VLV/IpQ+DYNF0Tr62MkoDQn87akI0yt/ql6D4BVmOCdKUpdEGDa0er7zYHzWGlriOAdEIl+p7h4lG2eChciptSFL6H6MGuPYC6DZZfsNuDHE5T3IsmBVQtE4TUCqOelk9HdfNnEg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Wei Chen <wei.chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 04 Jul 2023 10:37:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Penny,

On 26/06/2023 04:33, Penny Zheng wrote:
CAUTION: This message has originated from an External Source. Please use proper 
judgment and caution when opening attachments, clicking links, or responding to 
this email.


From: Wei Chen <wei.chen@xxxxxxx>

On Armv8-A, Xen has a fixed virtual start address (link address
too) for all Armv8-A platforms. In an MMU based system, Xen can
map its loaded address to this virtual start address. So, on
Armv8-A platforms, the Xen start address does not need to be
configurable. But on Armv8-R platforms, there is no MMU to map
loaded address to a fixed virtual address and different platforms
will have very different address space layout. So Xen cannot use
a fixed physical address on MPU based system and need to have it
configurable.

In this patch we introduce one Kconfig option for users to define
the default Xen start address for Armv8-R. Users can enter the
address in config time, or select the tailored platform config
file from arch/arm/configs.

And as we introduced Armv8-R to Xen, that means the existed Arm64
MMU based platforms should not be listed in Armv8-R platform
list, so we add !HAS_MPU dependency for these platforms.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
---
v1 -> v2:
1. Remove the platform header fvp_baser.h.
2. Remove the default start address for fvp_baser64.
3. Remove the description of default address from commit log.
4. Change HAS_MPU to ARM_V8R for Xen start address dependency.
    No matter Arm-v8r board has MPU or not, it always need to
    specify the start address.
---
v3:
1. Remove unrelated change of "CONFIG_FVP_BASER"
2. Change ARM_V8R to HAS_MPU for Xen start address dependency
---
  xen/arch/arm/Kconfig           | 8 ++++++++
  xen/arch/arm/platforms/Kconfig | 8 +++++---
  2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 70fdc2ba63..ff17345cdb 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -181,6 +181,14 @@ config TEE
           This option enables generic TEE mediators support. It allows guests
           to access real TEE via one of TEE mediators implemented in XEN.

+config XEN_START_ADDRESS
+       hex "Xen start address: keep default to use platform defined address"
+       default 0
+       depends on HAS_MPU
+       help
+         This option allows to set the customized address at which Xen will be
+         linked on MPU systems. This address must be aligned to a page size.
+
  source "arch/arm/tee/Kconfig"

  config STATIC_SHM
diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
index c93a6b2756..75af48b5f9 100644
--- a/xen/arch/arm/platforms/Kconfig
+++ b/xen/arch/arm/platforms/Kconfig
@@ -1,6 +1,7 @@
  choice
         prompt "Platform Support"
         default ALL_PLAT
+       default NO_PLAT if HAS_MPU

I am a bit concerned about this as we will be introducing R52 specific platform in xen/arch/arm/platforms/

(For eg https://github.com/Xilinx/xen/blob/xlnx_rebase_4.17/xen/arch/arm_mpu/platforms/amd-versal-net.c )

Thus, we will have to remove this line at that time.

Can you remove this line, please if it does not cause any issue ?

- Ayan

         ---help---
         Choose which hardware platform to enable in Xen.

@@ -8,13 +9,14 @@ choice

  config ALL_PLAT
         bool "All Platforms"
+       depends on !HAS_MPU
         ---help---
         Enable support for all available hardware platforms. It doesn't
         automatically select any of the related drivers.

  config QEMU
         bool "QEMU aarch virt machine support"
-       depends on ARM_64
+       depends on ARM_64 && !HAS_MPU
         select GICV3
         select HAS_PL011
         ---help---
@@ -23,7 +25,7 @@ config QEMU

  config RCAR3
         bool "Renesas RCar3 support"
-       depends on ARM_64
+       depends on ARM_64 && !HAS_MPU
         select HAS_SCIF
         select IPMMU_VMSA
         ---help---
@@ -31,7 +33,7 @@ config RCAR3

  config MPSOC
         bool "Xilinx Ultrascale+ MPSoC support"
-       depends on ARM_64
+       depends on ARM_64 && !HAS_MPU
         select HAS_CADENCE_UART
         select ARM_SMMU
         ---help---
--
2.25.1





 


Rackspace

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