]> xenbits.xensource.com Git - libvirt.git/commit
virNodeDevCapPCIDevParseXML: Initialize numa_node variable
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Jun 2014 09:14:20 +0000 (11:14 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Jun 2014 15:18:29 +0000 (17:18 +0200)
commitbab45585473628e9353ed3dca0869ae376714fb5
treead2a86e9b7b5ae0c70363b6b519696cbb8160d71
parent519181d932f6fa62303d65cafcd7e5fa2c98ca1f
virNodeDevCapPCIDevParseXML: Initialize numa_node variable

With one of my recent patches (1c70277) libvirt's capable of
reporting NUMA node locality for PCI devices. The node ID is
stored in pci_dev.numa_node variable. However, since zero is
valid NUMA node ID, the default is -1 as it is in kernel too.
So, if the PCI device is not tied to any specific NUMA node, the
default is then NOT printed into XML. Therefore, when parsing
node device XML, the <node/> element is optional. But currently,
if it's not there, we must set sane default, otherwise after
parsing in the memory representation doesn't match the XML. We
are already doing this in other place: udevProcessPCI().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/node_device_conf.c