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

Method has_capabilities

pci/src/vfio.rs:915–918  ·  view source on GitHub ↗

Returns true, if the device claims to have a PCI capability list.

(&self)

Source from the content-addressed store, hash-verified

913
914 /// Returns true, if the device claims to have a PCI capability list.
915 fn has_capabilities(&self) -> bool {
916 let status = self.vfio_wrapper.read_config_word(PCI_CONFIG_STATUS_OFFSET);
917 status & PCI_CONFIG_STATUS_CAPABILITIES_LIST != 0
918 }
919
920 fn get_msix_cap_idx(&self) -> Option<usize> {
921 if !self.has_capabilities() {

Callers 2

get_msix_cap_idxMethod · 0.80
parse_capabilitiesMethod · 0.80

Calls 1

read_config_wordMethod · 0.80

Tested by

no test coverage detected