qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Glauber Costa" <glommer@gmail.com>
To: qemu-devel@nongnu.org
Cc: kvm-devel@lists.sourceforge.net, mtosatti@redhat.com,
	aurelien@aurel32.net,
	Glauber de Oliveira Costa <gcosta@redhat.com>
Subject: Re: [Qemu-devel] Re: [kvm-devel] [PATCH 0/3] Qemu crashes with pci passthrough
Date: Sat, 19 Apr 2008 18:11:22 -0300	[thread overview]
Message-ID: <5d6222a80804191411v3cf59bd5ic1c5ebcd2f660fe6@mail.gmail.com> (raw)
In-Reply-To: <4808CBDB.3030206@qumranet.com>

On Fri, Apr 18, 2008 at 1:27 PM, Avi Kivity <avi@qumranet.com> 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."

  reply	other threads:[~2008-04-19 21:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17  8:42 [Qemu-devel] [PATCH 0/3] Qemu crashes with pci passthrough Glauber de Oliveira Costa
2008-04-17  8:42 ` [Qemu-devel] [PATCH 1/3] don't exit on errors while registering ioports Glauber de Oliveira Costa
2008-04-17  8:42   ` [Qemu-devel] [PATCH 2/3] map regions as registered Glauber de Oliveira Costa
2008-04-17  8:42     ` [Qemu-devel] [PATCH 3/3] propagate errors from ioport registering up to pci level Glauber de Oliveira Costa
2008-04-18 16:27 ` [Qemu-devel] Re: [kvm-devel] [PATCH 0/3] Qemu crashes with pci passthrough Avi Kivity
2008-04-19 21:11   ` Glauber Costa [this message]
2008-04-24 13:25     ` Glauber Costa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d6222a80804191411v3cf59bd5ic1c5ebcd2f660fe6@mail.gmail.com \
    --to=glommer@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=gcosta@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).