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

Method update_msi_capabilities

pci/src/vfio.rs:1178–1194  ·  view source on GitHub ↗
(&mut self, offset: u64, data: &[u8])

Source from the content-addressed store, hash-verified

1176 }
1177
1178 fn update_msi_capabilities(&mut self, offset: u64, data: &[u8]) -> Result<(), VfioPciError> {
1179 match self.interrupt.update_msi(offset, data) {
1180 Some(InterruptUpdateAction::EnableMsi) => {
1181 // Disable INTx before we can enable MSI
1182 self.disable_intx();
1183 self.enable_msi()?;
1184 }
1185 Some(InterruptUpdateAction::DisableMsi) => {
1186 // Fallback onto INTx when disabling MSI
1187 self.disable_msi();
1188 self.enable_intx()?;
1189 }
1190 _ => {}
1191 }
1192
1193 Ok(())
1194 }
1195
1196 fn update_msix_capabilities(&mut self, offset: u64, data: &[u8]) -> Result<(), VfioPciError> {
1197 match self.interrupt.update_msix(offset, data) {

Callers 1

write_config_registerMethod · 0.80

Calls 5

update_msiMethod · 0.80
disable_intxMethod · 0.80
enable_intxMethod · 0.80
enable_msiMethod · 0.45
disable_msiMethod · 0.45

Tested by

no test coverage detected