[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v4 1/2] KVM: remove NULL return path for vcpu ids
From: |
Radim Krčmář |
Subject: |
Re: [Qemu-ppc] [PATCH v4 1/2] KVM: remove NULL return path for vcpu ids >= KVM_MAX_VCPUS |
Date: |
Wed, 27 Apr 2016 16:40:14 +0200 |
2016-04-27 05:40-0400, Gerg Kurz:
> Quoting Greg Kurz <address@hidden>:
>
>> Commit c896939f7cff ("KVM: use heuristic for fast VCPU lookup by id") added
>> a return path that prevents vcpu ids to exceed KVM_MAX_VCPUS. This is a
>> problem for powerpc where vcpu ids can grow up to 8*KVM_MAX_VCPUS.
>>
>> This patch simply reverses the logic so that we only try fast path if the
>> vcpu id can be tried as an index in kvm->vcpus[]. The slow path is not
>> affected by the change.
>>
>> Signed-off-by: Greg Kurz <address@hidden>
>> ---
>
> Radim,
>
> I think this sanity check is only needed because kvm_get_vcpu() use the
> id as an index in kvm->vcpus[]. Checking against the new KVM_MAX_VCPU_ID
> would be clearly wrong here.
I agree, checking KVM_MAX_VCPU_ID would be pointless.
> And this patch got two R-b tags already. Do you agree we keep it ?
Yes, thanks.
- [Qemu-ppc] [PATCH v4 0/2] let archs decide for vcpu ids, Greg Kurz, 2016/04/21
- [Qemu-ppc] [PATCH v4 1/2] KVM: remove NULL return path for vcpu ids >= KVM_MAX_VCPUS, Greg Kurz, 2016/04/21
- [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Greg Kurz, 2016/04/21
- Re: [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Radim Krčmář, 2016/04/21
- Re: [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Greg Kurz, 2016/04/21
- Re: [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Radim Krčmář, 2016/04/21
- Re: [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Greg Kurz, 2016/04/22
- Re: [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Cornelia Huck, 2016/04/22
- Re: [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Igor Mammedov, 2016/04/22
- Re: [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Radim Krčmář, 2016/04/22
- Re: [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Radim Krčmář, 2016/04/22
- Re: [Qemu-ppc] [PATCH v4 2/2] KVM: move vcpu id checking to archs, Greg Kurz, 2016/04/22