1. 17 1月, 2014 2 次提交
    • A
      vfio-pci: Fail initfn on DMA mapping errors · 87ca1f77
      Alex Williamson 提交于
      The vfio-pci initfn will currently succeed even if DMA mappings fail.
      A typical reason for failure is if the user does not have sufficient
      privilege to lock all the memory for the guest.  In this case, the
      device gets attached, but can only access a portion of guest memory
      and is extremely unlikely to work.
      
      DMA mappings are done via a MemoryListener, which provides no direct
      error return path.  We therefore stuff the errno into our container
      structure and check for error after registration completes.  We can
      also test for mapping errors during runtime, but our only option for
      resolution at that point is to kill the guest with a hw_error.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      87ca1f77
    • A
      vfio: Filter out bogus mappings · d3a2fd9b
      Alex Williamson 提交于
      Since 57271d63 we now see spurious mappings with the upper bits set
      if 64bit PCI BARs are sized while enabled.  The guest writes a mask
      of 0xffffffff to the lower BAR to size it, then restores it, then
      writes the same mask to the upper BAR resulting in a spurious BAR
      mapping into the last 4G of the 64bit address space.  Most
      architectures do not support or make use of the full 64bits address
      space for PCI BARs, so we filter out mappings with the high bit set.
      Long term, we probably need to think about vfio telling us the
      address width limitations of the IOMMU.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      d3a2fd9b
  2. 16 1月, 2014 3 次提交
  3. 15 1月, 2014 2 次提交
  4. 14 1月, 2014 4 次提交
  5. 13 1月, 2014 29 次提交