x86/pt: enable binding of GSIs to a PVH Dom0
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 26 Jun 2017 09:47:13 +0000 (10:47 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 26 Jun 2017 13:32:46 +0000 (14:32 +0100)
commitfba004942682b1e24fc1a5bc70048a3a5a4ecc18
tree085b10408878776f5e9940c15f5b0e7de02d0f95
parentc2d9461920ee889940b64f315fc455b6ab36d555
x86/pt: enable binding of GSIs to a PVH Dom0

Achieve this by expanding pt_irq_create_bind in order to support
mapping interrupts of type PT_IRQ_TYPE_PCI to a PVH Dom0. GSIs bound
to Dom0 are always identity bound, which means the all the fields
inside of the u.pci sub-struct are ignored, and only the machine_irq
is actually used in order to determine which GSI the caller wants to
bind.

Also, the hvm_irq_dpci struct is not used by a PVH Dom0, since that's
used to route interrupts and allow different host to guest GSI
mappings, which is not used by a PVH Dom0.

This requires adding some specific handlers for such directly mapped
GSIs, which bypass the PCI interrupt routing done by Xen for HVM
guests.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/irq.c
xen/arch/x86/hvm/vioapic.c
xen/drivers/passthrough/io.c
xen/include/asm-x86/hvm/vioapic.h
xen/include/xen/hvm/irq.h