From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGdyV-0007LD-3y for qemu-devel@nongnu.org; Tue, 16 Jun 2009 15:05:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGdyQ-0007AH-8s for qemu-devel@nongnu.org; Tue, 16 Jun 2009 15:05:38 -0400 Received: from [199.232.76.173] (port=49028 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGdyO-00079q-Uc for qemu-devel@nongnu.org; Tue, 16 Jun 2009 15:05:33 -0400 Received: from mail2.shareable.org ([80.68.89.115]:42269) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MGdyO-0006dA-8X for qemu-devel@nongnu.org; Tue, 16 Jun 2009 15:05:32 -0400 Date: Tue, 16 Jun 2009 20:05:29 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Register uhci_reset() callback. Message-ID: <20090616190529.GO11893@shareable.org> References: <20090611084808.GA19508@redhat.com> <200906161754.59643.paul@codesourcery.com> <200906161900.11811.paul@codesourcery.com> <20090616185218.GK11893@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090616185218.GK11893@shareable.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org, Avi Kivity , Gleb Natapov , Paul Brook Jamie Lokier wrote: > Blue Swirl wrote: > It's analogous to a distributed atomic transaction problem. > > So you need two phases: > > - Restoring: All devices states are restored, one by one including > output levels of interrupt lines and GPIOs, but nothing actually > _happens_ when those levels are set. > > - Running: All devices start running at the same instant from > their restored state. They don't need to reexamine input > levels, because their internal states are already consistent > with the input levels. > > In the restoring phase, you might still use the normal functions to > set output levels, but they would be prevented from being passed as > changes to other devices. > > Anything else might be made to work with particular PICs etc., but > two-phase restore is what you need to work with any wiring (including > cycles) of arbitrary devices with arbitrary states. I should say, the above applies to both restoring saved state, and whole system resets. That's why real hardware has a nice long reset pulse, during which every input change is ignored until the reset pulse is removed. -- Jamie