RE: [PATCH v2] intel-iommu: Add device info into list before doing context mapping

2012-05-24 Thread David Woodhouse
On Fri, 2012-03-23 at 02:54 +, Hao, Xudong wrote: Any other comments for this patch? Or can you check-in it in your iommu tree? Apologies for the delayed response. I've just forwarded this to Linus. -- dwmw2 smime.p7s Description: S/MIME cryptographic signature

[PATCH 1/2] intel-iommu: Add device info into list before doing context mapping

2012-05-25 Thread David Woodhouse
xudong@intel.com Signed-off-by: Xiantao Zhang xiantao.zh...@intel.com Acked-by: Chris Wright chr...@sous-sol.org Signed-off-by: David Woodhouse david.woodho...@intel.com Cc: sta...@kernel.org --- Resend with a follow-up patch to reduce the duplication of code, as requested. drivers/iommu/intel

Re: [PATCH 2/2] iommu: dmar -- reserve mmio space used by IOMMU

2012-06-04 Thread David Woodhouse
On Mon, 2012-06-04 at 17:29 -0400, Donald Dutile wrote: Intel-iommu initialization doesn't currently reserve the memory used for the IOMMU registers. This can allow the pci resource allocator to assign a device BAR to the same address as the IOMMU registers. This can cause some not so nice

Re: [PATCH 2/2] iommu: dmar -- reserve mmio space used by IOMMU

2012-06-06 Thread David Woodhouse
On Wed, 2012-06-06 at 10:16 +0200, Ingo Molnar wrote: So basically the patch-set is fine as-is, we just want a sufficiently nasty sounding warning message about the BIOS bug, No. The other change that's required is that the warning and the workaround need to trigger even when IOMMU support

Re: [PATCH 2/2] iommu: dmar -- reserve mmio space used by IOMMU

2012-06-06 Thread David Woodhouse
On Wed, 2012-06-06 at 10:29 +0200, Ingo Molnar wrote: So for all practical purposes we get 99% of the warning power without going into chicken-and-egg problems like how do we determine that there's an IOMMU area there if there's no IOMMU aware code in the kernel, right? That's not a

Re: [PATCH v2] Intel IOMMU patch to reprocess RMRR info

2012-09-27 Thread David Woodhouse
On Thu, 2012-09-27 at 15:34 -0600, Alex Williamson wrote: It really seems like RMRRs are incompatible with IOMMU API use though. If an RMRR is setup for a VM domain, that's bad because a) it gives the VM direct access to that range of host memory, and b) it interferes with the guest use of the

Re: [PATCH v2] Intel IOMMU patch to reprocess RMRR info

2012-09-28 Thread David Woodhouse
On Fri, 2012-09-28 at 11:46 +0200, Joerg Roedel wrote: Even on modern hardware with modern (IOMMU aware) kernels there is still this small time window when the OS has enabled the IOMMU and the USB driver is not initialized yet. In this time window the RMRR memory region is still necessary, no?

Re: [PATCH v2] Intel IOMMU patch to reprocess RMRR info

2012-09-28 Thread David Woodhouse
On Fri, 2012-09-28 at 12:36 -0400, Linda Knippers wrote: I can only speak to the HP servers. We have been shipping devices 'for a while' that provide sensor-type data to the platform. The device does DMA writes to a range of memory (the RMRR) and iLO does DMA reads of that data. This

Re: [PATCH] intel-iommu: Synchronize gcmd value with global command register

2013-04-03 Thread David Woodhouse
-remapping is disabled in 2nd kernel. The IOMMU is there to stop DMA transactions. That is its *job*. :) -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel Corporation smime.p7s Description: S/MIME cryptographic

Re: [PATCH] intel-iommu: Synchronize gcmd value with global command register

2013-04-04 Thread David Woodhouse
On Thu, 2013-04-04 at 14:48 +0900, Takao Indoh wrote: - DMAR fault messages floods and second kernel does not boot. Recently I saw similar report. https://lkml.org/lkml/2013/3/8/120 Right. So the fix for that is to make the subsequent errors silent, until/unless we actually get a request to

