libvirt/src/xenconfig
Wim ten Have 03d0959af3 xenconfig: add domxml conversions for xen-xl
This patch converts NUMA configurations between the Xen libxl
configuration file format and libvirt's XML format.

XML HVM domain on a 4 node (2 cores/socket) configuration:

  <cpu>
    <numa>
      <cell id='0' cpus='0-1' memory='2097152' unit='KiB'>
        <distances>
          <sibling id='0' value='10'/>
          <sibling id='1' value='21'/>
          <sibling id='2' value='31'/>
          <sibling id='3' value='21'/>
        </distances>
      </cell>
      <cell id='1' cpus='2-3' memory='2097152' unit='KiB'>
        <distances>
          <sibling id='0' value='21'/>
          <sibling id='1' value='10'/>
          <sibling id='2' value='21'/>
          <sibling id='3' value='31'/>
        </distances>
      </cell>
      <cell id='2' cpus='3-4' memory='2097152' unit='KiB'>
        <distances>
          <sibling id='0' value='31'/>
          <sibling id='1' value='21'/>
          <sibling id='2' value='10'/>
          <sibling id='3' value='21'/>
        </distances>
      </cell>
      <cell id='3' cpus='5-6' memory='2097152' unit='KiB'>
        <distances>
          <sibling id='0' value='21'/>
          <sibling id='1' value='31'/>
          <sibling id='2' value='21'/>
          <sibling id='3' value='10'/>
        </distances>
      </cell>
    </numa>
  </cpu>

Xen xl.cfg domain configuration:

  vnuma = [["pnode=0","size=2048","vcpus=0-1","vdistances=10,21,31,21"],
           ["pnode=1","size=2048","vcpus=2-3","vdistances=21,10,21,31"],
           ["pnode=2","size=2048","vcpus=4-5","vdistances=31,21,10,21"],
           ["pnode=3","size=2048","vcpus=6-7","vdistances=21,31,21,10"]]

If there is no XML <distances> description amongst the <cell> data the
conversion schema from xml to native will generate 10 for local and 20
for all remote instances.

Signed-off-by: Wim ten Have <wim.ten.have@oracle.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2017-11-12 19:39:09 -07:00
..
xen_common.c conf: merge virDomainLifecycleCrashAction with virDomainLifecycleAction 2017-10-19 11:52:09 +02:00
xen_common.h conf: Add private data for virDomainVcpuDef 2016-07-11 10:44:04 +02:00
xen_sxpr.c conf: merge virDomainLifecycleCrashAction with virDomainLifecycleAction 2017-10-19 11:52:09 +02:00
xen_sxpr.h xenconfig: support vif bandwidth in sexpr parser and formatter 2016-01-08 18:56:00 -07:00
xen_xl.c xenconfig: add domxml conversions for xen-xl 2017-11-12 19:39:09 -07:00
xen_xl.h Xen: xenconfig: remove xendConfigVersion from public functions 2015-12-17 21:22:33 -07:00
xen_xm.c virDomainDefPostParse: Introduce @parseOpaque argument 2016-09-26 16:50:12 +02:00
xen_xm.h Xen: xenconfig: remove xendConfigVersion from public functions 2015-12-17 21:22:33 -07:00
xenxs_private.h Xen: VIR_FROM_THIS cleanup 2016-01-21 09:31:39 -07:00