]> xenbits.xensource.com Git - libvirt.git/commitdiff
Document to not rely on virConnectGetMaxVcpus API
authorShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Fri, 24 Jun 2016 15:04:34 +0000 (20:34 +0530)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 24 Jun 2016 17:20:14 +0000 (19:20 +0200)
The API virConnectGetMaxVcpus doesn't really reflect the actual usable number
of cpus as the maximum limits can be different for kvm and/or qemu. So update
the documentation to use virConnectGetDomainCapabilities() instead.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
src/libvirt-host.c

index 24277b71b75cde7066e8e9b671784f42264f48bb..2a3de03115222f5c0f9b0d4e7d5d86f381ad544d 100644 (file)
@@ -313,7 +313,10 @@ virConnectGetSysinfo(virConnectPtr conn, unsigned int flags)
  *
  * Provides the maximum number of virtual CPUs supported for a guest VM of a
  * specific type. The 'type' parameter here corresponds to the 'type'
- * attribute in the <domain> element of the XML.
+ * attribute in the <domain> element of the XML. This API doesn't take emulator
+ * limits into consideration, hence the returned value is not guaranteed to be
+ * usable. It is recommended to use virConnectGetDomainCapabilities() and look
+ * for "<vcpu max='...'>" in its output instead.
  *
  * Returns the maximum of virtual CPU or -1 in case of error.
  */