All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()
@ 2019-05-14 12:04 ` Jan Beulich
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2019-05-14 12:04 UTC (permalink / raw)
  To: xen-devel; +Cc: Kevin Tian, Paul Durrant

The function passes 0 as "alloc" argument to addr_to_dma_page_maddr(),
so -ENOMEM simply makes no sense (and its use was probably simply a
copy-and-paste effect originating at intel_iommu_map_page()).

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1870,7 +1870,7 @@ static int intel_iommu_lookup_page(struc
     if ( !pg_maddr )
     {
         spin_unlock(&hd->arch.mapping_lock);
-        return -ENOMEM;
+        return -ENOENT;
     }
 
     page = map_vtd_domain_page(pg_maddr);



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Xen-devel] [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()
@ 2019-05-14 12:04 ` Jan Beulich
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2019-05-14 12:04 UTC (permalink / raw)
  To: xen-devel; +Cc: Kevin Tian, Paul Durrant

The function passes 0 as "alloc" argument to addr_to_dma_page_maddr(),
so -ENOMEM simply makes no sense (and its use was probably simply a
copy-and-paste effect originating at intel_iommu_map_page()).

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1870,7 +1870,7 @@ static int intel_iommu_lookup_page(struc
     if ( !pg_maddr )
     {
         spin_unlock(&hd->arch.mapping_lock);
-        return -ENOMEM;
+        return -ENOENT;
     }
 
     page = map_vtd_domain_page(pg_maddr);



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()
@ 2019-05-14 12:16   ` Paul Durrant
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Durrant @ 2019-05-14 12:16 UTC (permalink / raw)
  To: 'Jan Beulich', xen-devel; +Cc: Kevin Tian

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 14 May 2019 05:04
> To: xen-devel <xen-devel@lists.xenproject.org>
> Cc: Paul Durrant <Paul.Durrant@citrix.com>; Kevin Tian <kevin.tian@intel.com>
> Subject: [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()
> 
> The function passes 0 as "alloc" argument to addr_to_dma_page_maddr(),
> so -ENOMEM simply makes no sense (and its use was probably simply a
> copy-and-paste effect originating at intel_iommu_map_page()).
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

> 
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -1870,7 +1870,7 @@ static int intel_iommu_lookup_page(struc
>      if ( !pg_maddr )
>      {
>          spin_unlock(&hd->arch.mapping_lock);
> -        return -ENOMEM;
> +        return -ENOENT;
>      }
> 
>      page = map_vtd_domain_page(pg_maddr);
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()
@ 2019-05-14 12:16   ` Paul Durrant
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Durrant @ 2019-05-14 12:16 UTC (permalink / raw)
  To: 'Jan Beulich', xen-devel; +Cc: Kevin Tian

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 14 May 2019 05:04
> To: xen-devel <xen-devel@lists.xenproject.org>
> Cc: Paul Durrant <Paul.Durrant@citrix.com>; Kevin Tian <kevin.tian@intel.com>
> Subject: [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()
> 
> The function passes 0 as "alloc" argument to addr_to_dma_page_maddr(),
> so -ENOMEM simply makes no sense (and its use was probably simply a
> copy-and-paste effect originating at intel_iommu_map_page()).
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

> 
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -1870,7 +1870,7 @@ static int intel_iommu_lookup_page(struc
>      if ( !pg_maddr )
>      {
>          spin_unlock(&hd->arch.mapping_lock);
> -        return -ENOMEM;
> +        return -ENOENT;
>      }
> 
>      page = map_vtd_domain_page(pg_maddr);
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()
@ 2019-05-28  5:29   ` Tian, Kevin
  0 siblings, 0 replies; 6+ messages in thread
From: Tian, Kevin @ 2019-05-28  5:29 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Paul Durrant

> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Tuesday, May 14, 2019 8:04 PM
> 
> The function passes 0 as "alloc" argument to addr_to_dma_page_maddr(),
> so -ENOMEM simply makes no sense (and its use was probably simply a
> copy-and-paste effect originating at intel_iommu_map_page()).
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 

Acked-by: Kevin Tian <kevin.tian@intel.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()
@ 2019-05-28  5:29   ` Tian, Kevin
  0 siblings, 0 replies; 6+ messages in thread
From: Tian, Kevin @ 2019-05-28  5:29 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Paul Durrant

> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Tuesday, May 14, 2019 8:04 PM
> 
> The function passes 0 as "alloc" argument to addr_to_dma_page_maddr(),
> so -ENOMEM simply makes no sense (and its use was probably simply a
> copy-and-paste effect originating at intel_iommu_map_page()).
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 

Acked-by: Kevin Tian <kevin.tian@intel.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-05-28  5:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-14 12:04 [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page() Jan Beulich
2019-05-14 12:04 ` [Xen-devel] " Jan Beulich
2019-05-14 12:16 ` Paul Durrant
2019-05-14 12:16   ` [Xen-devel] " Paul Durrant
2019-05-28  5:29 ` Tian, Kevin
2019-05-28  5:29   ` [Xen-devel] " Tian, Kevin

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.