]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
vcpupin: introduce the new libvirt API (virDomainGetVcpupinInfo)
authorTaku Izumi <izumi.taku@jp.fujitsu.com>
Fri, 24 Jun 2011 08:56:21 +0000 (17:56 +0900)
committerEric Blake <eblake@redhat.com>
Fri, 24 Jun 2011 23:00:22 +0000 (17:00 -0600)
commite261987c5a84f22dfd57554bd5ce5c4033c822d6
tree73893c356a840e2bbc92c979fe6ee599350751c9
parent303133ee492e07e2bc5e97f1ae792779d54a1fbd
vcpupin: introduce the new libvirt API (virDomainGetVcpupinInfo)

This patch introduces a new libvirt API (virDomainGetVcpupinInfo),
as a counterpart to virDomainPinVcpuFlags.

We can use virDomainGetVcpus API to retrieve CPU affinity information,
but can't use this API against inactive domains (at least in case of KVM),
as it lacks a flags parameter.
The usual thing is to add a new virDomainGetVcpusFlags, but that API name
is already occupied by the counterpart to virDomainGetMaxVcpus, which
has a completely different signature.

The virDomainGetVcpupinInfo is the new API to retrieve CPU affinity
information of active and inactive domains.  While the usual convention
is to list an array before its length, this API violates that rule
in order to be more like virDomainGetVcpus (where maxinfo was doing
double-duty as the length of two different arrays).

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
include/libvirt/libvirt.h.in
src/driver.h
src/libvirt.c
src/libvirt_public.syms