From: Glauber C. <gl...@gm...> - 2008-04-19 21:11:16
|
On Fri, Apr 18, 2008 at 1:27 PM, Avi Kivity <av...@qu...> wrote: > > 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. > Yes, I did. Basic problem is that I basically could not find this information handy until we were deep in the stack, right before calling the update mapping functions. I turned out preferring this option. I can, however, take a fresh look at that. -- Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act." |