diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2014-01-06 14:18:08 +0800 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2014-01-07 17:16:19 +0100 |
commit | 360eb3c5687e2df23e29e97878238765bfe6a756 (patch) | |
tree | 6c97eb6de7e35cf4e3f552de8f20d7c3b1926787 /include/linux/intel-iommu.h | |
parent | dbad086433af81513c84678070522455fefebe2a (diff) | |
download | linux-stable-360eb3c5687e2df23e29e97878238765bfe6a756.tar.gz linux-stable-360eb3c5687e2df23e29e97878238765bfe6a756.tar.bz2 linux-stable-360eb3c5687e2df23e29e97878238765bfe6a756.zip |
iommu/vt-d: use dedicated bitmap to track remapping entry allocation status
Currently Intel interrupt remapping drivers uses the "present" flag bit
in remapping entry to track whether an entry is allocated or not.
It works as follow:
1) allocate a remapping entry and set its "present" flag bit to 1
2) compose other fields for the entry
3) update the remapping entry with the composed value
The remapping hardware may access the entry between step 1 and step 3,
which then observers an entry with the "present" flag set but random
values in all other fields.
This patch introduces a dedicated bitmap to track remapping entry
allocation status instead of sharing the "present" flag with hardware,
thus eliminate the race window. It also simplifies the implementation.
Tested-and-reviewed-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'include/linux/intel-iommu.h')
-rw-r--r-- | include/linux/intel-iommu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index d380c5e68008..de1e5e936420 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h @@ -288,6 +288,7 @@ struct q_inval { struct ir_table { struct irte *base; + unsigned long *bitmap; }; #endif |