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

Re: [Xen-devel] [PATCH v5 5/7] VT-d: No need to set irq affinity for posted format IRTE



>>> On 11.10.16 at 02:57, <feng.wu@xxxxxxxxx> wrote:
> --- a/xen/drivers/passthrough/vtd/intremap.c
> +++ b/xen/drivers/passthrough/vtd/intremap.c
> @@ -547,6 +547,49 @@ static int remap_entry_to_msi_msg(
>      return 0;
>  }
>  
> +static bool_t pi_can_suppress_irte_update(struct iremap_entry *new,

bool (and true/false respectively) please.

And then the function name suggests that no modification gets done
here (and hence the first parameter could be const too), yet the
implementation does otherwise (and I don't understand why).

> +    const struct iremap_entry *old)
> +{
> +    bool_t ret = 1;
> +    u16 fpd, sid, sq, svt;
> +
> +    if ( !old->remap.p || !old->remap.im )
> +        return 0;
> +
> +    fpd = new->post.fpd;
> +    sid = new->post.sid;
> +    sq = new->post.sq;
> +    svt = new->post.svt;
> +
> +    *new = *old;
> +
> +    if ( fpd != old->post.fpd )
> +    {
> +        new->post.fpd = fpd;
> +        ret = 0;
> +    }
> +
> +    if ( sid != old->post.sid )
> +    {
> +        new->post.sid = sid;
> +        ret = 0;
> +    }
> +
> +    if ( sq != old->post.sq )
> +    {
> +        new->post.sq = sq;
> +        ret = 0;
> +    }
> +
> +    if ( svt != old->post.svt )
> +    {
> +        new->post.svt = svt;
> +        ret = 0;
> +    }

What's the selection of the fields based on? Namely, what about
vector, pda_l, and pda_h?

Jan


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

 


Rackspace

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