Fix bug in iommu_context_addr: Always get pointer to lower extended-context-table
PATCH 1/1 Fix bug in iommu_context_addr: Always get pointer to lower extended-context-table
Hi David & Joerg,
In iommu_context_addr() function, we always use lower extended-context-table even though upper-half of the extended root-entry is present.
Signed-off-by Nan Xiao <[email protected]>
--- drivers/iommu/intel-iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/iommu/intel-iommu.c +4 -3
@@ -759,10 +759,11 @@ static inline struct context_entry *iommu_context_addr(struct intel_iommu *iommuif (devfn >=0x80 ) { devfn -=0x80 ; entry = &root->hi; - } + }else + entry = &root->lo; devfn *=2 ; - } - entry = &root->lo; + }else + entry = &root->lo;if (*entry &1 ) context =phys_to_virt (*entry &VTD_PAGE_MASK );else {
Signature · 4 lines
2.4.3 Best Regards Nan Xiao