From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JmISq-0002TH-TJ for qemu-devel@nongnu.org; Wed, 16 Apr 2008 20:59:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JmISo-0002SF-R4 for qemu-devel@nongnu.org; Wed, 16 Apr 2008 20:59:00 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JmISo-0002S9-NH for qemu-devel@nongnu.org; Wed, 16 Apr 2008 20:58:58 -0400 Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JmISo-0001pI-4E for qemu-devel@nongnu.org; Wed, 16 Apr 2008 20:58:58 -0400 From: Glauber de Oliveira Costa Date: Thu, 17 Apr 2008 01:42:52 -0700 Message-Id: <12084217752458-git-send-email-gcosta@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] Qemu crashes with pci passthrough Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvm-devel@lists.sourceforge.net Cc: amit.shah@qumranet.com, glommer@gmail.com, mtosatti@redhat.com, qemu-devel@nongnu.org, aurelien@aurel32.net Hi, I've got some qemu crashes while trying to passthrough an ide device to a kvm guest. After some investigation, it turned out that register_ioport_{read/write} will abort on errors instead of returning a meaningful error. However, even if we do return an error, the asynchronous nature of pci config space mapping updates makes it a little bit hard to treat. This series of patches basically treats errors in the mapping functions in the pci layer. If anything goes wrong, we unregister the pci device, unmapping any mappings that happened to be sucessfull already. After these patches are applied, a lot of warnings appears. And, you know, everytime there is a warning, god kills a kitten. But I'm not planning on touching the other pieces of qemu code for this until we set up (or not) in this solution Comments are very welcome, specially from qemu folks (since it is a bit invasive)