MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / initialize_msi

Method initialize_msi

pci/src/vfio.rs:896–912  ·  view source on GitHub ↗
(&mut self, msg_ctl: u16, cap_offset: u32, state: Option<MsiConfigState>)

Source from the content-addressed store, hash-verified

894 }
895
896 fn initialize_msi(&mut self, msg_ctl: u16, cap_offset: u32, state: Option<MsiConfigState>) {
897 let interrupt_source_group = self
898 .msi_interrupt_manager
899 .create_group(MsiIrqGroupConfig {
900 base: 0,
901 count: msi_num_enabled_vectors(msg_ctl) as InterruptIndex,
902 })
903 .unwrap();
904
905 let msi_config = MsiConfig::new(msg_ctl, interrupt_source_group.clone(), state).unwrap();
906
907 self.interrupt.msi = Some(VfioMsi {
908 cfg: msi_config,
909 cap_offset,
910 interrupt_source_group,
911 });
912 }
913
914 /// Returns true, if the device claims to have a PCI capability list.
915 fn has_capabilities(&self) -> bool {

Callers 2

parse_capabilitiesMethod · 0.80
set_stateMethod · 0.80

Calls 4

msi_num_enabled_vectorsFunction · 0.85
newFunction · 0.85
create_groupMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected