]> rtime.felk.cvut.cz Git - jailhouse.git/commit
core: Rework PCI config space access handling
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 21 Jul 2014 18:22:08 +0000 (20:22 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sat, 26 Jul 2014 11:00:12 +0000 (13:00 +0200)
commitfc99f7c479c3bf659e5e6985f50884f60a54e07d
treeed28bc464c2c759a1584adf54d157795321aed5d
parente616cbe914bbb1d264d877ec69040d559cef6b97
core: Rework PCI config space access handling

Move more logic into generic code by extending the write handler to
pci_cfg_write_moderate and introducing pci_cfg_read_moderate. These
handlers are responsible for any config space access, including to
unowned or non-existent devices. They can reject the access, return an
emulated value on read or a real value to be written to hardware, or
they instruct the caller to perform the access directly.

We already pass a reference to the issuing cell to the access handlers.
It stays unused for now but will be needed by succeeding changes. So
add it now to avoid changing API and callers once again later on.

This commit lays the foundation for capability access moderation and,
specifically, MSI/MSI-X emulation.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/pci.c
hypervisor/include/jailhouse/pci.h
hypervisor/pci.c