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

Method initialize_msix

pci/src/vfio.rs:861–890  ·  view source on GitHub ↗
(
        &mut self,
        msix_cap: MsixCap,
        cap_offset: u32,
        bdf: PciBdf,
        state: Option<MsixConfigState>,
    )

Source from the content-addressed store, hash-verified

859 }
860
861 fn initialize_msix(
862 &mut self,
863 msix_cap: MsixCap,
864 cap_offset: u32,
865 bdf: PciBdf,
866 state: Option<MsixConfigState>,
867 ) {
868 let interrupt_source_group = self
869 .msi_interrupt_manager
870 .create_group(MsiIrqGroupConfig {
871 base: 0,
872 count: msix_cap.table_size() as InterruptIndex,
873 })
874 .unwrap();
875
876 let msix_config = MsixConfig::new(
877 msix_cap.table_size(),
878 MaybeMutInterruptSourceGroup::Immutable(interrupt_source_group.clone()),
879 bdf.into(),
880 state,
881 )
882 .unwrap();
883
884 self.interrupt.msix = Some(VfioMsix {
885 bar: msix_config,
886 cap: msix_cap,
887 cap_offset,
888 interrupt_source_group,
889 });
890 }
891
892 fn parse_msi_capabilities(&mut self, cap: u8) -> u16 {
893 self.vfio_wrapper.read_config_word((cap + 2).into())

Callers 2

parse_capabilitiesMethod · 0.80
set_stateMethod · 0.80

Calls 4

newFunction · 0.85
create_groupMethod · 0.80
table_sizeMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected