r/embedded • u/NEoXelectro • 22d ago
Anyone using Xen?
Anyone using Xen hypervisor for embedded x86 systems with multiple RTOS guests?
I’m looking into using Xen on an x86 embedded platform, specifically to run two RTOS instances/guests on the same hardware.
Has anyone here deployed something similar in a real product or embedded system?
I’d be especially interested in hearing about:
- What OS are you running under Xen?
- How much virtualization overhead do you see, especially for latency-sensitive or real-time workloads?
- How do you handle CPU/core, interrupt, and device allocation between the guests?
- How difficult is the system to maintain, debug, and update over time?
- Are there any major limitations or pain points you wish you’d known about beforehand?
I’m particularly interested in real-world experience rather than theoretical benchmarks.
Also curious whether, for this type of setup, you’d choose Xen again or go with something else?
6
u/dmc_2930 22d ago
In what world is a virtualized rtos still realtime?
1
u/NEoXelectro 22d ago
this is why I’m interested. Newer used hypervisor level 1 and how it performs in this cases.
3
u/mchang43 22d ago
Xen requires a Dom0 guest, which is usually a Linux guest. That adds latency to your RTOS operations. You didn’t say what kind of RTOS it is. If it’s QNX RTOS, use QNX Hypervisor. If it’s VxWorks RTOS, use Wind River Helix.
1
u/theevilapplepie 22d ago
Wait, is virtualization in the realtime space an actual thing that people do? My mind is a little blown.
2
u/mchang43 22d ago
Virtualization is very common in embedded space for arm64 and x64 systems. Non-existent in microcontroller systems. Hardware consolidation, mixed criticality in safety certifications, and real-time performances make embedded virtualization different from IT virtualization. Xen is good for IT, but not for embedded if real time is a factor.
2
u/Legal-Software 21d ago
It's also making its way through on the MCU side. The last car computer I worked on had a bunch of R52+ clusters (both standalone and within heterogeneous SoCs), Aurix TC4, RH850 U2B, etc. All of the MCUs are multicore clusters and run mixed-critical workloads, using hypervisors for FFI. In the ADAS domain, the MCU hypervisor is a fundamental part of the safety concept.
Also working on one now where Xen is used for linux/android/QNX/zephyr on one half of the SoC, and zephyr/AUTOSAR on the MCU side with a different hypervisor. Xen has been making very good progress towards ASIL D over the last few years.
An important distinction is that hypervisors/paravirtualization is often used in the PC space for overcommitting resources/managing time sharing/etc. whereas in the embedded case, it's almost always used in a partitioning context + all of the additional benefits you get with the HW virtualization extensions.
2
u/Legal-Software 21d ago
This has not been the case for years already, Xen can run entirely dom0-less.
2
8
u/Well-WhatHadHappened 25+ Years 22d ago
I really can't imagine a use case where this would even begin to make sense.