From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzUxY-0000ef-Lw for qemu-devel@nongnu.org; Thu, 09 Aug 2012 11:47:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzUxU-00070k-BF for qemu-devel@nongnu.org; Thu, 09 Aug 2012 11:47:40 -0400 Message-ID: <5023DB90.2040206@suse.de> Date: Thu, 09 Aug 2012 17:47:28 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1344321711-15782-1-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1344321711-15782-1-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Allow QEMUMachine to override reset sequencing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: aliguori@us.ibm.com, qemu-ppc@nongnu.org, agraf@suse.de, qemu-devel@nongnu.org Am 07.08.2012 08:41, schrieb David Gibson: > qemu_system_reset() function always performs the same basic actions on > all machines. This includes running all the reset handler hooks, > however the order in which these will run is not always easily predicta= ble. >=20 > This patch splits the core of qemu_system_reset() - the invocation of > the reset handlers - out into a new qemu_devices_reset() function. > qemu_system_reset() will usually call qemu_devices_reset(), but that > can be now overriden by a new reset method in the QEMUMachine > structure. >=20 > Individual machines can use this reset method, if necessary, to > perform any extra, machine specific initializations which have to > occur before or after the bulk of the reset handlers. It's expected > that the method will call qemu_devices_reset() at some point, but if > the machine has really strange ordering requirements between devices > resets it could even override that with it's own reset sequence (with > great care, obviously). >=20 > For a specific example of when this might be needed: a number of > machines (but not PC) load images specified with -kernel or -initrd > directly into the machine RAM before booting the guest. This mostly > works at the moment, but to make this actually safe requires that this > load occurs after peripheral devices are reset - otherwise they could > have active DMAs in progress which would clobber the in memory images. > Some machines (notably pseries) also have other entry conditions which > need to be set up as the last thing before executing in guest space - > some of this could be considered "emulated firmware" in the sense that > the actions of the firmware are emulated directly by qemu rather than > by executing a firmware image within the guest. When the platform's > firmware to OS interface is sufficiently well specified, this saves > time both in implementing the "firmware" and executing it. >=20 > Signed-off-by: David Gibson Reviewed-by: Andreas F=E4rber I'll put together a follow-up to show what I meant in the v1 thread. 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