Received: from eggs.gnu.org ([2001:4830:134:3::10]:45565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWNow-00089A-18 for qemu-devel@nongnu.org; Wed, 16 Oct 2013 05:55:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWNor-0000XX-5Z for qemu-devel@nongnu.org; Wed, 16 Oct 2013 05:55:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWNoq-0000XG-SH for qemu-devel@nongnu.org; Wed, 16 Oct 2013 05:55:09 -0400 From: Markus Armbruster References: <1381416174-5110-1-git-send-email-armbru@redhat.com> <878uxuiux3.fsf@blackfin.pond.sub.org> <525D3E5C.1080007@suse.de> Date: Wed, 16 Oct 2013 11:55:04 +0200 In-Reply-To: <525D3E5C.1080007@suse.de> ("Andreas =?utf-8?Q?F=C3=A4rber=22?= =?utf-8?Q?'s?= message of "Tue, 15 Oct 2013 15:08:44 +0200") Message-ID: <87mwm9sfpj.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Why is TYPE_CPU no-user? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: Peter Maydell , qemu-devel@nongnu.org Andreas F=C3=A4rber writes: > Hi Markus, > > Am 15.10.2013 14:24, schrieb Markus Armbruster: >> To go beyond RFC with this series, I need to explain why TYPE_CPU >> cannot_instantiate_with_device_add_yet. Would you be so kind and help >> me out with a suitable comment? > >>From what I remember this was done when I started the whole process and > most CPU subtypes did not yet use the QOM instance_init for > initialization. Most importantly x86 still is not yet self-contained, > nor is sparc. Such targets need to use cpu_init() et al. rather than > -device. (This became visible in the first s390x vCPU hotplug series.) > > Most boards rely on being able to do postprocessing after they have > instantiated the CPU: wiring up IRQs, adding reset handlers, halting > non-first CPUs, ... > -device would skip that. This is the prime reason for cannot_instantiate_with_device_add_yet. > Another aspect is that no CPU subtype has been proven hot-pluggable with > device_add yet. For s390x we're the closest to date. Hot-plug support is orthogonal. We got plenty of devices that support device-add, but only cold plug. > We could move the flag from the base type to the targets' base types if > you prefer. Then we can knock the bad values out one by one rather than > overriding the inherited value with an explicit positive one. I'd prefer to make that move when the first CPU is ready. Thanks! [...]