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

Re: [Xen-devel] [RFC v2 6/9] libxl: Have QEMU save its state to a file descriptor



On Mon, Apr 23, 2018 at 04:45:28PM +0100, Anthony PERARD wrote:
> On Mon, Apr 23, 2018 at 10:20:42AM +0100, Wei Liu wrote:
> > On Mon, Apr 16, 2018 at 06:32:24PM +0100, Anthony PERARD wrote:
> > > In case QEMU have restricted access to the system, open the file for it,
> > > and QEMU will save its state to this file descritor.
> > > 
> > > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> > 
> > I think this is going to break FreeBSD?
> 
> If the previous patch works on FreeBSD (Learned to send FD through QMP
> to QEMU), this patch shouldn't break anything. Looking at how
> libxl__sendmsg_fds() is implemented, and how the receive side is
> implemented in QEMU, there doesn't seems to be any difference on
> FreeBSD, so I guess it's going to work fine.
> 
> > And what is /dev/fdset exactly? I don't seem to have it on my Debian
> > workstation (with Linux 4.15). So this change can potentially be broken
> > on Linux as well?
> 
> /dev/fdset is a QEMU internal API. You can add a file descriptor to a
> fd-set via QMP or via the command line. And later, you can give a path
> to something in QEMU (maybe a block driver) which refer to a fd-set
> created earlier. The path would be "/dev/fdset/$fdset_number". There can
> be several fd in a fd-set, qemu will just look for the first one which
> have the right permission, like read or write permission.

Oh, I was thinking /dev/fdset was some sort of Linux specific thing. It
is interesting that QEMU actually creates /dev/fdset. That means it
should work fine (at least in theory) for both FreeBSD and Linux.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.