mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-device, pci, devices: Remove InterruptSourceGroup::{un}mask
The calls to these functions are always preceded by a call to InterruptSourceGroup::update(). By adding a masked boolean to that function call it possible to remove 50% of the calls to the KVM_SET_GSI_ROUTING ioctl as the the update will correctly handle the masked or unmasked case. This causes the ioctl to disappear from the perf report for a boot of the VM. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -178,19 +178,11 @@ pub trait InterruptSourceGroup: Send + Sync {
|
||||
/// # Arguments
|
||||
/// * index: sub-index into the group.
|
||||
/// * config: configuration data for the interrupt source.
|
||||
fn update(&self, index: InterruptIndex, config: InterruptSourceConfig) -> Result<()>;
|
||||
|
||||
/// Mask an interrupt from this interrupt source.
|
||||
fn mask(&self, _index: InterruptIndex) -> Result<()> {
|
||||
// Not all interrupt sources can be disabled.
|
||||
// To accommodate this, we can have a no-op here.
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Unmask an interrupt from this interrupt source.
|
||||
fn unmask(&self, _index: InterruptIndex) -> Result<()> {
|
||||
// Not all interrupt sources can be disabled.
|
||||
// To accommodate this, we can have a no-op here.
|
||||
Ok(())
|
||||
}
|
||||
/// * masked: if the interrupt is masked
|
||||
fn update(
|
||||
&self,
|
||||
index: InterruptIndex,
|
||||
config: InterruptSourceConfig,
|
||||
masked: bool,
|
||||
) -> Result<()>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user