(&mut self)
| 1155 | } |
| 1156 | |
| 1157 | fn initialize_legacy_interrupt(&mut self) -> Result<(), VfioPciError> { |
| 1158 | if let Some(irq_info) = self.vfio_wrapper.get_irq_info(VFIO_PCI_INTX_IRQ_INDEX) |
| 1159 | && irq_info.count == 0 |
| 1160 | { |
| 1161 | // A count of 0 means the INTx IRQ is not supported, therefore |
| 1162 | // it shouldn't be initialized. |
| 1163 | return Ok(()); |
| 1164 | } |
| 1165 | |
| 1166 | if let Some(interrupt_source_group) = self.legacy_interrupt_group.clone() { |
| 1167 | self.interrupt.intx = Some(VfioIntx { |
| 1168 | interrupt_source_group, |
| 1169 | enabled: false, |
| 1170 | }); |
| 1171 | |
| 1172 | self.enable_intx()?; |
| 1173 | } |
| 1174 | |
| 1175 | Ok(()) |
| 1176 | } |
| 1177 | |
| 1178 | fn update_msi_capabilities(&mut self, offset: u64, data: &[u8]) -> Result<(), VfioPciError> { |
| 1179 | match self.interrupt.update_msi(offset, data) { |
no test coverage detected