5–7 Oct 2026
Europe/Prague timezone

Testing the Untestable: Using QEMU for Testing PCI Endpoint Framework

Not scheduled
20m
VFIO/IOMMU/PCI MC

Speaker

Manivannan Sadhasivam

Description

The Linux PCI Endpoint Framework provides the software infrastructure for a Linux system to present itself as a PCIe Endpoint device to an external Host. It consists of an Endpoint Controller layer that abstracts the hardware, an Endpoint Function layer that implements device behavior, and a ConfigFS interface for userspace to bind them together. For testing, the upstream pci_endpoint kselftests are used. But running this kselftest has always required two physical machines connected by a physical PCIe link. This makes automated testing impractical and limits coverage to whoever has the right hardware.

This talk presents a software only test setup that removes the hardware requirement entirely. Two QEMU instances communicate over a Unix socket, one acting as the Endpoint Controller and the other as the Root Complex. A new generic EPC driver on the Endpoint side talks to a virtual Endpoint Controller device emulated by QEMU, which forwards commands over the socket to the RC side where QEMU emulates a PCIe Endpoint Function that the Host kernel enumerates and tests against. The existing kselftests run unmodified against this setup.

This talk will walk through how the two VM design works, what trade-offs were made in the socket protocol and what remains to be done for full CI integration.

Author

Presentation materials

There are no materials yet.