linux/drivers/pci
Chris Wright 1672af1164 intel-iommu: ignore page table validation in pass through mode
We are seeing a bug when booting w/ iommu=pt with current upstream
(bisect blames 19943b0e30 "intel-iommu:
Unify hardware and software passthrough support).

The issue is specific to this loop during identity map initialization
of each device:

domain_context_mapping_one(si_domain, ..., CONTEXT_TT_PASS_THROUGH)
...
		/* Skip top levels of page tables for
		* iommu which has less agaw than default.
		*/
		for (agaw = domain->agaw; agaw != iommu->agaw; agaw--) {
			pgd = phys_to_virt(dma_pte_addr(pgd));
			if (!dma_pte_present(pgd)) {      <------ failing here
				spin_unlock_irqrestore(&iommu->lock, flags);
			return -ENOMEM;
		}

This box has 2 iommu's in it.  The catchall iommu has MGAW == 48, and
SAGAW == 4.  The other iommu has MGAW == 39, SAGAW == 2.

The device that's failing the above pgd test is the only device connected
to the non-catchall iommu, which has a smaller address width than the
domain default.  This test is not necessary since the context is in PT
mode and the ASR is ignored.

Thanks to Don Dutile for discovering and debugging this one.

Cc: stable@kernel.org
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-12-08 10:03:25 +00:00
..
hotplug headers: Fix build after <linux/sched.h> removal 2009-10-13 10:20:16 -07:00
pcie PCI ASPM: fix oops on root port removal 2009-11-06 14:01:23 -08:00
.gitignore
access.c PCI: Add pci_bus_set_ops 2009-06-16 14:29:33 -07:00
bus.c PCI AER: support Multiple Error Received and no error source id 2009-06-16 14:30:13 -07:00
dmar.c intel-iommu: Apply BIOS sanity checks for interrupt remapping too. 2009-12-08 10:02:39 +00:00
hotplug-pci.c
hotplug.c
htirq.c Merge branch 'x86/apic' into irq/numa 2009-05-12 12:17:36 +02:00
intel-iommu.c intel-iommu: ignore page table validation in pass through mode 2009-12-08 10:03:25 +00:00
intr_remapping.c intr_remap: Allocate intr-remapping table using numa locality info 2009-10-05 07:55:29 +01:00
intr_remapping.h Intel-IOMMU, intr-remap: source-id checking 2009-06-23 22:09:17 +01:00
iov.c PCI SR-IOV: correct broken resource alignment calculations 2009-08-30 08:37:25 -07:00
iova.c intel-iommu: Remove superfluous iova_alloc_lock from IOVA code 2009-07-15 08:17:02 +01:00
irq.c PCI: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-07 11:12:23 -08:00
Kconfig PCI: initialize and release SR-IOV capability 2009-03-20 10:48:22 -07:00
legacy.c PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
Makefile PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
msi.c PCI MSI: Style cleanups 2009-09-09 13:29:35 -07:00
msi.h PCI MSI: shorten PCI_MSIX_ENTRY_* symbol names 2009-06-29 12:15:19 -07:00
pci-acpi.c PCI / ACPI PM: Propagate wake-up enable for devices w/o ACPI support 2009-09-09 14:19:24 -07:00
pci-driver.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-09-16 07:49:54 -07:00
pci-stub.c PCI: pci-stub: add pci_stub.ids parameter 2009-09-09 13:44:34 -07:00
pci-sysfs.c PCI: expose function reset capability in sysfs 2009-09-09 13:29:24 -07:00
pci.c Merge git://git.infradead.org/~dwmw2/iommu-2.6.32 2009-10-13 10:04:40 -07:00
pci.h PCI: Simplify hotplug mch quirk. 2009-09-09 14:06:49 -07:00
probe.c PCI: Clear saved_state after the state has been restored 2009-09-14 13:41:46 -07:00
proc.c PCI: define PCI resource names in an 'enum' 2009-01-07 11:13:01 -08:00
quirks.c ahci / atiixp / pci quirks: rename AMD SB900 into Hudson-2 2009-10-16 06:21:20 -04:00
remove.c PCI: eliminate redundant pci_stop_dev() call from pci_destroy_dev() 2009-06-11 12:04:19 -07:00
rom.c PCI: fix rom.c kernel-doc warning 2009-02-13 12:01:56 -08:00
search.c PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
setup-bus.c Revert "PCI: get larger bridge ranges when space is available" 2009-10-27 09:39:18 -07:00
setup-irq.c
setup-res.c PCI: remove pci_assign_resource_fixed() 2009-10-06 09:42:04 -07:00
slot.c PCI: fix kernel-doc warnings 2009-06-29 12:13:56 -07:00
syscall.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00