diff options
| author | Peter Xu | 2016-07-14 07:56:27 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin | 2016-07-21 19:43:49 +0200 |
| commit | e3d9c92507df61608896a579b5b0d7c218d5353e (patch) | |
| tree | 37f29b66021982aa44ee0b0ce8da96571b58e999 /include | |
| parent | x86-iommu: introduce IEC notifiers (diff) | |
| download | qemu-e3d9c92507df61608896a579b5b0d7c218d5353e.tar.gz qemu-e3d9c92507df61608896a579b5b0d7c218d5353e.tar.xz qemu-e3d9c92507df61608896a579b5b0d7c218d5353e.zip | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/i386/ioapic_internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_internal.h index 5c901ae78f..d89ea1b63b 100644 --- a/include/hw/i386/ioapic_internal.h +++ b/include/hw/i386/ioapic_internal.h @@ -25,6 +25,7 @@ #include "hw/hw.h" #include "exec/memory.h" #include "hw/sysbus.h" +#include "qemu/notify.h" #define MAX_IOAPICS 1 @@ -107,6 +108,7 @@ struct IOAPICCommonState { uint8_t ioregsel; uint32_t irr; uint64_t ioredtbl[IOAPIC_NUM_PINS]; + Notifier machine_done; }; void ioapic_reset_common(DeviceState *dev); |
