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

Re: [Xen-devel] [PATCH v3 10/10] vt-d: propagate error up to ME phantom function mapping and unmapping



> From: Xu, Quan
> Sent: Friday, April 29, 2016 5:25 PM
> diff --git a/xen/drivers/passthrough/vtd/iommu.c
> b/xen/drivers/passthrough/vtd/iommu.c
> index cf847ec..bfee299 100644
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -1301,7 +1301,7 @@ int domain_context_mapping_one(
>      u64 maddr, pgd_maddr;
>      u16 seg = iommu->intel->drhd->segment;
>      int agaw;
> -    int rc;
> +    int rc, ret;
> 
>      ASSERT(pcidevs_locked());
>      spin_lock(&iommu->lock);
> @@ -1435,7 +1435,12 @@ int domain_context_mapping_one(
>      unmap_vtd_domain_page(context_entries);
> 
>      if ( !seg )
> -        me_wifi_quirk(domain, bus, devfn, MAP_ME_PHANTOM_FUNC);
> +    {
> +        ret = me_wifi_quirk(domain, bus, devfn, MAP_ME_PHANTOM_FUNC);
> +
> +        if ( !rc && unlikely(ret) )
> +            rc = ret;
> +    }

similarly to make it simple no need to check ret again.

> 
>      return rc;
>  }


Thanks
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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