]> git.hungrycats.org Git - linux/commit
x86/amd-iommu: attach devices to pre-allocated domains early
authorJoerg Roedel <joerg.roedel@amd.com>
Mon, 23 Nov 2009 11:50:00 +0000 (12:50 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 21:43:38 +0000 (13:43 -0800)
commit8126ef0cb78bd3c269566b275e631a4c94f0bede
treefc974ce2ee8d73acfb812314164a2650698ded5b
parentba585c2b49ddcbfe80d59f7e85251da800dea5d9
x86/amd-iommu: attach devices to pre-allocated domains early

commit be831297716036de5b24308447ecb69f1706a846 upstream.

For some devices the ACPI table may define unity map
requirements which must me met when the IOMMU is enabled. So
we need to attach devices to their domains as early as
possible so that these mappings are in place when needed.
This patch assigns the domains right after they are
allocated. Otherwise this can result in I/O page faults
before a driver binds to a device and BIOS is still using
it.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/amd_iommu.c