From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyfUu-0003YV-A5 for qemu-devel@nongnu.org; Mon, 15 Jul 2013 05:55:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UyfUt-0007Ie-3L for qemu-devel@nongnu.org; Mon, 15 Jul 2013 05:55:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58839 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyfUs-0007Ia-UE for qemu-devel@nongnu.org; Mon, 15 Jul 2013 05:55:11 -0400 Message-ID: <51E3C6FB.8070302@suse.de> Date: Mon, 15 Jul 2013 11:55:07 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Morph cpu_reset -> device_reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Christian Borntraeger , Anthony Liguori , "qemu-devel@nongnu.org Developers" Hi Peter, Am 15.07.2013 06:02, schrieb Peter Crosthwaite: > A while ago, TYPE_CPU was refactored to by a child of TYPE_DEVICE. As > something of a hangover though, CPU has a separate reset fn to device. > This means >=20 > device_reset(DEVICE(my_cpu)); >=20 > doesn't actually work as a reset. Should we fix this by getting rif of > cpu_reset and just using the device reset API for cpu reset? This question has come up a number of times, cf. the archives. For one, CPU reset is a mess with most CPUs not registering reset handlers of their own like devices do but having machines do that and piggy-back some machine-specific initialization, possibly even relying on execution order of reset handlers. For another, some forms of Soft Reset (e.g., kdump on s390x) will require to reset devices only but not CPUs - currently qdev_devices_reset() calls all reset handlers, not just devices as the name might imply. For now you can reset a CPU via cpu_reset(CPU(my_cpu)); and if you have a good suggestion to clean this up, that will be appreciated. So far, a CPUClass method (1:1) and Notifiers (1:n) were the ideas that I brought up. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg