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

Method state

pci/src/vfio.rs:1392–1413  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

1390 }
1391
1392 fn state(&self) -> VfioCommonState {
1393 let intx_state = self.interrupt.intx.as_ref().map(|intx| IntxState {
1394 enabled: intx.enabled,
1395 });
1396
1397 let msi_state = self.interrupt.msi.as_ref().map(|msi| MsiState {
1398 cap: msi.cfg.cap,
1399 cap_offset: msi.cap_offset,
1400 });
1401
1402 let msix_state = self.interrupt.msix.as_ref().map(|msix| MsixState {
1403 cap: msix.cap,
1404 cap_offset: msix.cap_offset,
1405 bdf: msix.bar.devid,
1406 });
1407
1408 VfioCommonState {
1409 intx_state,
1410 msi_state,
1411 msix_state,
1412 }
1413 }
1414
1415 fn set_state(
1416 &mut self,

Callers 1

snapshotMethod · 0.45

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected