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

Method new

pci/src/bus.rs:66–86  ·  view source on GitHub ↗

Create an empty PCI root bridge.

(config: Option<PciConfiguration>)

Source from the content-addressed store, hash-verified

64impl PciRoot {
65 /// Create an empty PCI root bridge.
66 pub fn new(config: Option<PciConfiguration>) -> Self {
67 if let Some(config) = config {
68 PciRoot { config }
69 } else {
70 PciRoot {
71 config: PciConfiguration::new(
72 VENDOR_ID_INTEL,
73 DEVICE_ID_INTEL_VIRT_PCIE_HOST,
74 0,
75 PciClassCode::BridgeDevice,
76 &PciBridgeSubclass::HostBridge,
77 None,
78 PciHeaderType::Device,
79 0,
80 0,
81 None,
82 None,
83 ),
84 }
85 }
86 }
87}
88
89impl BusDevice for PciRoot {}

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected