Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1211829
| From | "Xiao, Nan (Nan@HPS Performance, Beijing)" <nan.xiao@hp.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] Fix bug in iommu_context_addr: Always get pointer to lower extended-context-table |
| Date | 2015-08-24 08:30 +0200 |
| Message-ID | <q0Tqx-7Zp-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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 <nan.xiao@hp.com>
---
drivers/iommu/intel-iommu.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 0649b94..4213598 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -759,10 +759,11 @@ static inline struct context_entry *iommu_context_addr(struct intel_iommu *iommu
if (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 {
--
2.4.3
Best Regards
Nan Xiao
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] Fix bug in iommu_context_addr: Always get pointer to lower extended-context-table "Xiao, Nan (Nan@HPS Performance, Beijing)" <nan.xiao@hp.com> - 2015-08-24 08:30 +0200
RE: [PATCH] Fix bug in iommu_context_addr: Always get pointer to lower extended-context-table "Xiao, Nan (Nan@HPservers-Core-OE-PSC)" <nan.xiao@hp.com> - 2015-08-25 10:50 +0200
Re: [PATCH] Fix bug in iommu_context_addr: Always get pointer to lower extended-context-table "joro@8bytes.org" <joro@8bytes.org> - 2015-08-25 11:10 +0200
RE: [PATCH] Fix bug in iommu_context_addr: Always get pointer to lower extended-context-table "Xiao, Nan (Nan@HPservers-Core-OE-PSC)" <nan.xiao@hp.com> - 2015-08-25 11:20 +0200
Re: [PATCH] Fix bug in iommu_context_addr: Always get pointer to lower extended-context-table "joro@8bytes.org" <joro@8bytes.org> - 2015-08-25 11:50 +0200
Re: [PATCH] Fix bug in iommu_context_addr: Always get pointer to lower extended-context-table "joro@8bytes.org" <joro@8bytes.org> - 2015-08-25 10:50 +0200
csiph-web