From: Alex Williamson <alex.williamson@redhat.com>
To: Saptarshi Sen <saptarshi.mrg@gmail.com>
Cc: qemu-devel@nongnu.org, kvm <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] vfio - bind failure : user space recovery
Date: Fri, 16 May 2014 09:55:33 -0600 [thread overview]
Message-ID: <1400255733.3289.213.camel@ul30vt.home> (raw)
In-Reply-To: <CAG5Np+ruPZ7QpOjUqM-7-CnLjFUWwVgKEPHaKsNFiPA-z+ggcg@mail.gmail.com>
[cc+ kvm]
(kvm is the proper list for non-QEMU related vfio)
On Fri, 2014-05-16 at 08:01 -0700, Saptarshi Sen wrote:
> I am using a driver from user-space using vfio.
> During intensive testing, when my application crashes.
> I try to re-run the same, when I get a bind-failure.
> Error code, is E_BUSY.
>
> The point of error is when I try to open a group
> ret = open("/dev/vfio/xx",O_RDWR)
> I traced down what could be the reason of this from driver pers
> is that the driver does not allow multiple instances to be opened.
>
> How to recover if user-space code using vfio crashes. Since I lose the
> handle
> to the group I do not know how can I rebind to the vfio group on the
> next-run.
> Is the only option remains to reboot the machine.?
When the userspace driver process exits, all of the file descriptors are
released and references should be dropped allowing for the group file to
be re-opened. So the first question would be whether the previous
process crashed and exited or whether it remains in some non-running
state. If it is actually dead and gone, and you're still not able to
re-open the group, then there's a bug somewhere in the accounting. You
shouldn't need to reboot the machine to re-use the group. Thanks,
Alex
prev parent reply other threads:[~2014-05-16 15:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 15:01 [Qemu-devel] vfio - bind failure : user space recovery Saptarshi Sen
2014-05-16 15:55 ` Alex Williamson [this message]
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=1400255733.3289.213.camel@ul30vt.home \
--to=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=saptarshi.mrg@gmail.com \
/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).