1. 04 5月, 2015 2 次提交
  2. 02 4月, 2015 9 次提交
  3. 31 3月, 2015 19 次提交
  4. 27 3月, 2015 4 次提交
  5. 25 3月, 2015 3 次提交
    • D
      iommu/vt-d: support extended root and context entries · 03ecc32c
      David Woodhouse 提交于
      Add a new function iommu_context_addr() which takes care of the
      differences and returns a pointer to a context entry which may be
      in either format. The formats are binary compatible for all the old
      fields anyway; the new one is just larger and some of the reserved
      bits in the original 128 are now meaningful.
      
      So far, nothing actually uses the new fields in the extended context
      entry. Modulo hardware bugs with interpreting the new-style tables,
      this should basically be a no-op.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      03ecc32c
    • D
      iommu/vt-d: Allow RMRR on graphics devices too · 18436afd
      David Woodhouse 提交于
      Commit c875d2c1 ("iommu/vt-d: Exclude devices using RMRRs from IOMMU API
      domains") prevents certain options for devices with RMRRs. This even
      prevents those devices from getting a 1:1 mapping with 'iommu=pt',
      because we don't have the code to handle *preserving* the RMRR regions
      when moving the device between domains.
      
      There's already an exclusion for USB devices, because we know the only
      reason for RMRRs there is a misguided desire to keep legacy
      keyboard/mouse emulation running in some theoretical OS which doesn't
      have support for USB in its own right... but which *does* enable the
      IOMMU.
      
      Add an exclusion for graphics devices too, so that 'iommu=pt' works
      there. We should be able to successfully assign graphics devices to
      guests too, as long as the initial handling of stolen memory is
      reconfigured appropriately. This has certainly worked in the past.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Cc: stable@vger.kernel.org
      18436afd
    • F
      iommu/vt-d: Print x2apic opt out info instead of printing a warning · 68c1b89c
      Fenghua Yu 提交于
      BIOS can set up x2apic_opt_out bit on some platforms, for various misguided
      reasons like insane SMM code with weird assumptions about what descriptors
      look like, or wanting Windows not to enable the IOMMU so that the graphics
      driver will take it over for SVM in "driver mode".
      
      A user can either disable the x2apic_opt_out bit in BIOS or by kernel
      parameter "no_x2apic_optout". Instead of printing a warning, we just
      print information of x2apic opt out.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      68c1b89c
  6. 24 3月, 2015 1 次提交
  7. 23 3月, 2015 2 次提交
    • A
      iommu: ipmmu-vmsa: Add terminating entry for ipmmu_of_ids · ac04f85a
      Axel Lin 提交于
      The of_device_id table is supposed to be zero-terminated.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      ac04f85a
    • A
      iommu/vt-d: Detach domain *only* from attached iommus · 71684406
      Alex Williamson 提交于
      Device domains never span IOMMU hardware units, which allows the
      domain ID space for each IOMMU to be an independent address space.
      Therefore we can have multiple, independent domains, each with the
      same domain->id, but attached to different hardware units.  This is
      also why we need to do a heavy-weight search for VM domains since
      they can span multiple IOMMUs hardware units and we don't require a
      single global ID to use for all hardware units.
      
      Therefore, if we call iommu_detach_domain() across all active IOMMU
      hardware units for a non-VM domain, the result is that we clear domain
      IDs that are not associated with our domain, allowing them to be
      re-allocated and causing apparent coherency issues when the device
      cannot access IOVAs for the intended domain.
      
      This bug was introduced in commit fb170fb4 ("iommu/vt-d: Introduce
      helper functions to make code symmetric for readability"), but is
      significantly exacerbated by the more recent commit 62c22167
      ("iommu/vt-d: Fix dmar_domain leak in iommu_attach_device") which calls
      domain_exit() more frequently to resolve a domain leak.
      
      Fixes: fb170fb4 ("iommu/vt-d: Introduce helper functions to make code symmetric for readability")
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: stable@vger.kernel.org # v3.17+
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      71684406