]> git.ipfire.org Git - thirdparty/libvirt.git/commit
numa_conf: Introduce virDomainNumaGetMaxCPUID
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 7 Aug 2015 14:31:57 +0000 (16:31 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 7 Aug 2015 15:19:03 +0000 (17:19 +0200)
commit8f2535dec1fdd969e86aa39c8a2583c723341733
treeafa4e9368661a341d46f5936c31db11f77ac2f54
parent8dc27259255b79758367789ed272e909bdb56735
numa_conf: Introduce virDomainNumaGetMaxCPUID

This function should return the greatest CPU number set in
/domain/cpu/numa/cell/@cpus. The idea is that we should compare
the returned value against /domain/vcpu value. Yes, there exist
users who think the following is a good idea:

  <vcpu placement='static'>4</vcpu>
  <cpu mode='host-model'>
    <model fallback='allow'/>
    <numa>
      <cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
      <cell id='1' cpus='9-10' memory='2097152' unit='KiB'/>
    </numa>
  </cpu>

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/numa_conf.c
src/conf/numa_conf.h
src/libvirt_private.syms