iommu: add a dma remap fault reason.
PATCH 1/1 iommu: add a dma remap fault reason.
The number of dma fault reasons in intel's document are from 1 to 0xD, but in dmar.c I cannot find fault reason 0xD.
In this document:
Intel Virtualization Technology for Directed I/O Architecture Specification
http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Direct_IO.pdf
Chapter 4. Support For Device-IOTLBs
Table 6. Unsuccessful Translated Requests
There is fault reason for 0xD not listed in kernel:
Present context-entry used to process translation request specifies blocking of Translation Requests (Translation Type (T) field value not equal to 01b).
So I think 0xD should be added.
--- drivers/iommu/dmar.c | 1 + 1 file changed, 1 insertion(+)
drivers/iommu/dmar.c +1 -0
@@ -1083,6 +1083,7 @@ static const char *dma_remap_fault_reasons[] ="non-zero reserved fields in RTP" ,"non-zero reserved fields in CTP" ,"non-zero reserved fields in PTE" , + "PCE for translation request specifies blocking", }; static const char *irq_remap_fault_reasons[] =
Signature · 1 line
1.7.10.4
tip-bot for Li, Zhen-Hua
merge bot[tip:x86/urgent] iommu, x86: Add DMA remap fault reason
iommu, x86: Add DMA remap fault reason
Commit-ID: 4ecccd9edd5eb4dd185486e6e593c671484691bc Gitweb: http://git.kernel.org/tip/4ecccd9edd5eb4dd185486e6e593c671484691bc Author: Li, Zhen-Hua <[email protected]> AuthorDate: Wed, 6 Mar 2013 10:43:17 +0800 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 6 Mar 2013 09:41:51 +0100
iommu, x86: Add DMA remap fault reason
The number of DMA fault reasons in intel's document are from 1 to 0xD, but in dmar.c fault reason 0xD is not printed out.
In this document:
"Intel Virtualization Technology for Directed I/O Architecture Specification"
http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Direct_IO.pdf
Chapter 4. Support For Device-IOTLBs
Table 6. Unsuccessful Translated Requests
There is fault reason for 0xD not listed in kernel:
Present context-entry used to process translation request specifies blocking of Translation Requests (Translation Type (T) field value not equal to 01b).
This patch adds reason 0xD as well.
--- drivers/iommu/dmar.c | 1 + 1 file changed, 1 insertion(+)
drivers/iommu/dmar.c +1 -0
@@ -1083,6 +1083,7 @@ static const char *dma_remap_fault_reasons[] ="non-zero reserved fields in RTP" ,"non-zero reserved fields in CTP" ,"non-zero reserved fields in PTE" , + "PCE for translation request specifies blocking", }; static const char *irq_remap_fault_reasons[] =
cc-ing the upstream iommu-list
Quoted 34 lines · Zhen-Hua
The number of dma fault reasons in intel's document are from 1 to
0xD, but indmar.cI cannot find fault reason0xD.In this document:
Intel Virtualization Technology for Directed I/O Architecture Specification
http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Direct_IO.pdfChapter 4. Support For Device-IOTLBs
Table 6. Unsuccessful Translated Requests
There is fault reason for
0xDnot listed in kernel:
Present context-entry used to process translation request specifies blocking of Translation Requests (Translation Type (T) field value not equal to 01b).So I think
0xDshould be added.Signed-off-by Li, Zhen-Hua<[email protected]>--- drivers/iommu/dmar.c | 1 + 1 file changed, 1 insertion(+)drivers/iommu/dmar.c +1
-0@@ -1083,6 +1083,7 @@ static const char *dma_remap_fault_reasons[] ="non-zero reserved fields in RTP" ,"non-zero reserved fields in CTP" ,"non-zero reserved fields in PTE" , + "PCE for translation request specifies blocking", }; static const char *irq_remap_fault_reasons[] =
Quoted 36 lines · Don Dutile
cc-ing the upstream iommu-list
Quoted 33 lines · Zhen-Hua
The number of dma fault reasons in intel's document are from 1 to
0xD, but indmar.cI cannot find fault reason0xD.In this document:
Intel Virtualization Technology for Directed I/O Architecture Specification
http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Direct_IO.pdfChapter 4. Support For Device-IOTLBs
Table 6. Unsuccessful Translated Requests
There is fault reason for
0xDnot listed in kernel:
Present context-entry used to process translation request specifies blocking of Translation Requests (Translation Type (T) field value not equal to 01b).So I think
0xDshould be added.Signed-off-by Li, Zhen-Hua<[email protected]>---
drivers/iommu/dmar.c| 1 +1 file changed, 1 insertion(+)drivers/iommu/dmar.c +1
-0@@ -1083,6 +1083,7 @@ static const char *dma_remap_fault_reasons[] ="non-zero reserved fields in RTP" ,"non-zero reserved fields in CTP" ,"non-zero reserved fields in PTE" , + "PCE for translation request specifies blocking", };
Quoted 2 lines
Quoted 1 line
static const char *irq_remap_fault_reasons[] =
Yes, the multiple tables, some short, some long, duplicating error codes, and in this case, putting it out of order, helped this case!
btw -- Suresh not at intel any longer (email bounces)
So, patch looks good to me. Although, I don't know of any code that actually sets a translation to 'block translation'.... but for completeness, rest of code does range checking & sizing such that it's doing the right thing.
The only other thing I can surmize from the dmar.c file is if one of these faults occurred, an 'unknown error' would have been outputted.
cheers.. Don
Quoted 4 lines
_______________________________________________
iommu mailing list iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu