linux/drivers
Keshavamurthy, Anil S 10e5247f40 Intel IOMMU: DMAR detection and parsing logic
This patch supports the upcomming Intel IOMMU hardware a.k.a.  Intel(R)
Virtualization Technology for Directed I/O Architecture and the hardware spec
for the same can be found here
http://www.intel.com/technology/virtualization/index.htm

FAQ! (questions from akpm, answers from ak)

> So...  what's all this code for?
>
> I assume that the intent here is to speed things up under Xen, etc?

Yes in some cases, but not this code.  That would be the Xen version of this
code that could potentially assign whole devices to guests.  I expect this to
be only useful in some special cases though because most hardware is not
virtualizable and you typically want an own instance for each guest.

Ok at some point KVM might implement this too; i likely would use this code
for this.

> Do we
> have any benchmark results to help us to decide whether a merge would be
> justified?

The main advantage for doing it in the normal kernel is not performance, but
more safety.  Broken devices won't be able to corrupt memory by doing random
DMA.

Unfortunately that doesn't work for graphics yet, for that need user space
interfaces for the X server are needed.

There are some potential performance benefits too:

- When you have a device that cannot address the complete address range an
  IOMMU can remap its memory instead of bounce buffering.  Remapping is likely
  cheaper than copying.

- The IOMMU can merge sg lists into a single virtual block.  This could
  potentially speed up SG IO when the device is slow walking SG lists.  [I
  long ago benchmarked 5% on some block benchmark with an old MPT Fusion; but
  it probably depends a lot on the HBA]

And you get better driver debugging because unexpected memory accesses from
the devices will cause a trappable event.

>
> Does it slow anything down?

It adds more overhead to each IO so yes.

This patch:

Add support for early detection and parsing of DMAR's (DMA Remapping) reported
to OS via ACPI tables.

DMA remapping(DMAR) devices support enables independent address translations
for Direct Memory Access(DMA) from Devices.  These DMA remapping devices are
reported via ACPI tables and includes pci device scope covered by these DMA
remapping device.

For detailed info on the specification of "Intel(R) Virtualization Technology
for Directed I/O Architecture" please see
http://www.intel.com/technology/virtualization/index.htm

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Greg KH <greg@kroah.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-22 08:13:18 -07:00
..
acorn/char unicode diacritics support 2007-10-17 08:42:52 -07:00
acpi Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
amba
ata Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
atm Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
auxdisplay
base memory hotplug: rearrange memory hotplug notifier 2007-10-22 08:13:17 -07:00
block remove unused return within void return function 2007-10-20 02:18:21 +02:00
bluetooth
cdrom Use helpers to obtain task pid in printks 2007-10-19 11:53:43 -07:00
char Documentation: Remove references to dead "cyclades=" boot option 2007-10-20 00:01:12 +02:00
clocksource
connector
cpufreq
cpuidle
crypto
dca I/OAT: Add DCA services 2007-10-16 09:43:09 -07:00
dio
dma I/OAT: Add completion callback for async_tx interface use 2007-10-18 14:37:32 -07:00
edac NULL terminate the pci_device_ids in pasemi_edac 2007-10-19 11:53:56 -07:00
eisa signedness: module_param_array nump argument 2007-10-14 12:41:52 -07:00
fc4 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-10-15 08:19:33 -07:00
firewire fix typo "insted" -> "instead" 2007-10-20 01:55:04 +02:00
firmware define global BIT macro 2007-10-19 11:53:42 -07:00
hid changed email 2007-10-20 00:47:32 +02:00
hwmon Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
i2c typo fixes 2007-10-20 01:34:40 +02:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
ieee1394 ieee1394: ieee1394_core.c: use DEFINE_SPINLOCK for spinlock definition 2007-10-16 23:59:59 +02:00
infiniband [INET]: Justification for local port range robustness. 2007-10-18 22:00:17 -07:00
input Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
isdn Spelling fix: explicitly 2007-10-19 23:22:55 +02:00
kvm sched: guest CPU accounting: maintain guest state in KVM 2007-10-15 17:00:19 +02:00
leds fix typo "sort" -> "short" 2007-10-20 01:55:58 +02:00
lguest Merge branch 'xen-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen 2007-10-17 11:10:11 -07:00
macintosh Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
media more UTF-8 conversions 2007-10-19 23:22:11 +02:00
message Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
mfd typo fixes 2007-10-20 01:34:40 +02:00
misc typo fixes 2007-10-20 01:34:40 +02:00
mmc mmc: at91_mci: cleanup: use MCI_ERRORS 2007-10-17 21:35:10 +02:00
mtd typo fixes 2007-10-20 01:34:40 +02:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
nubus
of [SPARC/64]: Consolidate of_register_driver 2007-10-17 21:17:42 -07:00
oprofile
parisc [PARISC] Fix infinite loop in /proc/iomem 2007-10-18 12:34:22 -07:00
parport sysctl: parport remove binary paths 2007-10-18 14:37:23 -07:00
pci Intel IOMMU: DMAR detection and parsing logic 2007-10-22 08:13:18 -07:00
pcmcia remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
pnp PNP: add debug message for adding new device 2007-10-17 08:43:04 -07:00
power Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
ps3 remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
rapidio
rtc typo fixes 2007-10-20 01:34:40 +02:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
sbus vfc_dev conversion to mutex: fallout 2007-10-20 15:04:06 -07:00
scsi Spelling fix: explicitly 2007-10-19 23:22:55 +02:00
serial Blackfin serial driver Kconfig: depend on DMA not being enabled rather than a specific DMA size 2007-10-21 22:30:01 +08:00
sh
sn
spi Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
ssb [PATCH] ssb: fix build failure 2007-10-16 21:04:11 -04:00
tc lk201: remove obsolete driver 2007-10-17 08:42:57 -07:00
telephony
uio
usb typo fixes 2007-10-20 01:34:40 +02:00
video Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
w1 Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
watchdog Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
xen Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
zorro Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
Kconfig mv watchdog tree under drivers 2007-10-18 10:39:03 +00:00
Makefile Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2007-10-19 13:12:46 -07:00