>>> On 20.11.15 at 10:55, <paul.durr...@citrix.com> wrote: > + /* > + * For each specified virtual CPU flush all ASIDs to invalidate > + * TLB entries the next time it is scheduled and then, if it > + * is currently running, add its physical CPU to a mask of > + * those which need to be interrupted to force a flush. > + */ > + for_each_vcpu ( currd, v ) > + { > + if ( v->vcpu_id >= (sizeof(input_params.vcpu_mask) * 8) ) > + break; > + > + if ( !(input_params.vcpu_mask & (1ul << v->vcpu_id)) ) > + continue;
The code is correct as is (for the time being at least, i.e. no strict need for a v6), but I'd nevertheless like to note that range check and shift still aren't in line with one another: You'd need to use (typeof(input_params.vcpu_mask))1 instead of 1ul for there to be a full match (or if ( !((input_params.vcpu_mask >> v->vcpu_id) & 1) ) ). Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel