1. 11 9月, 2009 2 次提交
  2. 31 8月, 2009 2 次提交
  3. 26 8月, 2009 1 次提交
  4. 24 8月, 2009 2 次提交
    • D
      intel-iommu: iommu init error path bug fixes · 94a91b50
      Donald Dutile 提交于
      The kcalloc() failure path in iommu_init_domains() calls
      free_dmar_iommu(), which assumes that ->domains, ->domain_ids,
      and ->lock have been properly initialized.
      
      Add checks in free_[dmar]_iommu to not use ->domains,->domain_ids
      if not alloced. Move the lock init to prior to the kcalloc()'s,
      so it is valid in free_context_table() when free_dmar_iommu() invokes
      it at the end.
      
      Patch based on iommu-2.6,
      commit 13203227Signed-off-by: NDonald Dutile <ddutile@redhat.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      94a91b50
    • M
      intel-iommu: Mark functions with __init · 071e1374
      Matt Kraai 提交于
      Mark si_domain_init and iommu_prepare_static_identity_mapping with
      __init, to eliminate the following warnings:
      
      WARNING: drivers/pci/built-in.o(.text+0xf1f4): Section mismatch in reference from the function si_domain_init() to the function .init.text:si_domain_work_fn()
      The function si_domain_init() references
      the function __init si_domain_work_fn().
      This is often because si_domain_init lacks a __init
      annotation or the annotation of si_domain_work_fn is wrong.
      
      WARNING: drivers/pci/built-in.o(.text+0xe340): Section mismatch in reference from the function iommu_prepare_static_identity_mapping() to the function .init.text:si_domain_init()
      The function iommu_prepare_static_identity_mapping() references
      the function __init si_domain_init().
      This is often because iommu_prepare_static_identity_mapping lacks a __init
      annotation or the annotation of si_domain_init is wrong.
      Signed-off-by: NMatt Kraai <kraai@ftbfs.org>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      071e1374
  5. 09 8月, 2009 1 次提交
  6. 06 8月, 2009 1 次提交
  7. 05 8月, 2009 2 次提交
  8. 04 8月, 2009 2 次提交
    • D
      intel-iommu: Unify hardware and software passthrough support · 19943b0e
      David Woodhouse 提交于
      This makes the hardware passthrough mode work a lot more like the
      software version, so that the behaviour of a kernel with 'iommu=pt'
      is the same whether the hardware supports passthrough or not.
      
      In particular:
       - We use a single si_domain for the pass-through devices.
       - 32-bit devices can be taken out of the pass-through domain so that
         they don't have to use swiotlb.
       - Devices will work again after being removed from a KVM guest.
       - A potential oops on OOM (in init_context_pass_through()) is fixed.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      19943b0e
    • D
      intel-iommu: Cope with broken HP DC7900 BIOS · 0815565a
      David Woodhouse 提交于
      Yet another reason why trusting this stuff to the BIOS was a bad idea.
      The HP DC7900 BIOS reports an iommu at an address which just returns all
      ones, when VT-d is disabled in the BIOS.
      
      Fix up the missing iounmap in the error paths while we're at it.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      0815565a
  9. 03 8月, 2009 1 次提交
    • L
      Make pci_claim_resource() use request_resource() rather than insert_resource() · 79896cf4
      Linus Torvalds 提交于
      This function has traditionally used "insert_resource()", because before
      commit cebd78a8 ("Fix pci_claim_resource") it used to just insert the
      resource into whatever root resource tree that was indicated by
      "pcibios_select_root()".
      
      So there Matthew fixed it to actually look up the proper parent
      resource, which means that now it's actively wrong to then traverse the
      resource tree any more: we already know exactly where the new resource
      should go.
      
      And when we then did commit a76117df ("x86: Use pci_claim_resource"),
      which changed the x86 PCI code from the open-coded
      
      	pr = pci_find_parent_resource(dev, r);
      	if (!pr || request_resource(pr, r) < 0) {
      
      to using
      
      	if (pci_claim_resource(dev, idx) < 0) {
      
      that "insert_resource()" now suddenly became a problem, and causes a
      regression covered by
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=13891
      
      which this fixes.
      Reported-and-tested-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Cc: Andrew Patterson <andrew.patterson@hp.com>
      Cc: Linux PCI <linux-pci@vger.kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      79896cf4
  10. 20 7月, 2009 1 次提交
  11. 15 7月, 2009 3 次提交
  12. 13 7月, 2009 1 次提交
  13. 09 7月, 2009 1 次提交
  14. 08 7月, 2009 1 次提交
  15. 05 7月, 2009 2 次提交
    • D
      intel-iommu: Don't use identity mapping for PCI devices behind bridges · 3dfc813d
      David Woodhouse 提交于
      Our current strategy for pass-through mode is to put all devices into
      the 1:1 domain at startup (which is before we know what their dma_mask
      will be), and only _later_ take them out of that domain, if it turns out
      that they really can't address all of memory.
      
      However, when there are a bunch of PCI devices behind a bridge, they all
      end up with the same source-id on their DMA transactions, and hence in
      the same IOMMU domain. This means that we _can't_ easily move them from
      the 1:1 domain into their own domain at runtime, because there might be DMA
      in-flight from their siblings.
      
      So we have to adjust our pass-through strategy: For PCI devices not on
      the root bus, and for the bridges which will take responsibility for
      their transactions, we have to start up _out_ of the 1:1 domain, just in
      case.
      
      This fixes the BUG() we see when we have 32-bit-capable devices behind a
      PCI-PCI bridge, and use the software identity mapping.
      
      It does mean that we might end up using 'normal' mapping mode for some
      devices which could actually live with the faster 1:1 mapping -- but
      this is only for PCI devices behind bridges, which presumably aren't the
      devices for which people are most concerned about performance.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      3dfc813d
    • D
      intel-iommu: Use iommu_should_identity_map() at startup time too. · 6941af28
      David Woodhouse 提交于
      At boot time, the dma_mask won't have been set on any devices, so we
      assume that all devices will be 64-bit capable (and thus get a 1:1 map).
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      6941af28
  16. 04 7月, 2009 6 次提交
  17. 02 7月, 2009 8 次提交
  18. 30 6月, 2009 3 次提交