[PATCH 4/4] KVM: Use common function for VCPU lookup by id

2015-11-19 Thread Christian Borntraeger
From: David Hildenbrand Let's reuse the new common function for VPCU lookup by id. Reviewed-by: Christian Borntraeger Reviewed-by: Dominik Dingel Signed-off-by: David Hildenbrand

[PATCH 2/4] KVM: s390: fix wrong lookup of VCPUs by array index

2015-11-19 Thread Christian Borntraeger
From: David Hildenbrand For now, VCPUs were always created sequentially with incrementing VCPU ids. Therefore, the index in the VCPUs array matched the id. As sequential creation might change with cpu hotplug, let's use the correct lookup function to find a VCPU by id,

[PATCH 1/4] KVM: Provide function for VCPU lookup by id

2015-11-19 Thread Christian Borntraeger
From: David Hildenbrand Let's provide a function to lookup a VCPU by id. Reviewed-by: Christian Borntraeger Reviewed-by: Dominik Dingel Signed-off-by: David Hildenbrand Signed-off-by:

[PATCH 0/4] Preview: vcpu lookup by id changes

2015-11-19 Thread Christian Borntraeger
Paolo, some more patches for review before I add them in my next pull request. Can you review the common code changes and Ack/Nack? Alex, Paul, can you review the power changes and Ack/Nack? As I want to have patch 2 in 4.4, I splitted up Davids patch into smaller chunks. David, can you double

[PATCH 3/4] KVM: use heuristic for fast VCPU lookup by id

2015-11-19 Thread Christian Borntraeger
From: David Hildenbrand Usually, VCPU ids match the array index. So let's try a fast lookup first before falling back to the slow iteration. Suggested-by: Christian Borntraeger Reviewed-by: Dominik Dingel Reviewed-by:

Re: [PATCH 0/4] Preview: vcpu lookup by id changes

2015-11-19 Thread Paolo Bonzini
On 19/11/2015 09:37, Christian Borntraeger wrote: > > some more patches for review before I add them in my next pull request. > Can you review the common code changes and Ack/Nack? > > Alex, Paul, > can you review the power changes and Ack/Nack? > > As I want to have patch 2 in 4.4, I

Re: [PATCH 0/4] Preview: vcpu lookup by id changes

2015-11-19 Thread Christian Borntraeger
On 11/19/2015 10:38 AM, Paolo Bonzini wrote: > > > On 19/11/2015 09:37, Christian Borntraeger wrote: >> >> some more patches for review before I add them in my next pull request. >> Can you review the common code changes and Ack/Nack? >> >> Alex, Paul, >> can you review the power changes and

Re: [PATCH 0/4] Preview: vcpu lookup by id changes

2015-11-19 Thread Paolo Bonzini
On 19/11/2015 10:51, Christian Borntraeger wrote: > > I can apply patch 1 and 2 now to kvm/master. By the time kvm/next forks > > from Linus's tree (sometime next week, since kvm/queue is already > > largish) they will be in. > > I have 2or 3 more patches for 4.4 and I will prepare a pull

Re: [PATCH 2/4] KVM: s390: fix wrong lookup of VCPUs by array index

2015-11-19 Thread Christian Borntraeger
Sigh. Seems that my mail script got confused by the # after stable. So please strip down the cc list. On 11/19/2015 09:37 AM, Christian Borntraeger wrote: > From: David Hildenbrand > > For now, VCPUs were always created sequentially with incrementing > VCPU ids.

Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id

2015-11-19 Thread Thomas Huth
On 19/11/15 09:37, Christian Borntraeger wrote: > From: David Hildenbrand > > Let's provide a function to lookup a VCPU by id. > > Reviewed-by: Christian Borntraeger > Reviewed-by: Dominik Dingel > Signed-off-by:

Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id

2015-11-19 Thread David Hildenbrand
> > Any chance that you name this function differently? Otherwise we've got > two functions that sound very similar and also have similar prototypes: > > - kvm_get_vcpu(struct kvm *kvm, int i) > - kvm_lookup_vcpu(struct kvm *kvm, int id) > > I'm pretty sure this will cause confusion in the

Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id

2015-11-19 Thread Paolo Bonzini
On 19/11/2015 13:55, David Hildenbrand wrote: >> > >> > I'm pretty sure this will cause confusion in the future! >> > ==> Could you maybe name the new function something like >> > "kvm_lookup_vcpu_by_id" or "kvm_get_vcpu_by_id" instead? > Had that in a previous version but decided to name it

Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id

2015-11-19 Thread Christian Borntraeger
On 11/19/2015 02:13 PM, Paolo Bonzini wrote: > > > On 19/11/2015 13:55, David Hildenbrand wrote: I'm pretty sure this will cause confusion in the future! ==> Could you maybe name the new function something like "kvm_lookup_vcpu_by_id" or "kvm_get_vcpu_by_id" instead? >> Had

Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id

2015-11-19 Thread David Hildenbrand
> On 11/19/2015 02:13 PM, Paolo Bonzini wrote: > > > > > > On 19/11/2015 13:55, David Hildenbrand wrote: > > I'm pretty sure this will cause confusion in the future! > ==> Could you maybe name the new function something like > "kvm_lookup_vcpu_by_id" or "kvm_get_vcpu_by_id"