Re: WARNING: at drivers/iommu/dmar.c:484 warn_invalid_dmar with Intel Motherboard

2013-07-09 Thread David Woodhouse
On Tue, 2013-07-09 at 17:18 -0700, Guenter Roeck wrote: I meant warning as in pr_warn or dev_warn, not WARNING as in traceback. Keep in mind that a casual user doesn't expect to see a traceback and will tend to get alarmed. Several bugs have been filed against this issue in various

Re: [PATCH] intel-iommu: Quiesce devices before disabling IOMMU

2013-09-09 Thread David Woodhouse
resetting devices just because they have an RMRR, won't you? (Although I wouldn't lose any sleep over that, I suppose. In fact it might be a *feature*... :) -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-21 Thread David Woodhouse
VTD_PAGE_SHIFT, + (iova + size - 1) VTD_PAGE_SHIFT); if (dmar_domain-max_addr == iova + size) dmar_domain-max_addr = iova; -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com

Re: [PATCH v2] intel-iommu: Quiesce devices before disabling IOMMU

2013-09-24 Thread David Woodhouse
On Tue, 2013-09-24 at 15:16 +0200, Joerg Roedel wrote: I am not convinced that this is the right approach. If a device wasn't translated by VT-d in the old kernel doesn't mean it will not be translated in the new kernel. How about unconditionally resetting all PCI busses and/or functions

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 17:54 +0200, Joerg Roedel wrote: On Sat, Sep 21, 2013 at 09:59:00PM -0500, David Woodhouse wrote: I *hate* the bizarre calling convention for iommu_unmap(). Is it actually clearly documented anywhere? Why on earth is it not just returning void, and expected to unmap

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: Why would it ever care? If it *happens* to map something that can use large pages, yay!. If it subsequently breaks apart those large pages by unmapping 4KiB in the middle, let

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 13:44 -0600, Alex Williamson wrote: On Wed, 2013-09-25 at 19:52 +0100, David Woodhouse wrote: On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: Why would it ever care? If it *happens* to map something

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 15:46 -0600, Alex Williamson wrote: On Wed, 2013-09-25 at 21:11 +0100, David Woodhouse wrote: I wouldn't bother to go looking for opportunities to use super pages if we remove the last non-SP-capable IOMMU from the domain. I predict bugs getting filed if a guest sees

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-10-02 Thread David Woodhouse
On Sat, 2013-09-21 at 21:59 -0500, David Woodhouse wrote: Here's a completely untested work-in-progress that attempts to fix that. I'll be able to test it myself on about Tuesday when I'm home from New Orleans and awake... Or might have been if my laptop's hard drive hadn't died. Here's

Re: [PATCH] iommu: Split iommu_unmaps

2013-11-07 Thread David Woodhouse
it loop for *itself* over the pages. -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel Corporation smime.p7s Description: S/MIME cryptographic signature ___ iommu

Re: [PATCH] iommu: Split iommu_unmaps

2013-11-20 Thread David Woodhouse
On Mon, 2013-11-11 at 16:09 -0700, Alex Williamson wrote: On Thu, 2013-11-07 at 16:37 +, David Woodhouse wrote: On Fri, 2013-05-24 at 11:14 -0600, Alex Williamson wrote: iommu_map splits requests into pages that the iommu driver reports that it can handle. The iommu_unmap path does

Re: [PATCH 1/1] IOMMU: Save pci device id instead of pci_dev* pointer for DMAR devices

2013-11-20 Thread David Woodhouse
On Fri, 2013-11-08 at 08:46 -0700, Bjorn Helgaas wrote: I don't know the IOMMU drivers well either, but it seems like they rely on notifications of device addition and removal (see iommu_bus_notifier()). It doesn't seem right for them to also use the generic PCI interfaces like

[PATCH] iommu/vt-d: Be less pessimistic about domain coherency where possible

