From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKsPe-0001FE-Mv for qemu-devel@nongnu.org; Wed, 27 Mar 2013 11:37:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKsPd-0003ZA-99 for qemu-devel@nongnu.org; Wed, 27 Mar 2013 11:37:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKsPd-0003Yy-0f for qemu-devel@nongnu.org; Wed, 27 Mar 2013 11:37:17 -0400 Message-ID: <5153120C.60806@redhat.com> Date: Wed, 27 Mar 2013 16:36:44 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1363876125-8264-1-git-send-email-imammedo@redhat.com> <1363876125-8264-9-git-send-email-imammedo@redhat.com> <5152D2A2.2030901@redhat.com> <20130327162425.763974e4@nial.usersys.redhat.com> In-Reply-To: <20130327162425.763974e4@nial.usersys.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/12] introduce CPU hot-plug notifier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, ehabkost@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, stefano.stabellini@eu.citrix.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, quintela@redhat.com, armbru@redhat.com, blauwirbel@gmail.com, yang.z.zhang@intel.com, alex.williamson@redhat.com, aderumier@odiso.com, kraxel@redhat.com, anthony.perard@citrix.com, lcapitulino@redhat.com, afaerber@suse.de, rth@twiddle.net Il 27/03/2013 16:24, Igor Mammedov ha scritto: > I've put notifier in vl.c since most of them are there They are there, because the code that invokes them is also there. In fact, most calls of notifier_list_notify in vl.c are from static functions. > Yep there wouldn't be need for stub if notifier is in qom/cpu.c, > but I've figured out that people would object to put it there > since it's build only once for softmmu and *-user targets and > *-user target doesn't need it at all. > > Andreas, > would it be acceptable if notifier goes in qom/cpu.c, (it would > add nop code to *-user target)? I think adding dead code to *-user is fine. >> > (Besides, I noticed now the get_icc_bus stub. I didn't understand why >> > it's used, but anyway adding CPU-specific stuff to libqemustub is >> > absolutely a no-no). > True, If icc_bus was created at board level then there wouldn't be any need > for get_icc_bus(), it could be just looked up in qom tree. I'll try to do it. > > BTW: is there any guidelines what might be added to libqemustub? Nothing. :) Seriously, you really should use it only when an entire subsystem does not exist in tools or user-level emulation (monitor, vm_clock, migration, slirp). Everything else will probably be served better by methods, in all likelihood. Paolo