Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] Creating a topology generation method for Xen
From: Andrew Cooper (andrew.cooper3_at_[hidden])
Date: 2013-12-26 17:31:19

On 26/12/2013 21:43, Samuel Thibault wrote:
> Hello,
> Andrew Cooper, le Thu 26 Dec 2013 22:17:38 +0100, a écrit :
>> I believe can make a topology-xen.c without too much trouble. It likely
>> wants to checked before an os-specific hook (Xen dom0's come in at least
>> Linux, FreeBSD, NetBSD flavours which have mainstream support)
>> Are there any hints/suggestion/information about how to go about
>> integrating this?
> Yes, you can probably play with plugin priorities for that. See for
> instance what happens with the pci plugins.

Are there any hints on exactly what I have to tweak to get
topology-xen.c picked up properly? I pesuaded ./configure to put it in
static-components.h but not to actually attempt to build
topology-xen.c. (I shall continue hacking in the meantime)

>> What is the policy with regards to linking against
>> new libraries by default (or perhaps by an --enable-xen configure
>> option)?
> By default we usually link against anything which is there, so linking
> against libxenctrl is fine.
> IIRC hypercalls through libxenctrl are reserved to root? We'd like to
> let normal users be able to get the topology...

Under linux, hypercalls are restricted to users who can open
/dev/xen/privcmd, and issue ioctl()s. At the moment, this is certainly
restricted to root users only.

This is because toolstacks (who are currently the only non-debug users
of hypercalls in dom0 I am aware of) really do have to be root to
function correctly.

Having said that, there is an argument to be made for a relaxation of
the requirements for read-only hypercalls. Either way, that would be a
change of the privcmd driver. hwloc would work fine either way, as
libxenctrl does its checking based on whether it can open
/dev/xen/privcmd, rather than whether it is root or not.