interrupt: Add a notifier method to the InterruptController

Both GIC and IOAPIC must implement a new method notifier() in order to
provide the caller with an EventFd corresponding to the IRQ it refers
to.

This is needed in anticipation for supporting INTx with VFIO PCI
devices.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2021-02-09 08:28:24 +01:00
committed by Rob Bradford
parent acfbee5b7a
commit 3bd47ffdc1
6 changed files with 20 additions and 5 deletions

View File

@@ -169,11 +169,7 @@ pub trait InterruptSourceGroup: Send + Sync {
/// to inject interrupts into a guest, by writing to the file returned
/// by this method.
#[allow(unused_variables)]
fn notifier(&self, index: InterruptIndex) -> Option<EventFd> {
// One use case of the notifier is to implement vhost user backends.
// For all other implementations we can just return None here.
None
}
fn notifier(&self, index: InterruptIndex) -> Option<EventFd>;
/// Update the interrupt source group configuration.
///