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

Re: [Xen-devel] [PATCHv14 2/2] gnttab: steal maptrack entries from other VCPUs



>>> On 17.06.15 at 15:53, <david.vrabel@xxxxxxxxxx> wrote:
> +static int steal_maptrack_handle(struct grant_table *t,
> +                                 const struct vcpu *curr)
> +{
> +    const struct domain *currd = curr->domain;
> +    unsigned int first, i;
> +
> +    /* Find an initial victim. */
> +    first = i = get_random() % currd->max_vcpus;
> +
> +    do {
> +        if ( currd->vcpu[i] )
> +        {
> +            unsigned int handle;
> +
> +            handle = __get_maptrack_handle(t, currd->vcpu[i]);
> +            if ( handle >= 0 )

This comparison is always true. With handle's type fixed
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>


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