From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDnoZ-00041r-4i for qemu-devel@nongnu.org; Tue, 01 Jul 2008 17:55:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDnoW-00041U-UR for qemu-devel@nongnu.org; Tue, 01 Jul 2008 17:55:06 -0400 Received: from [199.232.76.173] (port=33881 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDnoW-00041R-KR for qemu-devel@nongnu.org; Tue, 01 Jul 2008 17:55:04 -0400 Received: from mail.codesourcery.com ([65.74.133.4]:39026) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KDnoW-0000Xk-5J for qemu-devel@nongnu.org; Tue, 01 Jul 2008 17:55:04 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Re: [RESEND][PATCH] save/restore interrupt_request across snapshots Date: Tue, 1 Jul 2008 22:55:00 +0100 References: <4858F482.9050903@siemens.com> <200807012102.25714.paul@codesourcery.com> <486AA5DE.1000708@web.de> In-Reply-To: <486AA5DE.1000708@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807012255.01121.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka On Tuesday 01 July 2008, Jan Kiszka wrote: > Paul Brook wrote: > >> Save interrupt_request state along with the cpu snapshot and restore it > >> properly. This also solves the bug that pending interrupts before > >> invocation of qemu_loadvm_state can tunnel into the resumed guest, > >> causing invalid IRQs there. > > > > I just checked in a patch which is a superset of this functionality. > > Nice cleanups! > > ( Well, except for > > if (version_id != 3 && version_id != 4 && version_id != 5 > && version_id != 6) > > :-> ) I was tempted to rip it out altogether, and replace with if (version_id != CPU_SAVE_VERSION) IMHO explicitly enumerating all the versions we claim to be able to load isn't a bad thing. > And after fixing this typo, it also works nicely: > qemu_get_be32s(f, &env->halted); > - qemu_put_be32s(f, &env->interrupt_request); > + qemu_get_be32s(f, &env->interrupt_request); Good catch, thanks. Paul