All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] iommu: add a dma remap fault reason.
@ 2013-03-06  2:43 Li, Zhen-Hua
  2013-03-06  9:03 ` [tip:x86/urgent] iommu, x86: Add DMA " tip-bot for Li, Zhen-Hua
  2013-03-07 18:31   ` Don Dutile
  0 siblings, 2 replies; 7+ messages in thread
From: Li, Zhen-Hua @ 2013-03-06  2:43 UTC (permalink / raw)
  To: linux-kernel, Joerg Roedel, Ingo Molnar, Donald Dutile,
	Suresh Siddha, Hannes Reinecke
  Cc: Li, Zhen-Hua

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.

Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com>
---
 drivers/iommu/dmar.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index dc7e478..e5cdaf8 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -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[] =
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [tip:x86/urgent] iommu, x86: Add DMA remap fault reason
  2013-03-06  2:43 [PATCH 1/1] iommu: add a dma remap fault reason Li, Zhen-Hua
@ 2013-03-06  9:03 ` tip-bot for Li, Zhen-Hua
  2013-03-07 18:31   ` Don Dutile
  1 sibling, 0 replies; 7+ messages in thread
From: tip-bot for Li, Zhen-Hua @ 2013-03-06  9:03 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, joro, ddutile, zhen-hual, hare,
	suresh.b.siddha, tglx

Commit-ID:  4ecccd9edd5eb4dd185486e6e593c671484691bc
Gitweb:     http://git.kernel.org/tip/4ecccd9edd5eb4dd185486e6e593c671484691bc
Author:     Li, Zhen-Hua <zhen-hual@hp.com>
AuthorDate: Wed, 6 Mar 2013 10:43:17 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
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.

Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Donald Dutile <ddutile@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Hannes Reinecke <hare@suse.de>
Link: http://lkml.kernel.org/r/1362537797-6034-1-git-send-email-zhen-hual@hp.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/iommu/dmar.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index dc7e478..e5cdaf8 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -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[] =

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] iommu: add a dma remap fault reason.
@ 2013-03-07 18:31   ` Don Dutile
  0 siblings, 0 replies; 7+ messages in thread
From: Don Dutile @ 2013-03-07 18:31 UTC (permalink / raw)
  To: Li, Zhen-Hua, iommu
  Cc: linux-kernel, Joerg Roedel, Ingo Molnar, Suresh Siddha, Hannes Reinecke

cc-ing the upstream iommu-list

On 03/05/2013 09:43 PM, Li, Zhen-Hua wrote:
> 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.
>
> Signed-off-by: Li, Zhen-Hua<zhen-hual@hp.com>
> ---
>   drivers/iommu/dmar.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
> index dc7e478..e5cdaf8 100644
> --- a/drivers/iommu/dmar.c
> +++ b/drivers/iommu/dmar.c
> @@ -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[] =


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] iommu: add a dma remap fault reason.
@ 2013-03-07 18:31   ` Don Dutile
  0 siblings, 0 replies; 7+ messages in thread
From: Don Dutile @ 2013-03-07 18:31 UTC (permalink / raw)
  To: Li, Zhen-Hua, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: Hannes Reinecke, Suresh Siddha,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ingo Molnar

cc-ing the upstream iommu-list

On 03/05/2013 09:43 PM, Li, Zhen-Hua wrote:
> 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.
>
> Signed-off-by: Li, Zhen-Hua<zhen-hual-VXdhtT5mjnY@public.gmane.org>
> ---
>   drivers/iommu/dmar.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
> index dc7e478..e5cdaf8 100644
> --- a/drivers/iommu/dmar.c
> +++ b/drivers/iommu/dmar.c
> @@ -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[] =

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] iommu: add a dma remap fault reason.
@ 2013-03-07 21:36     ` Don Dutile
  0 siblings, 0 replies; 7+ messages in thread
From: Don Dutile @ 2013-03-07 21:36 UTC (permalink / raw)
  To: Li, Zhen-Hua, iommu
  Cc: Hannes Reinecke, Suresh Siddha, linux-kernel, Ingo Molnar

On 03/07/2013 01:31 PM, Don Dutile wrote:
> cc-ing the upstream iommu-list
>
> On 03/05/2013 09:43 PM, Li, Zhen-Hua wrote:
>> 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.
>>
>> Signed-off-by: Li, Zhen-Hua<zhen-hual@hp.com>
>> ---
>> drivers/iommu/dmar.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
>> index dc7e478..e5cdaf8 100644
>> --- a/drivers/iommu/dmar.c
>> +++ b/drivers/iommu/dmar.c
>> @@ -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[] =
>

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
> _______________________________________________
> iommu mailing list
> iommu@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] iommu: add a dma remap fault reason.
@ 2013-03-07 21:36     ` Don Dutile
  0 siblings, 0 replies; 7+ messages in thread
From: Don Dutile @ 2013-03-07 21:36 UTC (permalink / raw)
  To: Li, Zhen-Hua, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: Ingo Molnar, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Hannes Reinecke, Suresh Siddha

On 03/07/2013 01:31 PM, Don Dutile wrote:
> cc-ing the upstream iommu-list
>
> On 03/05/2013 09:43 PM, Li, Zhen-Hua wrote:
>> 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.
>>
>> Signed-off-by: Li, Zhen-Hua<zhen-hual-VXdhtT5mjnY@public.gmane.org>
>> ---
>> drivers/iommu/dmar.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
>> index dc7e478..e5cdaf8 100644
>> --- a/drivers/iommu/dmar.c
>> +++ b/drivers/iommu/dmar.c
>> @@ -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[] =
>

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
> _______________________________________________
> iommu mailing list
> iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/1] iommu: add a dma remap fault reason.
@ 2013-03-04  1:10 Li, Zhen-Hua
  0 siblings, 0 replies; 7+ messages in thread
From: Li, Zhen-Hua @ 2013-03-04  1:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Li, Zhen-Hua

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.

Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com>
---
 drivers/iommu/dmar.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index dc7e478..e5cdaf8 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -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[] =
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-07 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06  2:43 [PATCH 1/1] iommu: add a dma remap fault reason Li, Zhen-Hua
2013-03-06  9:03 ` [tip:x86/urgent] iommu, x86: Add DMA " tip-bot for Li, Zhen-Hua
2013-03-07 18:31 ` [PATCH 1/1] iommu: add a dma " Don Dutile
2013-03-07 18:31   ` Don Dutile
2013-03-07 21:36   ` Don Dutile
2013-03-07 21:36     ` Don Dutile
  -- strict thread matches above, loose matches on Subject: below --
2013-03-04  1:10 Li, Zhen-Hua

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.