On Mon, Jun 20, 2016 at 04:34:16PM +0200, Peter Krempa wrote:
Add a rather universal API implemented via typed params that will allow to query the guest agent for the state and possibly other aspects of guest vcpus. ---
[...]
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 73ae369..0971a96 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -11835,3 +11835,59 @@ virDomainInterfaceFree(virDomainInterfacePtr iface)
VIR_FREE(iface); } + + +/** + * virDomainGetGuestVcpus: + * @domain: pointer to domain object + * @params: Pointer that will be filled with an array of typed parameters
s/Pointer/pointer/
+ * @nparams: pointer filled with number of elements in @params + * @flags: currently unused, callers shall pass 0 + * + * Queries the guest agent for state and information regarding vCPUs from + * guest's perspective. The reported data depends on the guest agent + * implementation. + * + * Reported fields stored in @params: + * 'vcpus': string containing bitmap representing vCPU ids as reported by the + * guest + * 'online': string containing bitmap representing online vCPUs as reported + * by the guest agent. + * 'offlinable': string containing bitmap representing ids of vCPUs that can be + * offlined
ACK