vIOMMU: Efficient IOMMU Emulation --------------------------------- Direct Device Assignment Deficiencies: - It requires the entire memory of the unmodified guest to be pinned to the host physical memory - Unmodified guest is unable to utilize the IOMMU for intra-guest protection - Can't do IOMMU-based remapping needed to handle legacy devices and nested virtualization Emulating IOMMU allows: - pin/unpin only the corresponding host physical pages - program the physical IOMMU to enable device access to the said physical pages - redirect DMA transactions through the physical IOMMU according to the unmodified guest's wishes Without relaxation (strict protection), Linux-2.6.36 only achieves 43% of the line rate of a 10Gbps NIC Default Linux: batch invalidation of stale IOTLB entries and collectively purging them every 10ms. Transforms aforesaid 43% to 91% saturation of line rate. While the default mode of Linux removes stale IOTLB entries en masse at 10ms intervals, it nevertheless tears down individual invalidated IOVA translations with no delay. Optimistic teardown: Keep the translation alive within the OS mapping data structure, optimistically expecting it to be reused. Sidecore Emulation: emulate the device on a separate core simultaneously. Avoid or eliminate exits on device accesses.