Received: from eggs.gnu.org ([2001:4830:134:3::10]:54414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpGEh-0006VZ-Sz for qemu-devel@nongnu.org; Mon, 04 May 2015 09:16:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpGEe-0006Oc-EY for qemu-devel@nongnu.org; Mon, 04 May 2015 09:16:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpGEe-0006OX-6y for qemu-devel@nongnu.org; Mon, 04 May 2015 09:16:36 -0400 Date: Mon, 4 May 2015 15:16:16 +0200 From: Igor Mammedov Message-ID: <20150504151616.1c93e84f@igors-macbook-pro.local> In-Reply-To: <55474318.8090501@redhat.com> References: <1430421547-18278-1-git-send-email-ehabkost@redhat.com> <20150504114728.0dd227dd@nial.brq.redhat.com> <55474318.8090501@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] cpu: Register QOM links at /machine/cpus/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, mimu@linux.vnet.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, bharata@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, david@gibson.dropbear.id.au, Andreas =?UTF-8?Q?F=C3=A4rber?= , Eduardo Habkost On Mon, 04 May 2015 11:59:52 +0200 Paolo Bonzini wrote: > > > On 04/05/2015 11:47, Igor Mammedov wrote: > > On Thu, 30 Apr 2015 16:19:07 -0300 > > Eduardo Habkost wrote: > > > > > This will provide a predictable path for the CPU objects, and a > > > more powerful alternative for the query-cpus QMP command, as now > > > every QOM property on CPU objects can be easily queried. > > > > provided the way cpu_index is generated, path won't be > > predictable/stable with CPU unplug. I'd rather use DEVICE->id > > instead of cpu_index. > > Can we use the APIC id then? Perhaps wrapped with a CPUState-level > method get_stable_processor_id()? We have CPUClass->get_arch_id() which results in APIC id for target-i386. But I'd rather see an arbitrary DEVICE->id as index/name, that way when -device cpu-foo,id=cpuXXX becomes functional we would have 1:1 mapping between CLI and /machine/cpus/ view. > > Paolo