Looking closer, I am not sure the comments I saw on the Linaro project are relevant. The Linaro Stratos project is about making virtio work on multiple hypervisors including Xen. When I saw the comments below I therefore assumed they were about virtio. Looking more closely the developer seems to be using Xen native APIs and not virtio.
Here are the Zephyr PR he mentions in the text body: https://github.com/zephyrproject-rtos/zephyr/pull/36691 https://github.com/zephyrproject-rtos/zephyr/pull/39960
His comments on Stratos project issue: ********************************************* Currently I am working on Xen support in Zephyr (main goal now is to start Zephyr as Dom0 and create 1 Zephyr guest).
During development I am trying to upstream some features to Zephyr mainline. Currently I have 1 merged pull-request and 1 is now on review. Merged PR contains:
Some of Xen public headers, which were placed in Zephyr tree (include/xen/public/);
Hypercall interface to Xen for arm64 (arch/arm64/core/xen);
PV console driver for DomUs. It is implemented as UART driver, but works with console ring-buffer instead of real hardware. Such solution was made because Zephyr has lot of good features for UART drivers (UART logging backend, shell backend, console with symbol processing stuff etc.). Also this driver can set up consoleio hooks for printk and stdout. It allows to receive boot logs ASAP after start with debug version of hypervisor (very helpful for boot debug).
PR, that is on review contains:
Support for Xen Enlighten page.
Support for pre-defined event-channels (PV console, XenBus).
UART PV console driver improvement - now it is interrupt driven through the console event channel.
Dom0 console driver. It is also UART-like, but works with consoleio hypercalls for input and output (which are always available only for Dom0), instead of console ring-buffer.
Also some other features are now under development: grant tables, XenBus and starting Zephyr as Domain-0. They are present on my github, but currently are not ready for review or upstream.
Current status for these features:
Grant tables: taken from Unikraft, ported to Zephyr code base and tested. Works, but currently is not finished yet. Planned to push it as next PR to Zephyr repo.
XenBus: also taken from Unikraft, cleaned-up and ported to Zephyr. Tested: able to list directories, write and read from files in Xenstore. Driver registration on bus was not tested due to lack of any backend drivers, but Zephyr uses fully static configuration, so this should not be a problem.
Zephyr Domain-0: currently I am working on this PoC and successfully started simple sample (samples/subsys/shell/shell_module) with Dom0 console driver on R-Car Gen3 hardware. It looks a little bit hacky due to static configuration in Zephyr (it does not use device tree in runtime, so we need to know Dom0 and GIC location on compile time to build and link with right addresses), but I think it is OK for PoC.
Lot of problems during development are caused by the licensing - Zephyr is licensed under Apache-2.0, so I can not use GPL-2.0 code in there. Also when I am trying to use MIT code from Xen (public headers) or Unikraft (Xenbus and grant table drivers) it causes long Zephyr TSC negotiation to take MIT code inside the Zephyr tree. So It may take some time to add suitable Xen support in Zephyr upstream.
But I will continue PoC development and share some of the updates here. Please, contact me if you need any other details.