oasis-tcs / virtio-spec

OASIS Virtual I/O Device TC: Source code for the VIRTIO (Virtual I/O) Specification maintained by the OASIS Virtual I/O Device (VIRTIO) Technical Committee
https://github.com/oasis-tcs/virtio-spec
Other
241 stars 72 forks source link

transport-pci: Add MSI support #206

Open Mani-Sadhasivam opened 2 months ago

Mani-Sadhasivam commented 2 months ago

MSI is the predecessor of MSI-X that allows PCIe devices to send interrupts to the host. Compared to MSI-X, MSI supports only a maximum of 32 vectors per PCIe function. But MSI has been widely supported by the PCIe devices requiring fewer interrupts such as Modems, WLAN cards etc...

Currently, Virtio spec only documents MSI-X and INTX interrupt mechanisms for the PCI transport. So if a Virtio device based on PCI transport supports only MSI, then the driver on the guest will only use INTX for receiving the interrupts. This is sub-optimal and affects the performance of the device. With MSI, the device can use one vector per queue (max of 32 vectors) thus avoiding the overhead associated with a shared INTX vector.

Fix: https://lore.kernel.org/virtio-comment/20240712140144.12066-1-manivannan.sadhasivam@linaro.org/