From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1W2b-0003gA-Kf for qemu-devel@nongnu.org; Sun, 09 Dec 2007 18:58:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1W2Z-0003fi-6j for qemu-devel@nongnu.org; Sun, 09 Dec 2007 18:58:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1W2Z-0003fe-3R for qemu-devel@nongnu.org; Sun, 09 Dec 2007 18:58:31 -0500 Received: from ug-out-1314.google.com ([66.249.92.175]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1W2Y-0005hG-Ls for qemu-devel@nongnu.org; Sun, 09 Dec 2007 18:58:30 -0500 Received: by ug-out-1314.google.com with SMTP id m2so1337686uge for ; Sun, 09 Dec 2007 15:58:30 -0800 (PST) Message-ID: Date: Mon, 10 Dec 2007 00:58:29 +0100 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] saving/loading PCI irq related state In-Reply-To: <474C8CB0.7010304@qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <474C8CB0.7010304@qumranet.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 Hi, On 27/11/2007, Uri Lublin wrote: > Hello, > > If one is not lucky he/she may lose PCI interrupts when saving and > loading a VM. > It seems PCI irq related state is not being saved. > When this happens, the guest hangs/spins and the cpu usage of the > process stays around 100%. > > Attached are three patches to fix this: > 01 -- when saving/loading a pci device, save/load its irq_state > 02 -- save/load PCI-Bus irq related state > 03 -- save/load PCI-bridge (i440FX/PIIX3) irq related state > > There are two alternatives, both recalculate PCI irq related state upon > loadvm instead of saving/loading it: > (a) Make every PCI device DEV (e.g. rtl8139, ne2000, usb-uhci, etc) call > its DEV_update_irq() from its state-load-function. or > (b) Keep patch 01 and recalculate 02 and 03 by going over all > PCI-devices on the specific Bus/Bridge. I committed the three patches together but I changed the put/get functions used to ones that don't assume on sizeof(int) == 4. Compile tested only, please check if I've not screwed this up. Regards