From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/3] Qemu crashes with pci passthrough Date: Fri, 18 Apr 2008 19:27:07 +0300 Message-ID: <4808CBDB.3030206@qumranet.com> References: <12084217752458-git-send-email-gcosta@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, mtosatti@redhat.com, qemu-devel@nongnu.org, aurelien@aurel32.net To: Glauber de Oliveira Costa Return-path: In-Reply-To: <12084217752458-git-send-email-gcosta@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Glauber de Oliveira Costa wrote: > 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) > > Have you considered, instead of rolling back the changes you already made before the failure, to have a function which checks if an ioport registration will be successful? This may simplify the code. -- Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone