VFIO ARM resource

Terminology

  • VFIO_PLATFORM: VFIO support of device under the platform bus.

    Platform bus means platform dependent bus. In Linux, platform devices are registered at /sys/bus/platform.

    Compared to it, there are some common platform independent buses like pci, usb, and amba. They are also at /sys/bus/ directory.

    see sysfs for more information.

VFIO_PLATFORM for DMA Controller (PL330)

VFIO_PLATFORM for Calxeda xgmac ethernet driver

Some kernel patches

KVM PCIe/MSI Passthrough on ARM/ARM64

Eric Auger, KVM PCIe/MSI Passthrough on ARM/ARM64

  • ARM-based system require special support for MSI in the context of VFIO passthrough (ARM server, PCI MSI)

  • chapters

    • ARM MSI Controllers: GICv2m and GICv3 ITS

    • KVM PCI/MSI passthrough, x86/ARM Differences

      • On x86, MSI write transactions hit special 1MB phyaddr. It’s APIC config space and not DRAM, so it bypass IOMMU. It doesn’t need IOMMU mapping.

      • On ARM, however, MSI write transactions is normal MMIO region. Therefore an IOMMU mapping must exist.

      • The goal: create the needed IOMMU mappings for MSI write transactions. eventually reach hardware MSI frame.

    • Assigned device MSI Setup: VFIO Legacy Implementation for x86, and Requested adaptation for ARM

    • Interrupt Safety: guest cannot trigger MSIs that correspond to interrupt IDs of devices belonging to host or other guest.

    • Conclusions

      • GICv2m MSI controllers will require users to load VFIO with the allow_unsafe_interrupts parameter.

      • GICv3 ITS platforms will work with VFIO without any additional parameters.

  • patches: Linux kernel, QEMU

Other Resource

  • Direct Device Assignment for Untrusted Fully-Virtualized Virtual Machines, IBM Research, 2008

  • Introduction on performance analysis and profiling methodologies for KVM on ARM virtualization