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

Function msi_num_enabled_vectors

pci/src/msi.rs:31–39  ·  view source on GitHub ↗
(msg_ctl: u16)

Source from the content-addressed store, hash-verified

29const MSI_MSG_ADDR_LO_MASK: u32 = 0xffff_fffc;
30
31pub fn msi_num_enabled_vectors(msg_ctl: u16) -> usize {
32 let field = (msg_ctl >> 4) & 0x7;
33
34 if field > 5 {
35 return 0;
36 }
37
38 1 << field
39}
40
41#[derive(Error, Debug)]
42pub enum Error {

Callers 2

initialize_msiMethod · 0.85
num_enabled_vectorsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected