(
&mut self,
msix_cap: MsixCap,
cap_offset: u32,
bdf: PciBdf,
state: Option<MsixConfigState>,
)
| 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()) |
no test coverage detected