2014-03-11 Thread David Woodhouse
. If there *are* no IOMMUs in the system which are non-coherent, then we don't need to do it. And flushing the dcache is a *significant* performance hit. Signed-off-by: David Woodhouse david.woodho...@intel.com --- In fact, even the overly cautious approach is broken because it's possible to add a coherent

Fixing kvm_iommu_put_pages()

2014-03-11 Thread David Woodhouse
kvm_iommu_unmap_pages(struct kvm *kvm, struct kvm_memory_slot *slot) -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel Corporation smime.p7s Description: S/MIME cryptographic signature

Re: Fixing kvm_iommu_put_pages()

2014-03-17 Thread David Woodhouse
On Mon, 2014-03-17 at 09:44 -0600, Alex Williamson wrote: As mentioned on irc, I think this could probably be made to work and doing a callback would likely give the IOMMU driver the most flexibility versus some sort of interface for iommu_iova_to_phys() to return the mapping size. Is it

Re: [RFC PATCH] iommu/vt-d: Clean up and fix page table clear/free behaviour

2014-03-17 Thread David Woodhouse
On Mon, 2014-03-17 at 09:30 -0600, Alex Williamson wrote: I think you've likely already figured out, but it should be stated in this thread, yes interfaces do rely on the insane tell me if you unmapped more than I asked for API. I'm going to decouple this patch from that question by adding

Re: Fixing kvm_iommu_put_pages()

2014-03-17 Thread David Woodhouse
On Mon, 2014-03-17 at 10:51 -0600, Alex Williamson wrote: In order to maintain the trivial callback you suggest, the IOTLB would need to guarantee that the physical addresses are not accessible prior to the callback. Without such a guarantee, we can't unpin the pages and the callback

[PATCH 2/4] iommu/vt-d: Clean up and fix page table clear/free behaviour

2014-03-20 Thread David Woodhouse
of all these changes, this also fixes the fact that intel_iommu_unmap() was neglecting to free the page tables for the range in question after clearing them. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 232

[PATCH 4/4] iommu/vt-d: Be less pessimistic about domain coherency where possible

2014-03-20 Thread David Woodhouse
. If there *are* no IOMMUs in the system which are non-coherent, then we don't need to do it. And flushing the dcache is a *significant* performance hit. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 21 + 1 file changed, 17 insertions(+), 4

[PATCH 10/33] iommu/vt-d: Stop dmar_insert_dev_info() freeing domains on losing race

2014-03-21 Thread David Woodhouse
By moving this into get_domain_for_dev() we can make dmar_insert_dev_info() suitable for use with special domains such as the si_domain, which currently use domain_add_dev_info(). Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 45

[PATCH 05/33] iommu/vt-d: Add ACPI devices into dmaru-devices[] array

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c | 75 1 file changed, 75 insertions(+) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 34d271e..382f63d 100644 --- a/drivers/iommu/dmar.c +++ b

[PATCH 12/33] iommu/vt-d: Use domain_remove_one_dev_info() in domain_add_dev_info() error path

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3342d65..0751f6d 100644 --- a/drivers/iommu/intel-iommu.c +++ b

[PATCH 16/33] iommu/vt-d: Store PCI segment number in struct intel_iommu

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c| 1 + include/linux/intel-iommu.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 382f63d..cd05a4b 100644 --- a/drivers/iommu/dmar.c +++ b/drivers

[PATCH 03/33] iommu/vt-d: Allocate space for ACPI devices

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index eb95020..4c6297d 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu

[PATCH 08/33] iommu/vt-d: Use struct device in device_domain_info, not struct pci_dev

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 54 +++-- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 85ec773..ccef436 100644

[PATCH 19/33] iommu/vt-d: Make device_to_iommu() cope with non-PCI devices

2014-03-21 Thread David Woodhouse
Pass the struct device to it, and also make it return the bus/devfn to use, since that is also stored in the DMAR table. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 78 ++--- 1 file changed, 46 insertions

[PATCH 09/33] iommu/vt-d: Pass iommu to domain_context_mapping_one() and iommu_support_dev_iotlb()

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index ccef436..1ab7c18 100644 --- a/drivers

[PATCH 00/33] iommu/vt-d: Add support for DMA mapping of ACPI-enumerated devices

2014-03-21 Thread David Woodhouse
Version 2.2 of the VT-d specification adds support for DMA mapping of ACPI devices, by adding fields to the DMAR table which indicate the ACPI path of each DMA-capable device and the PCI bus/dev/fn from which its DMA will *appear* to come. The bulk of this patch series is going through the code

[PATCH 07/33] iommu/vt-d: Make dmar_insert_dev_info() take struct device instead of struct pci_dev

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index db7e44b..85ec773 100644 --- a/drivers/iommu/intel

[PATCH 15/33] iommu/vt-d: Remove device_to_iommu() call from domain_remove_dev_info()

2014-03-21 Thread David Woodhouse
This was problematic because it works by domain/bus/devfn and we want to make device_to_iommu() use only a struct device * (for handling non-PCI devices). Now that the iommu pointer is reliably stored in the device_domain_info, we don't need to look it up. Signed-off-by: David Woodhouse

[PATCH 06/33] iommu/vt-d: Make iommu_dummy() take struct device instead of struct pci_dev

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index f38f482..db7e44b 100644 --- a/drivers/iommu/intel-iommu.c +++ b

[PATCH 04/33] iommu/vt-d: Change scope lists to struct device, bus, devfn

2014-03-21 Thread David Woodhouse
It's not only for PCI devices any more, and the scope information for an ACPI device provides the bus and devfn so that has to be stored here too. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c| 41 ++--- drivers

[PATCH 17/33] iommu/vt-d: Remove segment from struct device_domain_info()

2014-03-21 Thread David Woodhouse
It's accessible via info-iommu-segment so this is redundant. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c

[PATCH 11/33] iommu/vt-d: use dmar_insert_dev_info() from dma_add_dev_info()

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b50d1d6..3342d65 100644 --- a/drivers/iommu/intel

[PATCH 14/33] iommu/vt-d: Simplify iommu check in domain_remove_one_dev_info()

2014-03-21 Thread David Woodhouse
Now we store the iommu in the device_domain_info, we don't need to do a lookup. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c

[PATCH 01/33] iommu/vt-d: Add ACPI namespace device reporting structures

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- include/acpi/actbl2.h | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 094a906..da5b057 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2

[PATCH 02/33] iommu/vt-d: Parse ANDD records

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index b19f9f4..eb95020 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c

[PATCH 18/33] iommu/vt-d: Make identity_mapping() take struct device not struct pci_dev

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 81f52d3..4a028c9 100644 --- a/drivers/iommu/intel-iommu.c +++ b

[PATCH 29/33] iommu/vt-d: Remove pdev from iommu_no_mapping()

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3e15050..7b73c42 100644 --- a/drivers/iommu/intel-iommu.c +++ b

[PATCH 20/33] iommu/vt-d: Make domain_context_mapp{ed, ing}() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index a24611f..741fb1d 100644 --- a/drivers

[PATCH 21/33] iommu/vt-d: Make get_domain_for_dev() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 75 ++--- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 741fb1d..05c5214 100644

[PATCH 25/33] iommu/vt-d: Remove some pointless to_pci_dev() calls

2014-03-21 Thread David Woodhouse
Mostly made redundant by using dev_name() instead of pci_name(), and one instance of using *dev-dma_mask instead of pdev-dma_mask. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff

[PATCH 23/33] iommu/vt-d: Make iommu_should_identity_map() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 107 +++- 1 file changed, 57 insertions(+), 50 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index acb9268..15371ec 100644

[PATCH 24/33] iommu/vt-d: Make get_valid_domain_for_dev() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 15371ec..41eafc3 100644 --- a/drivers/iommu

[PATCH 26/33] iommu/vt-d: Rename 'hwdev' variables to 'dev' now that that's the norm

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index cfe08ea..f3c1624 100644

[PATCH 30/33] iommu/vt-d: Remove pdev from intel_iommu_attach_device()

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 7b73c42..9a66bf7 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers

[PATCH 22/33] iommu/vt-d: Handle RMRRs for non-PCI devices

2014-03-21 Thread David Woodhouse
Should hopefully never happen (RMRRs are an abomination) but while we're busy eliminating all the PCI assumptions, we might as well do it. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 30 ++ 1 file changed, 14 insertions

[PATCH 28/33] iommu/vt-d: Make domain_add_dev_info() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 270a25b..3e15050 100644 --- a/drivers/iommu/intel-iommu.c

[PATCH 32/33] iommu/vt-d: Finally enable translation for non-PCI devices

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b1235dc..0f065bc 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel

[PATCH 33/33] iommu/vt-d: Include ACPI devices in iommu=pt

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 61 +++-- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 0f065bc..53996d9 100644

[PATCH 31/33] iommu/vt-d: Remove to_pci_dev() in intel_map_page()

2014-03-21 Thread David Woodhouse
It might not be... Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 9a66bf7..b1235dc 100644 --- a/drivers/iommu/intel

[PATCH 27/33] iommu/vt-d: Make domain_remove_one_dev_info() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index f3c1624..270a25b 100644 --- a/drivers/iommu

[GIT PULL] VT-d fixes and ACPI device mapping support for 3.15

2014-03-24 Thread David Woodhouse
- include/acpi/actbl2.h | 15 +- include/linux/dmar.h| 18 +- include/linux/intel-iommu.h | 1 + 5 files changed, 759 insertions(+), 420 deletions(-) David Woodhouse (37): iommu/vt-d: Clean up size handling for intel_iommu_unmap() iommu/vt-d

Re: [patch] iommu/vt-d: returning free pointer in get_domain_for_dev()

2014-03-28 Thread David Woodhouse
); + domain = NULL; goto error; } free = domain; Applied; thanks. -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel Corporation smime.p7s Description: S/MIME

Re: [GIT PULL] VT-d fixes and ACPI device mapping support for 3.15

2014-04-01 Thread David Woodhouse
On Mon, 2014-03-24 at 15:17 +, David Woodhouse wrote: Jörg, please pull into your x86/vt-d branch from git://git.infradead.org/iommu-2.6 Again, please. A few minor fixes... Dan Carpenter (1): iommu/vt-d: returning free pointer in get_domain_for_dev() David Woodhouse (2

Re: hpsa driver bug crack kernel down!

2014-04-11 Thread David Woodhouse
— and it *was* working. -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel Corporation smime.p7s Description: S/MIME cryptographic signature ___ iommu mailing list iommu@lists.linux

Re: [PATCH 0/8] iommu/vt-d: Fix crash dump failure caused by legacy DMA/IO

2014-04-30 Thread David Woodhouse
to continue to the same virtual bus addresses, but it can only ever affect one piece of physical memory and can't have detrimental effects elsewhere. Was that option considered and discounted for some reason? It seems like it would make sense... -- David WoodhouseOpen

Re: [PATCH] iommu/intel: Exclude devices using RMRRs from IOMMU API domains

2014-05-21 Thread David Woodhouse
On Wed, 2014-05-14 at 13:27 -0600, Alex Williamson wrote: The user of the IOMMU API domain expects to have full control of the IOVA space for the domain. RMRRs are fundamentally incompatible with that idea. We can neither map the RMRR into the IOMMU API domain, nor can we guarantee that the

Re: [PATCH] iommu/intel: Exclude devices using RMRRs from IOMMU API domains

2014-05-21 Thread David Woodhouse
On Wed, 2014-05-21 at 13:05 -0400, Linda Knippers wrote: Exactly, I have a hard time bringing myself to care about supporting such devices. Vendors that proliferate RMRR usage need to be aware of the implications of RMRRs for all use cases of a device. First and foremost, we need to

[stable PATCH] iommu/vt-d: Fix missing IOTLB flush in intel_iommu_unmap()

2014-06-09 Thread David Woodhouse
flush. Signed-off-by: David Woodhouse david.woodho...@intel.com --- For 3.14 and earlier. As noted, this fix is in 3.15 already. drivers/iommu/intel-iommu.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel

Re: [RESEND PATCH] iommu/intel: Exclude devices using RMRRs from IOMMU API domains

2014-06-13 Thread David Woodhouse
more complicated? Are other devices going to start getting added to the class of we don't need the RMRRs to persist and we *do* want to be able to assign them... or is that just needlessly overcomplicating it at this stage? -- David WoodhouseOpen Source Technology

Re: [PATCH v2] iommu/intel: Exclude devices using RMRRs from IOMMU API domains

2014-06-17 Thread David Woodhouse
it's reset the hardware to *stop* doing whatever DMA the BIOS set it up with. -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel Corporation ¹ Alex's patch prevents assignment to VM guests of *any* device which

Re: [Intel-gfx] [PATCH v2] iommu/intel: Exclude devices using RMRRs from IOMMU API domains

2014-06-17 Thread David Woodhouse
On Tue, 2014-06-17 at 09:15 +0200, Daniel Vetter wrote: We've always been struggling with stolen handling, and we've' always been struggling with vt-d stuff. Also pass-through seems to be a major pain (I've never tried myself). Given all that I'm voting for keeping the RMRR and everything else

Re: [PATCH v2] iommu/intel: Exclude devices using RMRRs from IOMMU API domains

2014-06-17 Thread David Woodhouse
On Tue, 2014-06-17 at 06:22 -0600, Alex Williamson wrote: On Tue, 2014-06-17 at 08:04 +0100, David Woodhouse wrote: On Mon, 2014-06-16 at 23:35 -0600, Alex Williamson wrote: Any idea what an off-the-shelf Asus motherboard would be doing with an RMRR on the Intel HD graphics

Re: [PATCH v2] iommu/vt-d: Fix broken device issue when using iommu=pt

2014-08-25 Thread David Woodhouse
On Mon, 2014-08-25 at 12:11 +, Sathya Perla wrote: Hi Wang, from the kernel log I can see that the faulting address 0xbdf7 falls in the RMRR range the BIOS requested: [0.111343] DMAR: RMRR base: 0x00bdf6f000 end: 0x00bdf7efff We can't see which *devices* that RMRR was

Re: [PATCH] iommu/vt-d: Fix an off-by-one bug in __domain_mapping()

2014-12-02 Thread David Woodhouse
-By: David Woodhouse david.woodho...@intel.com This issue was introduced in v2.6.31, but intel-iommu.c has been moved into drivers/iommu in v3.1. So what's the preferred way to deal with stable kernels between v2.6.31 and v3.1? Just remove the kernel version marker from the stable tag

Re: [RFC 0/4] Separate the IOVA library from the intel-iommu driver

2014-12-04 Thread David Woodhouse
might be useful for the others in the meantime and I wouldn't mind having them in upstream either. Acked-By: David Woodhouse david.woodho...@intel.com for all 4, with the caveat that I don't actually want to see various IOMMU drivers *using* the IOVA code directly. Where possible, we really want

Re: [v3 26/26] iommu/vt-d: Add a command line parameter for VT-d posted-interrupts

2015-01-28 Thread David Woodhouse
On Fri, 2014-12-12 at 23:15 +0800, Feng Wu wrote: Enable VT-d Posted-Interrtups and add a command line parameter for it. Signed-off-by: Feng Wu feng...@intel.com Acked-by: David Woodhouse david.woodho...@intel.com -- David WoodhouseOpen Source Technology Centre

Re: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2015-01-28 Thread David Woodhouse
, and the migration happens during vCPU scheduling. However, we still update the cached irte here, which can be used when changing back to remapping mode. Signed-off-by: Feng Wu feng...@intel.com Reviewed-by: Jiang Liu jiang@linux.intel.com Acked-by: David Woodhouse david.woodho

Re: [v3 08/26] iommu, x86: Add intel_irq_remapping_capability() for Intel

2015-01-28 Thread David Woodhouse
which doesn't support posted interrupts, what happens? -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel Corporation smime.p7s Description: S/MIME cryptographic signature

Re: [v3 02/26] iommu: Add new member capability to struct irq_remap_ops

2015-01-28 Thread David Woodhouse
(*capability)(enum irq_remap_cap); + Does this need to be a function call? Or could we just have a set of flags in the irq_remap_ops instead, with less overhead to check them? -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com

Re: [v3 03/26] iommu, x86: Define new irte structure for VT-d Posted-Interrupts

2015-01-28 Thread David Woodhouse
along with the other patches rather than through me, and I'm happy for it to do so. -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel Corporation smime.p7s Description: S/MIME cryptographic signature

Re: [v3 07/26] iommu, x86: Add cap_pi_support() to detect VT-d PI capability

2015-01-28 Thread David Woodhouse
On Fri, 2014-12-12 at 23:14 +0800, Feng Wu wrote: Add helper function to detect VT-d Posted-Interrupts capability. Signed-off-by: Feng Wu feng...@intel.com Reviewed-by: Jiang Liu jiang@linux.intel.com Acked-by: David Woodhouse david.woodho...@intel.com -- David Woodhouse

Re: [v3 04/26] iommu, x86: Implement irq_set_vcpu_affinity for intel_ir_chip

2015-01-28 Thread David Woodhouse
On Fri, 2014-12-12 at 23:14 +0800, Feng Wu wrote: Implement irq_set_vcpu_affinity for intel_ir_chip. Signed-off-by: Feng Wu feng...@intel.com Reviewed-by: Jiang Liu jiang@linux.intel.com Acked-by: David.Woodhouse david.woodho...@intel.com assuming a suitable answer to... +

Re: [GIT PULL] iommu: Kill off pgsize_bitmap field from struct iommu_ops

2015-04-01 Thread David Woodhouse
on pg-freelist, if this was the last use of those pages (as ISTR it is in the KVM case). -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel Corporation smime.p7s Description: S/MIME cryptographic signature

[GIT PULL] Intel IOMMU for 4.1

2015-04-26 Thread David Woodhouse
*might*, if the planets had been aligned correctly, possibly have had SVM capability but which in practice actually don't. David Woodhouse (4): iommu/vt-d: kill bogus ecap_niotlb_iunits() iommu/vt-d: Allow RMRR on graphics devices too iommu/vt-d: Add new extended capabilities from

Re: [GIT PULL] Intel IOMMU for 4.1

2015-04-26 Thread David Woodhouse
is turned on. For a discrete card with a discrete video BIOS, as opposed to chipset -integrated stuff, I suspect it's actually much *less* likely that there's any other weirdness going on. -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com

Re: [GIT PULL] Intel IOMMU for 4.1

2015-04-27 Thread David Woodhouse
On Mon, 2015-04-27 at 09:39 -0600, Alex Williamson wrote: David, Since this got pulled anyway, do you plan to follow-up with patches to limit the graphics RMRR exception to the known and acceptable uses and document them, or should I send a revert patch? I don't think what we have here is

Re: [GIT PULL] Intel IOMMU for 4.1

2015-04-27 Thread David Woodhouse
On Mon, 2015-04-27 at 08:48 -0700, Linus Torvalds wrote: On Mon, Apr 27, 2015 at 8:39 AM, Alex Williamson alex.william...@redhat.com wrote: Since this got pulled anyway, do you plan to follow-up with patches to limit the graphics RMRR exception to the known and acceptable uses and

[GIT PULL] Intel IOMMU fix for 4.1

2015-06-08 Thread David Woodhouse
to trigger with 'iommu=pt intel_iommu=igfx_off' on the command line. David Woodhouse (1): iommu/vt-d: Fix passthrough mode with translation-disabled devices drivers/iommu/intel-iommu.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) -- David Woodhouse

Re: [PATCH v11 04/10] iommu/vt-d: functions to copy data from old mem

2015-06-08 Thread David Woodhouse
on *all* platforms with an IOMMU, and won't they all need something like this? And I think you're misusing VTD_PAGE_{SHIFT,MASK} when you should be using the normal PAGE_{SHIFT,MASK}. And shouldn't physical addresses be phys_addr_t? -- David WoodhouseOpen Source

Re: [PATCH v11 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-06-08 Thread David Woodhouse
, and generate a new one, so that the device can be assigned a new and empty page table. What if there were RMRRs for this device? Don't we need to ensure that those are present in the new and empty page table when we take it over? -- David WoodhouseOpen Source

Re: [PATCH v11 04/10] iommu/vt-d: functions to copy data from old mem

2015-06-08 Thread David Woodhouse
On Mon, 2015-06-08 at 17:21 +0200, Joerg Roedel wrote: Hi David, On Mon, Jun 08, 2015 at 03:15:35PM +0100, David Woodhouse wrote: Surely this isn't specific to the Intel IOMMU? Shouldn't it live elsewhere — either in generic IOMMU code or perhaps in generic kexec support code? I put

Re: [PATCH v11 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-06-08 Thread David Woodhouse
On Mon, 2015-06-08 at 17:29 +0200, Joerg Roedel wrote: On Mon, Jun 08, 2015 at 03:26:23PM +0100, David Woodhouse wrote: There are some interesting corner cases to handle here. Firstly, you don't seem to handle the case of extended root/context tables (where ecap_ecs is set). You need

Re: [PATCH v11 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-06-10 Thread David Woodhouse
On Wed, 2015-06-10 at 17:32 +0800, Li, ZhenHua wrote: Is PASID part of new specs? Is there any plan to upgrade the driver to support the latest vt-d specs? Yes, and yes. I'm currently working on the latter — and the extended page table support in 4.1 is the precursor to that work. -- dwmw2

Re: [PATCH v11 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-06-09 Thread David Woodhouse
On Mon, 2015-06-08 at 18:13 +0200, Joerg Roedel wrote: On Mon, Jun 08, 2015 at 04:50:24PM +0100, David Woodhouse wrote: On Mon, 2015-06-08 at 17:29 +0200, Joerg Roedel wrote: Hmm, I also limited this functionality to kdump kernels. Do we still need to preserve these extended data

Re: [PATCH 00/19] Fix Intel IOMMU breakage in kdump kernel

2015-06-23 Thread David Woodhouse
On Tue, 2015-06-23 at 16:06 +0200, Joerg Roedel wrote: On Tue, Jun 23, 2015 at 02:31:30PM +0100, David Woodhouse wrote: However, it's still fairly gratuitous for all non-broken hardware, and will tend to hide hardware and driver bugs during testing of new hardware. I'd much rather see

Re: [PATCH 00/19] Fix Intel IOMMU breakage in kdump kernel

2015-06-23 Thread David Woodhouse
On Sat, 2015-06-13 at 08:47 +0200, Joerg Roedel wrote: Hi, as David Woodhouse pointed out, my fixes and cleanups for the original patch-set turned out to be a complete rewrite. So to have a cleaner history of the feature and to make backporting easier, here is a rewrite of my changes based

Re: [PATCH 00/19] Fix Intel IOMMU breakage in kdump kernel

2015-06-25 Thread David Woodhouse
On Thu, 2015-06-25 at 14:35 +0800, Li, ZhenHua wrote: Hi David, It is a bad idea to check the DMI match on HP. Though I have not see any similar problems on other systems, I believe there are. Also not all HP systems have such problem. Yeah, the HP suggestion was a little tongue-in-cheek.

Re: [PATCH 2/4] iommu/vt-d: Don't consider copied context entries as present

2015-06-11 Thread David Woodhouse
On Thu, 2015-06-11 at 16:25 +0200, Joerg Roedel wrote: On Thu, Jun 11, 2015 at 03:07:02PM +0100, David Woodhouse wrote: On Thu, 2015-06-11 at 15:47 +0200, Joerg Roedel wrote: From: Joerg Roedel jroe...@suse.de Hide the copied context entries from the IOMMU driver by considering

  1   2   3   >