Received: from eggs.gnu.org ([2001:4830:134:3::10]:48115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnUMY-00065n-0b for qemu-devel@nongnu.org; Thu, 22 May 2014 10:52:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnUMT-0001e8-EB for qemu-devel@nongnu.org; Thu, 22 May 2014 10:52:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnUMT-0001ds-5S for qemu-devel@nongnu.org; Thu, 22 May 2014 10:52:49 -0400 Date: Thu, 22 May 2014 11:52:38 -0300 From: Eduardo Habkost Message-ID: <20140522145238.GO3302@otherpad.lan.raisama.net> References: <05953EE18EEC9148BE892F38DF8F8E8E5ED412@G08CNEXMBPEKD03.g08.fujitsu.local> <537DD636.90500@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <537DD636.90500@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC 0/3] cpu: add device_add foo-x86_64-cpu support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: "chen.fan.fnst@cn.fujitsu.com" , Igor Mammedov , "qemu-devel@nongnu.org" , Marcel Apfelbaum On Thu, May 22, 2014 at 12:49:26PM +0200, Andreas F=E4rber wrote: > Hi, >=20 > Am 22.05.2014 04:33, schrieb chen.fan.fnst@cn.fujitsu.com: > > I think if we want to use 'device/device_add' to implement CPU, > > we must do some check before qemu_init_vcpu(). how can we to do that? >=20 > We ran into such problems before... If need be, we can change from the > old parent_realize scheme to the base class calling the derived realize > function in-order, or we can add new hooks to CPUClass as necessary. >=20 > Consider me a bit skeptical about MAX_CPUMASK_BITS in 1/3. This should > at least be tied to the maximum allowed for QEMUMachine/MachineClass > rather than hardcoded to 255, which people may forget to synchronize. > There was a recent attempt to increase the limits. I agree that on new code we should avoid using static bitmap sizes and use max_cpus instead. MAX_CPUMASK_BITS only exists because there was existing code using static limits to bitmaps. If we change all existing code to use max_cpus to dynamically allocate bitmaps, we can drop it. --=20 Eduardo