ioapic: register IOMMU IEC notifier for ioapic
commite3d9c92507df61608896a579b5b0d7c218d5353e
authorPeter Xu <peterx@redhat.com>
Thu, 14 Jul 2016 05:56:27 +0000 (14 13:56 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 21 Jul 2016 17:43:49 +0000 (21 20:43 +0300)
tree37f29b66021982aa44ee0b0ce8da96571b58e999
parent02a2cbc872df99205eeafd399f01c210e0b797c4
ioapic: register IOMMU IEC notifier for ioapic

Let IOAPIC the first consumer of x86 IOMMU IEC invalidation
notifiers. This is only used for split irqchip case, when vIOMMU
receives IR invalidation requests, IOAPIC will be notified to update
kernel irq routes. For simplicity, we just update all IOAPIC routes,
even if the invalidated entries are not IOAPIC ones.

Since now we are creating IOMMUs using "-device" parameter, IOMMU
device will be created after IOAPIC.  We need to do the registration
after machine done by leveraging machine_done notifier.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/intc/ioapic.c
include/hw/i386/ioapic_internal.h