libxl: implement NUMA capabilities reporting
libxl: implement NUMA capabilities reporting

From: Dario Faggioli <dario.faggioli@citrix.com>

Starting from Xen 4.2, libxl has all the bits and pieces in place
for retrieving an adequate amount of information about the host
NUMA topology. It is therefore possible, after a bit of shuffling,
to arrange those information in the way libvirt wants to present
them to the outside world.

Therefore, with this patch, the <topology> section of the host
capabilities is properly populated, when running on Xen, so that
we can figure out whether or not we're running on a NUMA host,
and what its characteristics are.

[raistlin@Zhaman ~]$ sudo virsh --connect xen:/// capabilities
<capabilities>
  <host>
    <cpu>
    ....
    <topology>
      <cells num='2'>
        <cell id='0'>
          <memory unit='KiB'>6291456</memory>
          <cpus num='8'>
            <cpu id='0' socket_id='1' core_id='0' siblings='0-1'/>
            <cpu id='1' socket_id='1' core_id='0' siblings='0-1'/>
            <cpu id='2' socket_id='1' core_id='1' siblings='2-3'/>
            <cpu id='3' socket_id='1' core_id='1' siblings='2-3'/>
            <cpu id='4' socket_id='1' core_id='9' siblings='4-5'/>
            <cpu id='5' socket_id='1' core_id='9' siblings='4-5'/>
            <cpu id='6' socket_id='1' core_id='10' siblings='6-7'/>
            <cpu id='7' socket_id='1' core_id='10' siblings='6-7'/>
          </cpus>
        </cell>
        <cell id='1'>
          <memory unit='KiB'>6881280</memory>
          <cpus num='8'>
            <cpu id='8' socket_id='0' core_id='0' siblings='8-9'/>
            <cpu id='9' socket_id='0' core_id='0' siblings='8-9'/>
            <cpu id='10' socket_id='0' core_id='1' siblings='10-11'/>
            <cpu id='11' socket_id='0' core_id='1' siblings='10-11'/>
            <cpu id='12' socket_id='0' core_id='9' siblings='12-13'/>
            <cpu id='13' socket_id='0' core_id='9' siblings='12-13'/>
            <cpu id='14' socket_id='0' core_id='10' siblings='14-15'/>
            <cpu id='15' socket_id='0' core_id='10' siblings='14-15'/>
          </cpus>
        </cell>
      </cells>
    </topology>
  </host>
  ....

agx/libvirt,olafhering/libvirt,crobinso/libvirt,taget/libvirt,olafhering/libvirt,rlaager/libvirt,andreabolognani/libvirt,rlaager/libvirt,VenkatDatta/libvirt,taget/libvirt,jfehlig/libvirt,agx/libvirt,zippy2/libvirt,cbosdo/libvirt,nertpinx/libvirt,nertpinx/libvirt,elmarco/libvirt,libvirt/libvirt,VenkatDatta/libvirt,olafhering/libvirt,crobinso/libvirt,eskultety/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,crobinso/libvirt,eskultety/libvirt,datto/libvirt,cbosdo/libvirt,fabianfreyer/libvirt,libvirt/libvirt,zippy2/libvirt,eskultety/libvirt,taget/libvirt,zippy2/libvirt,andreabolognani/libvirt,jfehlig/libvirt,datto/libvirt,rlaager/libvirt,taget/libvirt,elmarco/libvirt,jfehlig/libvirt,VenkatDatta/libvirt,zhlcindy/libvirt-1.1.4-maintain,cbosdo/libvirt,elmarco/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,crobinso/libvirt,zhlcindy/libvirt-1.1.4-maintain,agx/libvirt,agx/libvirt,datto/libvirt,fabianfreyer/libvirt,elmarco/libvirt,shugaoye/libvirt,zhlcindy/libvirt-1.1.4-maintain,cbosdo/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,elmarco/libvirt,agx/libvirt,zippy2/libvirt,zhlcindy/libvirt-1.1.4-maintain,andreabolognani/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,jardasgit/libvirt,cbosdo/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,taget/libvirt,nertpinx/libvirt,jardasgit/libvirt,libvirt/libvirt,shugaoye/libvirt,eskultety/libvirt,nertpinx/libvirt,datto/libvirt,shugaoye/libvirt,rlaager/libvirt,rlaager/libvirt,libvirt/libvirt,VenkatDatta/libvirt,nertpinx/libvirt,jardasgit/libvirt,olafhering/libvirt,shugaoye/libvirt,datto/libvirt,eskultety/libvirt,shugaoye/libvirt