https://sci-hub.se/10.1016/j.iot.2020.100238
https://www.researchgate.net/publication/341747201_Real-time_virtualization_with_Xvisor
Virtualization introduces an hierarchical scheduling structure with two levels. In order to schedule real-time tasks, both levels must support real-time scheduling. The physical CPU (PCPU) of the hardware platform is presented to the VMs as a VCPU. These VCPUs are scheduled by the hypervisor to be executed on the PCPUs. Each VM operating system includes a task scheduler that schedules the real-time workload on the VCPUs. (…)
In order to analyse such an hierarchical structure for schedulability, various analysis techniques exist. The common one is compositional schedulability analysis (CSA). Component-based design decomposes a system into components allowing the reduction of a single complex system design problem into multiple single system designs. Each component is analysed separately and represented by a component interface that abstracts and hides the internal complexity. These interfaces are used for composing the system for the system analysis.
Real-time systems can benefit from component-based design, if components are assembled without violating timing properties. This requires that the component interfaces include all the timing information.
(…)
Xvisor creates a set of run queues for each PCPU and assigns a VCPU statically to a PCPU. To enable global scheduling algorithms, a global structure is needed. We introduce a single set of run queues for all PCPUs. When a VCPU is added to a run queue, each PCPU can select it to execute. Besides sharing run queues in each PCPU, the PCPUs must share a synchronization object (spinlock) so that only a single PCPU at a time can make changes at the run queues.
(…)
In Xvisor-RT, the current VCPU is passed as an argument to the scheduling algorithm. This makes it possible to check if the current VCPU still has the highest priority, without having it in the run queue. If, after the scheduling decision, the current VCPU is not selected to be executed, the VCPU is added to the run queue again after the context switch.
(…)
Because of the above changes, the implementation of the current scheduling algorithm had to be replaced. We implemented the Earliest Deadline First (EDF) and the Deadline Monotonic (DM) algorithm, because they are rather straightforward to implement.

https://github.com/YorickDeBock/xvisor