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

Re: [Xen-devel] [Patch RFC 13/13] vt-d: Set the IF bit in Invalidation Wait Descriptor When submit Device-TLB



>>> On 16.09.15 at 15:24, <quan.xu@xxxxxxxxx> wrote:
> @@ -322,6 +330,15 @@ static int flush_context_qi(
>      return ret;
>  }
>  
> +static int invalidate_async(struct iommu *iommu, u16 device_id)
> +{
> +    struct qi_ctrl *qi_ctrl = iommu_qi_ctrl(iommu);
> +
> +    if ( qi_ctrl->qinval_maddr )
> +        return queue_invalidate_wait(iommu, 1, 1, 1, device_id);
> +    return 0;

Is this meant to be a success or an error indication (afaict it ought
to be the latter, but the function isn't returning bool_t).

> @@ -360,8 +377,13 @@ static int flush_iotlb_qi(
>                                 type >> DMA_TLB_FLUSH_GRANU_OFFSET, dr,
>                                 dw, did, size_order, 0, addr);
>          if ( flush_dev_iotlb )
> +        {
>              ret = dev_invalidate_iotlb(iommu, did, addr, size_order, type);
> -        rc = invalidate_sync(iommu);
> +            rc = invalidate_async(iommu, did);
> +        } else {

Coding style.

Jan


_______________________________________________
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®.