From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpGHo-0007iM-U2 for qemu-devel@nongnu.org; Mon, 04 May 2015 09:19:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpGHl-0007gh-El for qemu-devel@nongnu.org; Mon, 04 May 2015 09:19:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpGHl-0007gZ-79 for qemu-devel@nongnu.org; Mon, 04 May 2015 09:19:49 -0400 Message-ID: <554771E4.8070309@redhat.com> Date: Mon, 04 May 2015 15:19:32 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1430421547-18278-1-git-send-email-ehabkost@redhat.com> <20150504114728.0dd227dd@nial.brq.redhat.com> <55474318.8090501@redhat.com> <20150504151616.1c93e84f@igors-macbook-pro.local> In-Reply-To: <20150504151616.1c93e84f@igors-macbook-pro.local> Content-Type: text/plain; charset=windows-1252 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: Igor Mammedov 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, =?windows-1252?Q?Andreas_F=E4rber?= , Eduardo Habkost On 04/05/2015 15:16, Igor Mammedov wrote: >> > 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. CPUs would already be available at /machine/peripheral. I think aliases should provide alternative indexing whenever possible---not simply filter by device type. Paolo