Messages in this thread | | | Date | Wed, 17 Jun 2015 18:11:19 +0200 | From | Paolo Bonzini <> | Subject | Re: [PATCH v2 11/15] KVM: MTRR: sort variable MTRRs |
| |
On 15/06/2015 10:55, Xiao Guangrong wrote: > + /* add it to the list if it's valid. */ > + if (var_mtrr_range_is_valid(&mtrr_state->var_ranges[index])) { > + list_for_each_entry(tmp, &mtrr_state->head, node) > + if (cur->base < tmp->base) > + list_add_tail(&cur->node, &tmp->node); > + list_add_tail(&cur->node, &mtrr_state->head);
Also, this loop looks weird. Is this what you wanted?
list_for_each_entry(tmp, &mtrr_state->head, node) if (cur->base >= tmp->base) break; list_add_tail(&cur->node, &tmp->node);
If so, can you look at kvm/queue and see if it is okay for you (so that we can get the series in 4.2)?
Paolo
> + } > +}
| |