mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Add set_notifier() method to VirtioInterrupt
It is currently left as unimplemented!(). No functional change intended as there are no callers. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
0f7dc514ba
commit
e1c40211ae
@@ -17,6 +17,7 @@ block = { path = "../block" }
|
||||
byteorder = { workspace = true }
|
||||
epoll = { workspace = true }
|
||||
event_monitor = { path = "../event_monitor" }
|
||||
hypervisor = { path = "../hypervisor" }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
mshv-ioctls = { workspace = true, optional = true }
|
||||
|
||||
@@ -37,6 +37,12 @@ pub trait VirtioInterrupt: Send + Sync {
|
||||
fn notifier(&self, _int_type: VirtioInterruptType) -> Option<EventFd> {
|
||||
None
|
||||
}
|
||||
fn set_notifier(
|
||||
&self,
|
||||
int_type: u32,
|
||||
notifier: Option<EventFd>,
|
||||
vm: &dyn hypervisor::Vm,
|
||||
) -> std::io::Result<()>;
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
@@ -914,6 +914,15 @@ impl VirtioInterrupt for VirtioInterruptMsix {
|
||||
self.interrupt_source_group
|
||||
.notifier(vector as InterruptIndex)
|
||||
}
|
||||
|
||||
fn set_notifier(
|
||||
&self,
|
||||
_interrupt: u32,
|
||||
_eventfd: Option<EventFd>,
|
||||
_vm: &dyn hypervisor::Vm,
|
||||
) -> std::io::Result<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
impl PciDevice for VirtioPciDevice {
|
||||
|
||||
@@ -188,6 +188,15 @@ pub mod unit_tests {
|
||||
) -> std::result::Result<(), std::io::Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn set_notifier(
|
||||
&self,
|
||||
_interrupt: u32,
|
||||
_eventfd: Option<EventFd>,
|
||||
_vm: &dyn hypervisor::Vm,
|
||||
) -> std::io::Result<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TestBackend {
|
||||
|
||||
Reference in New Issue
Block a user