]> rtime.felk.cvut.cz Git - jailhouse.git/commit
core: Add generic MMIO access dispatching
authorJan Kiszka <jan.kiszka@siemens.com>
Wed, 5 Aug 2015 07:19:08 +0000 (09:19 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Fri, 14 Aug 2015 06:17:40 +0000 (08:17 +0200)
commit0993685e882f5767290d9712e898e019003de6b9
tree558c36241eae1489703eebace9bad6108f304012
parent712f7678137571eac2298270da6e9a060cdff88f
core: Add generic MMIO access dispatching

This introduces the infrastructure for generically dispatching MMIO
accesses. Handlers can now be registered for MMIO regions on a pre-cell
basis, removing the need for probing multiple handlers that decide
themselves if they are in charge.

The backing data structures consist of two sorted tables: one is
describing the region locations and sizes, the other one is holding, in
identical order, the handler and a corresponding opaque parameter.

Dispatching works lock-free and can even run in parallel with region
registration or removal. That latter two steps are protected against
concurrent invocation via a per-cell spinlock.

In order to preallocate sufficient space during cell setup, arch
architecture has to implement arch_mmio_count_regions that calculates
the maximum number of MMIO regions a cell may register during its
lifetime, typically based on static values and the cell configuration.
So far these functions are implemented as dummies because the MMIO
infrastructure is not yet used.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/Makefile
hypervisor/arch/arm/mmio.c
hypervisor/arch/x86/mmio.c
hypervisor/control.c
hypervisor/include/jailhouse/cell.h
hypervisor/include/jailhouse/mmio.h
hypervisor/mmio.c [new file with mode: 0644]