From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Greg Kurz <gkurz@linux.vnet.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
james.hogan@imgtec.com, mingo@redhat.com,
linux-mips@linux-mips.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org,
David Hildenbrand <dahi@linux.vnet.ibm.com>,
qemu-ppc@nongnu.org, Cornelia Huck <cornelia.huck@de.ibm.com>,
Paul Mackerras <paulus@samba.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH v4 1/2] KVM: remove NULL return path for vcpu ids >= KVM_MAX_VCPUS
Date: Wed, 27 Apr 2016 16:40:14 +0200 [thread overview]
Message-ID: <20160427144010.GA27247@potion> (raw)
In-Reply-To: <20160427054052.Horde.SSxGXKxS_wcijUfLJchjWw2@ltc.linux.ibm.com>
2016-04-27 05:40-0400, Gerg Kurz:
> Quoting Greg Kurz <gkurz@linux.vnet.ibm.com>:
>
>> 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 <gkurz@linux.vnet.ibm.com>
>> ---
>
> 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.
next prev parent reply other threads:[~2016-04-27 14:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 14:14 [PATCH v4 0/2] let archs decide for vcpu ids Greg Kurz
2016-04-21 14:15 ` [PATCH v4 1/2] KVM: remove NULL return path for vcpu ids >= KVM_MAX_VCPUS Greg Kurz
2016-04-21 14:17 ` David Hildenbrand
2016-04-21 14:30 ` Greg Kurz
2016-04-26 7:44 ` Cornelia Huck
2016-04-27 9:40 ` Gerg Kurz
2016-04-27 14:40 ` Radim Krčmář [this message]
2016-04-21 14:20 ` [PATCH v4 2/2] KVM: move vcpu id checking to archs Greg Kurz
2016-04-21 16:00 ` Radim Krčmář
2016-04-21 16:45 ` Greg Kurz
2016-04-21 17:36 ` Radim Krčmář
2016-04-22 9:25 ` Greg Kurz
2016-04-22 10:22 ` Cornelia Huck
2016-04-22 11:19 ` Igor Mammedov
2016-04-22 13:48 ` Radim Krčmář
2016-04-22 13:40 ` Radim Krčmář
2016-04-22 14:50 ` Greg Kurz
2016-04-25 14:15 ` Radim Krčmář
2016-04-25 14:30 ` Greg Kurz
2016-04-22 9:21 ` Wei Yang
2016-04-22 9:30 ` Greg Kurz
2016-04-23 0:51 ` Wei Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160427144010.GA27247@potion \
--to=rkrcmar@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=dahi@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=gkurz@linux.vnet.ibm.com \
--cc=james.hogan@imgtec.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=pbonzini@redhat.com \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).