Re: [Qemu-devel] vfio - bind failure : user space recovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux