[libvirt] [PATCH] libxl: load on FreeBSD

Roman Bogorodskiy bogorodskiy at gmail.com
Sun May 24 15:49:44 UTC 2015

  Martin Kletzander wrote:

> On Sat, May 23, 2015 at 09:15:08PM +0300, Roman Bogorodskiy wrote:
> >The libxl tries to check if it's running in dom0 by parsing
> >/proc/xen/capabilities and if that fails it doesn't load.
> >
> >There's no procfs interface in Xen on FreeBSD, so this check always
> >fails.
> >
> >Instead of using procfs, check if /dev/xen/xenstored, that's enough to
> >check if we're running in dom0 in FreeBSD case.
> >
> >--
> >
> >The 'HYPERVISOR_CAPABILITIES' name could be misleading now, however, I'd
> >prefer to use a common variable to avoid duplicating of the file checking
> >code. Maybe it should be renamed to something like HYPERVISOR_CONTROL?
> You can just add new one, XENSTORED for example, and check whether at
> least one exists, reading the file afterwards if it is the old one.
> It might not be FreeBSD-specific.  What's your opinion?

My concern was doing a check that will always fail on FreeBSD. Anyway,
the check doesn't seem to be very expensive and happens only once, so it
doesn't make any noticeable impact.

I've sent v2. I hope it doesn't break existing behaviour on Linux.

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150524/136f8d51/attachment-0001.sig>

More information about the libvir-list mailing list