(&mut self)
| 1075 | } |
| 1076 | |
| 1077 | pub(crate) fn enable_intx(&mut self) -> Result<(), VfioPciError> { |
| 1078 | if let Some(intx) = &mut self.interrupt.intx |
| 1079 | && !intx.enabled |
| 1080 | { |
| 1081 | if let Some(eventfd) = intx.interrupt_source_group.notifier(0) { |
| 1082 | self.vfio_wrapper |
| 1083 | .enable_irq(VFIO_PCI_INTX_IRQ_INDEX, vec![&eventfd]) |
| 1084 | .map_err(VfioPciError::EnableIntx)?; |
| 1085 | |
| 1086 | intx.enabled = true; |
| 1087 | } else { |
| 1088 | return Err(VfioPciError::MissingNotifier); |
| 1089 | } |
| 1090 | } |
| 1091 | |
| 1092 | Ok(()) |
| 1093 | } |
| 1094 | |
| 1095 | pub(crate) fn disable_intx(&mut self) { |
| 1096 | if let Some(intx) = &mut self.interrupt.intx |
no test coverage detected