mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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>
This commit is contained in:
parent
02a2cbc872
commit
e3d9c92507
2 changed files with 33 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue