From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNSu7-0000dO-Er for qemu-devel@nongnu.org; Wed, 03 Apr 2013 14:59:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNSu6-00073f-6Y for qemu-devel@nongnu.org; Wed, 03 Apr 2013 14:59:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNSu5-00072B-Sz for qemu-devel@nongnu.org; Wed, 03 Apr 2013 14:59:26 -0400 Date: Wed, 3 Apr 2013 20:59:07 +0200 From: Igor Mammedov Message-ID: <20130403205907.179ff217@thinkpad.mammed.net> In-Reply-To: <20130403181005.GT2719@otherpad.lan.raisama.net> References: <1363876125-8264-1-git-send-email-imammedo@redhat.com> <1363876125-8264-13-git-send-email-imammedo@redhat.com> <5152D5A5.4030405@redhat.com> <20130403195800.0ba38817@thinkpad.mammed.net> <20130403181005.GT2719@otherpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 12/12] target-i386: implement CPU hot-add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, yang.z.zhang@intel.com, stefano.stabellini@eu.citrix.com, jan.kiszka@siemens.com, mst@redhat.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, armbru@redhat.com, blauwirbel@gmail.com, quintela@redhat.com, alex.williamson@redhat.com, kraxel@redhat.com, anthony.perard@citrix.com, Paolo Bonzini , lcapitulino@redhat.com, afaerber@suse.de, rth@twiddle.net On Wed, 3 Apr 2013 15:10:05 -0300 Eduardo Habkost wrote: > On Wed, Apr 03, 2013 at 07:58:00PM +0200, Igor Mammedov wrote: > > > > > +void do_cpu_hot_add(const int64_t id, Error **errp) > > > > +{ > > > > + pc_new_cpu(saved_cpu_model, id, errp); > > > > +} > > > > + > > > > > > Missing x86_cpu_apic_id_from_index(id)? > > There was(is?) opposition to using cpu_index to identify x86 CPU. > > Really? Do you have a pointer to the discussion? Here is what I could find in my mail box: http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg02770.html Jan could correct me if I'm wrong. > > > > So, it is expected from management to provide APIC ID instead of cpu_index. > > It could be useful to make hotplug to a specific NUMA node/cpu to work in > > future. > > Though interface of possible APIC IDs discovery is not part of this series. > > That's exactly the opposite of what I expect. The APIC ID is an internal > implementation detail, and external tools must _not_ be required to deal > with it and to calculate it. > > Communication with the BIOS, on the other hand, is entirely based on the > APIC ID, and not CPU indexes. So QEMU needs to translate the CPU indexes > (used to communicate with the outside world) to APIC IDs when talking to > the BIOS. cpu_index won't work nicely with hot-adding CPU to specific numa node though. with APIC ID (mgmt might treat it as opaque) we could expose something like /machine/icc-bridge/link ... Libvirt than could just pickup ready apic id from desired place and add CPU either using cpu-add id=xxx or device_add x86-cpu-...,apic_id=xxx +1 more cpu_index is QEMU implementation detail and we could not add to x86 CPU cpu-index property since hardware doesn't have such feature, so it won't be available with device_add. > > -- > Eduardo > -- Regards, Igor