On Wed, Sep 12, 2018 at 04:04:00PM +0800, Tiwei Bie wrote: > On Mon, Jul 30, 2018 at 12:30:58PM +0300, Michael S. Tsirkin wrote: > [...] > > > > I generally wonder how are restarts of the backend handled > > with this approach: closing the VFIO device tends to reset > > the whole device. > > Hi Michael, > > I missed this comment previously.. This is a good point! > In this RFC, before sending the VFIO group fd to QEMU, > backend needs to close the VFIO device and unset the VFIO > container first. Otherwise, QEMU won't be able to set the > VFIO container for the VFIO group. > > Another option is to share the container fd instead of > the group fd to QEMU. In this case, backend won't need > to close any fd. But there is one problem that, it's > hard to unmap the old mappings, especially when QEMU > crashes.
What are these old mappings and who creates them? If you want to just reset everything the way it was on open, surely it would be easy to add such a reset ioctl. > Do you have any suggestions? Thanks! > > Best regards, > Tiwei Bie Donnu. Alex, any thoughts? Which approach would you prefer? -- MST