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

Re: Xen portability


  • To: "FIXED-TERM Klintefjord Boris (XC-CP/ENG3-SE)" <fixed-term.Boris.Klintefjord@xxxxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Mon, 5 Feb 2024 15:34:28 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=tfBt7dY+8fw9zlhTKZauO1Hg3Ty+hjr9qS1KLQkAKHo=; b=CI504fPNMR/Rdm47YQ+X1HH9p+rz01g7m5Tmn6PBf45LYDyvO4IMpb4MusjOV3B2BXh6u+nPSahEI60GJoP7tv3IzJO3r/kphC9HfW54/91uch5Ws/EUqqOt6w8afbT48ty7YIxcGurWnqN04BSJETHpvRp9ywhcjB7i3ympbU940NNN5NWUuOXoV1GJT3aFnKMzZVQHVUe/WS//CyEN00QmX3rsaQwAk/OuzHIzLiDKjObLJpbcFnJ0CsD9wb6Tza9XxeUBNFy6iVLSQC2hP1l8VNxF/tOu2EYlgvQQMatc/U7wNTXhSYsMLL/mb0coZT3tyycXcgqeF4G0Y6R4LA==
  • 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=tfBt7dY+8fw9zlhTKZauO1Hg3Ty+hjr9qS1KLQkAKHo=; b=MrlfrF8BuLw0O/YH4v8N1cCCzls17/pf/hNe8vC7iviOj7mG0rN/RN7xIZ7Zb8tlmx3HuhgYXy53bemyiBqyrsUns9L5iddXIvUmw54CM72/RnYr5A2aFMRwZV991PUvk/0mLF90aS2WSr8BAvJaemyuQWg4lgjFX0d7BFi8oUNkxQsiUtKHt5L7yutH0cb/rtHxSiPSAIijFZemBDAm+lEL0cnCW+3bCZrKInLq5RFGkezFSL2o6Ns57NwFZJhsuXXVPbX8YLf0xhkswfaQIv7V7Dtqnavfw/XZOy4L429I0vHZ7V3dfyEqp9+nX09u0+qldNFmvtSvaISKVUdSVQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=e3VAjgCKEyyQBi4KFFgiSPtD1RIAp5fa9wOlCKGYlhGa+24crZD0K2/SIIhJox7XqgFf0SXm0AQWwr7Wom0Sg4sYdxSgzTvc/KZqfuea/UQNKOM+dX182MtJEoNxMQfjTysn3DZfBL1xxn+l/sUcOMGE7KhKrpG8F/22Pjri+gDht51P3deSpwtGVwSWo5hC77jLkOnW+fUF732Fn6m0PuEdDkSFgkEqLQ+Os+HvTCVZCnV/DFrSUxnI5zu9iwwgmUG6g7vu8qQJzC4qePkfLxXpr0vkzrQSPJCZYGY/tZpDMPRbYowRdmD6x7dXUD4lw1/FxwTYxrIWNc7zZW5SwA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VOruAe37cYc33Aj/HM4DL8DWjUBFfjFJO8VKE++97GKcxCqOzZ3fBl2g54IjKWxj63VqhfXYxIT/qRnEIdZBTcHrSN/YFU0hTJNaFnsz0lHBa38AnsYkbsBnxNnswZy3CNr8XqceT7Je9wN37hfR4E38d8g8Za4E4WugX4DoDBHCDuWVtlfNxfUp/GcnlSDUg+cTakbp7d002NJ4vwSfCeGVAalK/ZqxiytEQcDMfTwsh1u8GXscXeOcLgdE30epvEyayFOJp+jbLstWpwYOseLtpDyK7ImI/QNfVO6gzrpC8Yc/lFymyrT8MX2lGVCb0idmEviWJ2kcrDqUqsNxyg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-users@xxxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Mon, 05 Feb 2024 15:35:24 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AdpVq0jon7PSIKU2SvmaVRoznDrctgCnX9AA
  • Thread-topic: Xen portability

Hi Boris,

> On 2 Feb 2024, at 13:32, FIXED-TERM Klintefjord Boris (XC-CP/ENG3-SE) 
> <fixed-term.Boris.Klintefjord@xxxxxxxxxxxx> wrote:
> 
> Hi Xen community,
> 
> I have a somewhat generic question about portability on Arm platforms.
> 
> I have been testing Xen on Armv8 using QEMU (with Linux as Dom0 and
> also using OP-TEE), and it works fine. I then started to investigate
> how portable Xen is among Arm platforms. According to the Xen wiki[1]
> there are not many requirements on the hardware to get Xen to work (it
> states that Xen only uses the GIC, generic timers, SMMU and a UART)
> assuming one already has a functioning Linux with an appropriate DTB
> (device tree).
> 
> On another Xen wiki page[2] I further get the impression that adding
> Xen should be easy once Linux is up and running. The same page also
> lists a number of platforms where Xen has been tested.
> 
> So my main question is, does that mean that I can expect Xen to work
> with low effort on most Arm devices where I already have a functioning
> Linux environment and Xen-compatible hardware (GIC, timers, SMMU,
> UART)?

yes most devices do not need any changes to have Xen working but
sometime a new uart driver can be needed or some adaptations might
be required to provide access to non standard firmware functionalities
required by dom0 (usually something to let pass some firmware calls
from dom0 to set or configure clocks or voltages).

> 
> The reason for my doubt is that, I more or less arbitrarily started
> looking at the NXP i.MX8MQ evaluation board. It has a DTB in Linux
> mainline (arch/arm64/boot/dts/freescale/imx8mq-evk.dts), and it seems
> to have a GICv3-compliant GIC which Xen supports. I do not know much
> about timers, but the DTB states it has timers with compatible
> "arm,armv8-timer" which sounds quite generic. I have not found
> anything about SMMU and I probably need some UART driver, but it seems
> manageable. However, NXP themselves say that they do not support Xen on
> that board, but has support for the i.MX8QM board. They have their own
> clone of the Xen git[3] for that board. When looking at that git, I see
> that they have done quite a bit of changes to the Xen code, and a lot
> of additions in form of new drivers. That gives me the impression that
> it is not at all so easy to get Xen to work on any board, contrary to
> the impression I got from the Xen wiki pages.

I think NXP is currently upstreaming some changes required for some
of their I.MX8 platforms and those are definitely limited to the parts I
mentioned before.
The tree you are pointing seem to be based on xen 4.10 which is quite
old.

> 
> So I want to get a feeling for how much effort is usually required to
> get Xen up and running on a new platform. Anyone who has some
> experience with this, and what the most important things to look for
> are when considering the suitability of a platform for Xen?

It is hard to say because we cannot forsee all possible adaptations
that could be required but if you look at usual platforms (arm GIC and
timers), the changes are around UART (when not using something
already supported by Xen), firmware calls and SMMU (if needed as
depending on the use case, xen not supporting it and it being handled
directly in dom0 is possible).

As far as we know no platform required changes in other parts of Xen.

Regards
Bertrand

> 
> [1] 
> https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions_whitepaper#Porting_Xen_to_a_new_SoC
> [2] https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions
> [3] https://github.com/nxp-imx/imx-xen




  • References:

 


Rackspace

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