zephyr/drivers
Gustavo Lima Chaves 9bb07ff69a jailhouse: add support for x2APIC mode for all LOAPIC accesses
Besides the fact that we did not have that for the current supported
boards, that makes sense for this new, virtualized mode, that is meant
to be run on top of full-fledged x86 64 CPUs.

By having xAPIC mode access only, Jailhouse has to intercept those MMIO
reads and writes, in order to examine what they do and arbitrate if it's
safe or not (e.g. not all values are accepted to ICR register). This
means that we can't run away from having a VM-exit event for each and
every access to APIC memory region and this impacts the latency the
guest OS observes over bare metal a lot.

When in x2APIC mode, Jailhouse does not require VM-exits for MSR
accesses other that writes to the ICR register, so the latency the guest
observes is reduced to almost zero.

Here are some outputs of the the command line

  $ sudo ./tools/jailhouse cell stats tiny-demo

on a Jailhouse's root cell console, for one of the Zephyr demos using
LOAPIC timers, left for a couple of seconds:

Statistics for tiny-demo cell (x2APIC root, x2APIC inmate)

COUNTER                              SUM   PER SEC
vmexits_total                          7         0
vmexits_management                     3         0
vmexits_cr                             2         0
vmexits_cpuid                          1         0
vmexits_msr                            1         0
vmexits_exception                      0         0
vmexits_hypercall                      0         0
vmexits_mmio                           0         0
vmexits_pio                            0         0
vmexits_xapic                          0         0
vmexits_xsetbv                         0         0

Statistics for tiny-demo cell (xAPIC root, xAPIC inmate)

COUNTER                              SUM   PER SEC
vmexits_total                       4087        40
vmexits_xapic                       4080        40
vmexits_management                     3         0
vmexits_cr                             2         0
vmexits_cpuid                          1         0
vmexits_msr                            1         0
vmexits_exception                      0         0
vmexits_hypercall                      0         0
vmexits_mmio                           0         0
vmexits_pio                            0         0
vmexits_xsetbv                         0         0

Statistics for tiny-demo cell (xAPIC root, x2APIC inmate)

COUNTER                              SUM   PER SEC
vmexits_total                       4087        40
vmexits_msr                         4080        40
vmexits_management                     3         0
vmexits_cr                             2         0
vmexits_cpuid                          1         0
vmexits_exception                      0         0
vmexits_hypercall                      0         0
vmexits_mmio                           0         0
vmexits_pio                            0         0
vmexits_xapic                          0         0
vmexits_xsetbv                         0         0

See that under x2APIC mode on both Jailhouse/root-cell and guest, the
interruptions from the hypervisor are minimal. That is not the case when
Jailhouse is on xAPIC mode, though. Note also that, as a plus, x2APIC
accesses on the guest will map to xAPIC MMIO on the hypervisor just
fine.

Signed-off-by: Gustavo Lima Chaves <gustavo.lima.chaves@intel.com>
2017-11-07 08:58:49 -05:00
..
adc drivers: adc: add system call handlers 2017-10-30 13:20:19 -07:00
aio drivers: fix handler filenames 2017-10-31 12:51:22 -07:00
bluetooth drivers/bluetooth/spi: Do not initialize vendor attribute 2017-10-10 09:42:45 -04:00
clock_control drivers: clock_control: provide support for stm32f0. 2017-10-23 12:31:47 +02:00
console net: Fix LLVM compiler warnings 2017-08-09 12:50:50 -04:00
counter drivers: counter: add syscall handlers 2017-10-30 13:20:19 -07:00
crc drivers: crc: Add 'pad' parameter to crc16() 2017-08-17 22:19:19 -04:00
crypto drivers: crypto: Fix the scope of ataes132a crypto_driver_api functions 2017-11-03 14:27:41 -04:00
display drivers/display: mb_display: Fix struct member alignment 2017-08-09 12:23:28 -04:00
dma drivers: dma: remove deprecated API functions 2017-09-22 07:50:20 -04:00
entropy drivers: entropy: Only show STM32 entropy driver on if applicable 2017-11-01 08:26:29 -04:00
ethernet drivers: Rename random to entropy 2017-11-01 08:26:29 -04:00
flash drivers: fix handler filenames 2017-10-31 12:51:22 -07:00
gpio gpio: Add APIs for enabling/Disabling GPIOTE interrupts for nrf52 SOC. 2017-11-06 09:29:10 -05:00
grove spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
i2c i2c: fix issue of stm32-i2c-v2 (F0/F3/F7) driver hanging in endless loop 2017-11-03 13:52:57 -05:00
i2s drivers: Add I2S (Inter-IC Sound) driver infrastructure 2017-08-14 11:14:34 -04:00
ieee802154 subsys: Add random subsystem 2017-11-01 08:26:29 -04:00
interrupt_controller jailhouse: add support for x2APIC mode for all LOAPIC accesses 2017-11-07 08:58:49 -05:00
ipm drivers: ipm: add system calls 2017-10-30 13:20:19 -07:00
led_strip drivers: led_strip: add WS2812-ish driver 2017-10-28 13:23:30 -04:00
net net: fix the build rules for drivers/net. 2017-11-06 10:24:05 +02:00
pci linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
pinmux boards: move pinmux driver to board/soc dir 2017-10-31 12:32:34 -04:00
pwm drivers: pwm: add system call handlers 2017-10-30 13:20:19 -07:00
rtc drivers: rtc: add system calls 2017-10-30 13:20:19 -07:00
sensor sensors: hts221: provide name to Kconfig choice 2017-11-03 13:52:57 -05:00
serial drivers: serial: provide support for stm32f091 2017-11-06 11:39:16 -06:00
shared_irq spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
spi drivers: spi: add system call handlers 2017-10-30 13:20:19 -07:00
timer jailhouse: add support for x2APIC mode for all LOAPIC accesses 2017-11-07 08:58:49 -05:00
usb usb: dw: Add sleep before FIFO flash 2017-10-28 14:38:19 -04:00
watchdog iwdg: make independent watchdog driver compliant with STM32Cube LL API 2017-10-23 09:51:16 +02:00
Kconfig drivers: Rename random to entropy 2017-11-01 08:26:29 -04:00
Makefile drivers: Rename random to entropy 2017-11-01 08:26:29 -04:00