From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qyp9e-0004Hq-9O for qemu-devel@nongnu.org; Wed, 31 Aug 2011 14:04:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qyp9d-0005aQ-CP for qemu-devel@nongnu.org; Wed, 31 Aug 2011 14:04:50 -0400 Received: from mail-ey0-f171.google.com ([209.85.215.171]:37604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qyp9d-0005aM-7X for qemu-devel@nongnu.org; Wed, 31 Aug 2011 14:04:49 -0400 Received: by eyg24 with SMTP id 24so864725eyg.16 for ; Wed, 31 Aug 2011 11:04:48 -0700 (PDT) Date: Wed, 31 Aug 2011 20:04:45 +0200 From: "Edgar E. Iglesias" Message-ID: <20110831180445.GB17959@zapo> References: <4E58FC3F.6080809@web.de> <4E5BE7C5.60705@us.ibm.com> <4E5BFF51.9010503@web.de> <4E5C00F0.9070103@redhat.com> <4E5DF096.6070207@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Lucas Meneghel Rodrigues , Anthony Liguori , Marcelo Tosatti , qemu-devel , Jan Kiszka , Avi Kivity , Gerd Hoffmann On Wed, Aug 31, 2011 at 04:59:40PM +0000, Blue Swirl wrote: > On Wed, Aug 31, 2011 at 8:28 AM, Avi Kivity wrote: > > On 08/30/2011 10:19 PM, Blue Swirl wrote: > >> > >> > > >> >  We need some kind of two phase restore. In the first phase all state is > >> >  restored; since some of that state drivers outputs that are input to > >> > other > >> >  devices, they may experience an edge, and we need to supress that.  In > >> > the > >> >  second phase edge detection is unsupressed and the device goes live. > >> > >> No. Devices may not perform any externally visible activities (like > >> toggle a qemu_irq) during or after load because 1) qemu_irq is > >> stateless and 2) since the receiving end is also freshly loaded, both > >> states are already in synch without any calls or toggling. > > > > That makes it impossible to migrate level-triggered irq lines.  Or at least, > > the receiver has to remember the state, instead of (or in addition to) the > > sender. > > Both ends probably need to remember the state. That should work > without any multiphase restores and transient suppressors. > > It might be also possible to introduce stateful signal lines which > save and restore their state, then the receiving end could check what > is the current level. However, if you consider that the devices may be > restored in random order, if the IRQ line device happens to be > restored later, the receiver would still get wrong information. Adding > priorities could solve this, but I think stateless IRQs are the only > sane way. I may be missunderstanding something, but I agree with the stateless part. Fundamentally changing IRQ lines like this, deviating from how hardware normally handles it just to squeeze in other features seems wrong. At least until other alternatives have been proved to be impossible, but i doubt that is this case here. Cheers