pub(crate) fn init_virtio_dev(
dev: Device,
dev_type: VirtIODeviceType,
) -> Option<(u8, VirtIOPCIDevice)>
Expand description
Initializes a Virtio transport driver for the given PCI device.
Disables MSI/MSI-X interrupts for the device since the x86_q35 chip uses the 8259 PIC for interrupt management.
On success, returns a tuple containing the interrupt line number assigned to this device as well as a fully initialized Virtio PCI transport driver.
Returns None
if the device does not report an assigned interrupt line, or if the transport
driver fails to initialize for some other reason. Either of these could be an indication that
dev
is not a valid Virtio device.