We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Heart ticking for a guest running on FreeBSD ARM hypervisor

Formal Metadata

Title
Heart ticking for a guest running on FreeBSD ARM hypervisor
Title of Series
Number of Parts
34
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Interrupts are used in modern systems to signal events that require immediate action. Current CPUs implement interrupts using some type of controller circuit. As such, the ARM architecture uses a system called Generic Interrupt Controller to manage interrupts. In order for virtualization to be possible on ARM hardware, a Virtual Generic Interrupt Controller needs to be present to manage interrupts for guest operating systems. This research project describes implementing such a system for an ARMv7 processor running the FreeBSD hypervisor - bhyve. Also to have a fully reponsive guest, we present the timer virtualization implementation. In the past, handling of external events - such as keyboard input - was done by polling the respective device in order to check whether any processing was required. This method was inefficient due to the difficulty of balancing the promptness of responding to an event versus the time spent in polling. Furthermore, the method did not scale well with the number of sources of possible events. The alternative developed in order to overcome these shortcomings consists of using an interrupt system. In such a system, an interrupt controller is connected to both the CPU and any devices that may generate events that require handling by the operating system. Whenever such an event occurs, the interrupt controller signals the CPU that an interrupt has occurred and sends a number which identifies the interrupt. In response, the processor saves the current execution state and jumps to the interrupt handler associated to the identifier it has received. Actual implementation details depend on hardware. However, all platforms use some type of interrupt controller in order to manage interrupts. Intel processors use an interrupt controller known as Advanced Programmable Interrupt Controller (APIC). ARM uses a different system, called Generic Interrupt Controller, which is further discussed in this paper. Timed events are a core element of many software systems. Their utility ranges from pre-empting processes while in kernel space to scheduling events in high level programming in user space. It is clear that these types of functionality are also desirable when running software in a virtualized environment. The need for keeping time has brought about the introduction of new timer hardware, such as the Programmable Interval Timer(PIT), the Real Time Clock(RTC), the Advanced Configuration and Power Interface(ACPI) and the High Precision Event Timer(HPET), each with their own utility.