Re: [PATCH v2 11/15] KVM: MTRR: sort variable MTRRs

2015-06-23 Thread Xiao Guangrong
On 06/23/2015 04:00 PM, Paolo Bonzini wrote: On 23/06/2015 04:29, Xiao Guangrong wrote: 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)? Ping? If I don't get testing results before Wednesday, I'll drop this series from the 4.2 pull r

Re: [PATCH v2 11/15] KVM: MTRR: sort variable MTRRs

2015-06-23 Thread Paolo Bonzini
On 23/06/2015 04:29, Xiao Guangrong wrote: >>> >>> >>> 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)? >> >> Ping? >> >> If I don't get testing results before Wednesday, I'll drop this series >> from the 4.2 pull request. > > Paolo, sorr

Re: [PATCH v2 11/15] KVM: MTRR: sort variable MTRRs

2015-06-22 Thread Xiao Guangrong
On 06/22/2015 07:24 PM, Paolo Bonzini wrote: On 17/06/2015 18:11, Paolo Bonzini wrote: 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

Re: [PATCH v2 11/15] KVM: MTRR: sort variable MTRRs

2015-06-22 Thread Paolo Bonzini
On 17/06/2015 18:11, Paolo Bonzini wrote: > 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

Re: [PATCH v2 11/15] KVM: MTRR: sort variable MTRRs

2015-06-17 Thread Paolo Bonzini
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) > +

Re: [PATCH v2 11/15] KVM: MTRR: sort variable MTRRs

2015-06-17 Thread Paolo Bonzini
On 15/06/2015 10:55, Xiao Guangrong wrote: > Sort all valid variable MTRRs based on its base address, it will help us to > check a range to see if it's fully contained in variable MTRRs > > Signed-off-by: Xiao Guangrong > --- > arch/x86/include/asm/kvm_host.h | 3 ++ > arch/x86/kvm/mtrr.c

[PATCH v2 11/15] KVM: MTRR: sort variable MTRRs

2015-06-15 Thread Xiao Guangrong
Sort all valid variable MTRRs based on its base address, it will help us to check a range to see if it's fully contained in variable MTRRs Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_host.h | 3 ++ arch/x86/kvm/mtrr.c | 63 ++--- ar