Virtualization on Microcontrollers: Page 5 of 6

October 15, 2018 //By Stefaan Sonck Thiebaut, OpenSynergy
Virtualization on Microcontrollers
Embedded virtualization is a key technology for the future of automotive. Virtualization makes it possible to allocate the resources of a processor to multiple safely separated applications and operating systems. This is an effective approach to redesign the vehicle electronics architecture, take full advantage of the performance of processors and address the growing complexity of software-defined functions.

If multiple virtual machines share a physical core, the hypervisor uses real-time scheduling policies to switch between virtual machines. The virtual machines’ view of CPU time on a physical core is provided by a virtual CPU (vCPU). The vCPU is used by the real-time operating system running in the virtual machine to schedule tasks. Thus, a 2-level scheduling mechanism is implemented. The hypervisor ensures that each virtual machine gets the configured amount of CPU time, while the RTOS scheduler assigns the provided CPU time to tasks based on their priorities.

Fig. 3: The vCPU is used by the real-time operating system
running in the virtual machine to schedule tasks.

Another important aspect for temporal separation is the management of interrupts. In most cases, the hypervisor assigns interrupts to specific virtual machines that use the corresponding devices. The hypervisor may also have to handle some interrupts at first and then notify the virtual machines, for example if multiple virtual machines share a physical core. The hypervisor may also have to take special care when virtual machines use hardware semaphores, in order to avoid conflicts between virtual machines.

The ARMv8-R architecture supports an additional privilege level for the hypervisor as well as virtualization of core timers. This makes implementation of 2-level schedulers easier. Moreover, the ARM Generic Interrupt Controller (GIC) has support for virtualization as well, allowing the hypervisor to directly route interrupts to virtual machines as well as virtualize interrupts. ARM virtualization extensions also make context switching between virtual machines easier.

In addition, the hypervisor must provide means for efficient and safe communication between virtual machines. The hypervisor may encapsulate the complete communication mechanisms, which is conceptually similar to the Inter-OS-Application Communicator (IOC) from AUTOSAR. Alternatively, the hypervisor may provide only the basic mechanisms needed to set up a communication channel to virtual machines: shared memory and, optionally, a notification mechanism between the virtual machines. In this case, the virtual machines execute the appropriate communication mechanisms.

Design category: 

Vous êtes certain ?

Si vous désactivez les cookies, vous ne pouvez plus naviguer sur le site.

Vous allez être rediriger vers Google.