summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2008-09-11 10:24:48 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-19 12:59:21 +0200
commitbd60b735c658e6e8c656e89771d281bcfcf51279 (patch)
tree3587d684e56ed7e057d30b022fa1985990a08939 /include
parentb39ba6ad004a31bf2a08ba2b08c1e0f9b3530bb7 (diff)
downloadop-kernel-dev-bd60b735c658e6e8c656e89771d281bcfcf51279.zip
op-kernel-dev-bd60b735c658e6e8c656e89771d281bcfcf51279.tar.gz
AMD IOMMU: don't assign preallocated protection domains to devices
In isolation mode the protection domains for the devices are preallocated and preassigned. This is bad if a device should be passed to a virtualization guest because the IOMMU code does not know if it is in use by a driver. This patch changes the code to assign the device to the preallocated domain only if there are dma mapping requests for it. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/amd_iommu_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-x86/amd_iommu_types.h b/include/asm-x86/amd_iommu_types.h
index d8c5a6c..9aa22ea 100644
--- a/include/asm-x86/amd_iommu_types.h
+++ b/include/asm-x86/amd_iommu_types.h
@@ -227,6 +227,12 @@ struct dma_ops_domain {
/* This will be set to true when TLB needs to be flushed */
bool need_flush;
+
+ /*
+ * if this is a preallocated domain, keep the device for which it was
+ * preallocated in this variable
+ */
+ u16 target_dev;
};
/*
OpenPOWER on IntegriCloud