From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URq0t-0003Bf-8K for qemu-devel@nongnu.org; Mon, 15 Apr 2013 16:28:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URq0r-00073l-WE for qemu-devel@nongnu.org; Mon, 15 Apr 2013 16:28:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URq0r-00073g-NN for qemu-devel@nongnu.org; Mon, 15 Apr 2013 16:28:29 -0400 Date: Mon, 15 Apr 2013 22:27:57 +0200 From: Igor Mammedov Message-ID: <20130415222757.420bae76@thinkpad> In-Reply-To: <20130415144940.GE2719@otherpad.lan.raisama.net> References: <1365691918-30594-1-git-send-email-imammedo@redhat.com> <1365691918-30594-12-git-send-email-imammedo@redhat.com> <20130411191233.GM6862@otherpad.lan.raisama.net> <20130412122045.76e99a85@thinkpad> <20130412131313.GQ2719@otherpad.lan.raisama.net> <20130412174642.1eca8460@thinkpad> <20130412162940.GV2719@otherpad.lan.raisama.net> <20130415153700.60ad49f6@nial.usersys.redhat.com> <20130415134524.GB2719@otherpad.lan.raisama.net> <20130415163441.7cf6e6e1@nial.usersys.redhat.com> <20130415144940.GE2719@otherpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/19] target-i386: introduce apic-id property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: aliguori@us.ibm.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, lcapitulino@redhat.com, jfrei@linux.vnet.ibm.com, yang.z.zhang@intel.com, pbonzini@redhat.com, afaerber@suse.de, lig.fnst@cn.fujitsu.com, rth@twiddle.net On Mon, 15 Apr 2013 11:49:40 -0300 Eduardo Habkost wrote: > On Mon, Apr 15, 2013 at 04:34:41PM +0200, Igor Mammedov wrote: > > On Mon, 15 Apr 2013 10:45:24 -0300 > > Eduardo Habkost wrote: > > > > > On Mon, Apr 15, 2013 at 03:37:00PM +0200, Igor Mammedov wrote: > > > [...] > > > > > > > ID to be directly specified in the device_add/-device options. > > > > > > > That's how real CPUs work: as the CPU manufacturer doesn't know > > > > > > > what will be the package ID of the CPU, the APIC IDs are not > > > > > > > hardcoded in the CPU; they are calculated based on the CPU topology > > > > > > > and some socket identifier signal coming from the board. > > > > > > that is why apic_id has been made a property, to be set from outside. > > > > > > > > > > True. I believe the conflict here is: we want other objects to set the > > > > > APIC ID (be it the board, or socket/core objects), but at the same time > > > > > it would be interesting to not expose the APIC ID outside QEMU. Being > > > > > too flexible regarding the APIC ID is more likely to cause problems > > > > > later. > > > > > > > > > > That said, I don't mind having a "apic-id" property because it is easier > > > > > to simply expose it directly. But do you agree that: 1) we don't really > > > > > need to expose it to be set from outside QEMU; 2) we shouldn't require > > > > > it to be set from outside QEMU; 3) we should recommend users to not try > > > > > to fiddle it with? > > > > Due to nature of per thread CPU hotplug, management will have to specify > > > > some kind of ID to specify which CPU is being plugged. Management really > > > > doesn't/shouldn't care what this ID is. > > > > > > As long as management really doesn't/shouldn't care what the ID is, > > > exposing the APIC ID in the form of an opaque CPU identifier wouldn't be > > > a problem to me. I just wanted to make clarify if we agree that messing > > > with the APIC ID directly won't be recommended and that the "apic-id" > > > property will be for QEMU internal use only. > > On contrary, it's useful external feature, x86 guests see only APIC ID, since > > it's the only ID they [should] know about. So guest aware mgmt could > > definitely use apic_id propery to correlate CPU in guest with QEMU view of > > them. > > You're right, _reading_ the APIC ID is very useful. I am worried about > _setting_ it from external code. currently it's not possible since cpu-add doesn't allow to set any properties. We will need setting it for device_add though. By then, I guess some way to check that it's valid would be enough, otherwise hot-plugged CPU will be out of scope of MADT and guest would ignore it or through an error. > > -- > Eduardo > -- Regards, Igor