• Paul Durrant's avatar
    x86 / iommu: set up a scratch page in the quarantine domain · ea388678
    Paul Durrant authored
    
    
    This patch introduces a new iommu_op to facilitate a per-implementation
    quarantine set up, and then further code for x86 implementations
    (amd and vtd) to set up a read-only scratch page to serve as the source
    for DMA reads whilst a device is assigned to dom_io. DMA writes will
    continue to fault as before.
    
    The reason for doing this is that some hardware may continue to re-try
    DMA (despite FLR) in the event of an error, or even BME being cleared, and
    will fail to deal with DMA read faults gracefully. Having a scratch page
    mapped will allow pending DMA reads to complete and thus such buggy
    hardware will eventually be quiesced.
    
    NOTE: These modifications are restricted to x86 implementations only as
          the buggy h/w I am aware of is only used with Xen in an x86
          environment. ARM may require similar code but, since I am not
          aware of the need, this patch does not modify any ARM implementation.
    Signed-off-by: default avatarPaul Durrant <pdurrant@amazon.com>
    Reviewed-by: default avatarJan Beulich <jbeulich@suse.com>
    Release-acked-by: default avatarJuergen Gross <jgross@suse.com>
    ea388678
iommu.c 16.2 KB