[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()


  • To: 'Jan Beulich' <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Tue, 14 May 2019 12:16:53 +0000
  • Accept-language: en-GB, en-US
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Tue, 14 May 2019 12:17:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVCk0xFryF4JGVP02BPQ8eKy4TM6ZqiP9A
  • Thread-topic: [PATCH] VT-d: change bogus return value of intel_iommu_lookup_page()

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 14 May 2019 05:04
> To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
> Cc: Paul Durrant <Paul.Durrant@xxxxxxxxxx>; Kevin Tian <kevin.tian@xxxxxxxxx>
> 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@xxxxxxxx>

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

> 
> --- 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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.