]> rtime.felk.cvut.cz Git - jailhouse.git/commit
x86: Virtualize IOAPIC redir table for interrupt remapping support
authorJan Kiszka <jan.kiszka@siemens.com>
Sat, 7 Jun 2014 12:26:34 +0000 (14:26 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Tue, 26 Aug 2014 17:56:37 +0000 (19:56 +0200)
commitf651754c72e31952d3ed100c51d37364bae737df
treec3f21c0ac56213b012a3250ceed61c415895e079
parente184275d8999b807f8fb0d2e8db5ab2476632c95
x86: Virtualize IOAPIC redir table for interrupt remapping support

Handover the IOAPIC on hypervisor setup by first masking all pins, then
requesting interrupt remapping from VT-d and finally reprogramming them
according to the index that VT-d reported. If vtd_map_interrupt returns
-ENOSYS, unconditionally right now due to a missing implementation,
later on when running in QEMU, we continue to write the redirection
table entry unmodified.

As we may lose edge-triggered interrupts while they are makes, we inject
them unconditionally into the target CPU. This may cause one spurious
interrupt per handover to/from the hypervisor, but Linux can deal with
that.

Whenever a cell is added or removed, we rewrite all root cell IOAPIC
redir table entries in order to validate them regarding the target CPU
masks.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/control.c
hypervisor/arch/x86/include/asm/cell.h
hypervisor/arch/x86/include/asm/ioapic.h
hypervisor/arch/x86/ioapic.c