On 03/30/2011 11:38 PM, Taku Izumi wrote:
This patch introduces a new libvirt API (virDomainPinVcpuFlags)
Signed-off-by: Taku Izumi <izumi.taku(a)jp.fujitsu.com>
/**
+ * virDomainPinVcpuFlags:
+ * @domain: pointer to domain object, or NULL for Domain0
+ * @vcpu: virtual CPU number
+ * @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN)
+ * Each bit set to 1 means that correspoinding CPU is usable.
s/correspoinding/corresponding/
+ * Bytes are stored in little-endian order: CPU0-7, 8-15...
+ * In each byte, lowest CPU number is least significant bit.
+ * @maplen: number of bytes in cpumap, from 1 up to size of CPU map in
+ * underlying virtualization system (Xen...).
+ * If maplen < size, missing bytes are set to zero.
+ * If maplen < size, failure code is returned.
s/</>/
+ * @flags: an OR'ed set of virDomainVcpuFlags
Is VIR_DOMAIN_VCPU_MAXIMUM really applicable here? The docs should
probably mention that it is a subset of virDomainVcpuFlags.
+ *
+ * Dynamically change the real CPUs which can be allocated to a virtual CPU.
+ * This function requires privileged access to the hypervisor.
+ *
+ * @flags must include VIR_DOMAIN_VCPU_LIVE to affect a running domain
+ * (which may fail if domain is not active), or VIR_DOMAIN_MEM_CONFIG to
s/VIR_DOMAIN_MEM_CONFIG/VIR_DOMAIN_VCPU_CONFIG/
+ * affect the next boot via the XML description of the domain.
+ * Both flags may be set.
+ *
+ * Returns 0 in case of success, -1 in case of failure.
+ *
+ */
+int
+virDomainPinVcpuFlags(virDomainPtr domain, unsigned int vcpu,
+ unsigned char *cpumap, int maplen, unsigned int flags)
+{
Index: libvirt/src/libvirt_public.syms
===================================================================
--- libvirt.orig/src/libvirt_public.syms
+++ libvirt/src/libvirt_public.syms
@@ -434,6 +434,7 @@ LIBVIRT_0.9.0 {
virEventRunDefaultImpl;
virStorageVolDownload;
virStorageVolUpload;
+ virDomainPinVcpuFlags;
} LIBVIRT_0.8.8;
We've missed the 0.9.0 feature freeze, can you adjust this patch series
to be for 0.9.1?
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org