Set up the types for the numa functions and insert them into the
virDriver structure definition.
---
include/libvirt/libvirt.h.in | 23 +++++++++++++++++++++++
python/generator.py | 2 ++
src/driver.h | 15 +++++++++++++++
src/libvirt_public.syms | 6 ++++++
4 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 7181f62..7802508 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1281,6 +1281,29 @@ typedef enum {
} virDomainMemoryModFlags;
+/* Manage numa parameters */
+
+/**
+ * VIR_DOMAIN_NUMA_STRICT:
+ *
+ * Whether memory allocations are restricted to the numa nodes
+ */
+#define VIR_DOMAIN_NUMA_STRICT "numa_strict"
+
+/**
+ * VIR_DOMAIN_NUMA_EXCLUSIVE:
+ *
+ * Whether others can share the numa nodes
+ */
+#define VIR_DOMAIN_NUMA_EXCLUSIVE "numa_exclusive"
+
+int virDomainSetNumaParameters(virDomainPtr domain,
+ virTypedParameterPtr params,
+ int nparams, unsigned int flags);
+int virDomainGetNumaParameters(virDomainPtr domain,
+ virTypedParameterPtr params,
+ int *nparams, unsigned int flags);
+
/*
* Dynamic control of domains
*/
diff --git a/python/generator.py b/python/generator.py
index 71afdb7..5b09123 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -382,6 +382,8 @@ skip_impl = (
'virDomainGetBlkioParameters',
'virDomainSetMemoryParameters',
'virDomainGetMemoryParameters',
+ 'virDomainSetNumaParameters',
+ 'virDomainGetNumaParameters',
'virDomainGetVcpus',
'virDomainPinVcpu',
'virDomainPinVcpuFlags',
diff --git a/src/driver.h b/src/driver.h
index 4c14aaa..76cf966 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -158,6 +158,19 @@ typedef int
int *nparams,
unsigned int flags);
typedef int
+ (*virDrvDomainSetNumaParameters)
+ (virDomainPtr domain,
+ virTypedParameterPtr params,
+ int nparams,
+ unsigned int flags);
+typedef int
+ (*virDrvDomainGetNumaParameters)
+ (virDomainPtr domain,
+ virTypedParameterPtr params,
+ int *nparams,
+ unsigned int flags);
+
+typedef int
(*virDrvDomainSetBlkioParameters)
(virDomainPtr domain,
virTypedParameterPtr params,
@@ -787,6 +800,8 @@ struct _virDriver {
virDrvDomainSetMemoryFlags domainSetMemoryFlags;
virDrvDomainSetMemoryParameters domainSetMemoryParameters;
virDrvDomainGetMemoryParameters domainGetMemoryParameters;
+ virDrvDomainSetNumaParameters domainSetNumaParameters;
+ virDrvDomainGetNumaParameters domainGetNumaParameters;
virDrvDomainSetBlkioParameters domainSetBlkioParameters;
virDrvDomainGetBlkioParameters domainGetBlkioParameters;
virDrvDomainGetInfo domainGetInfo;
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
index bcefb10..d830974 100644
--- a/src/libvirt_public.syms
+++ b/src/libvirt_public.syms
@@ -498,4 +498,10 @@ LIBVIRT_0.9.7 {
virDomainSnapshotNumChildren;
} LIBVIRT_0.9.5;
+LIBVIRT_0.9.8 {
+ global:
+ virDomainGetNumaParameters;
+ virDomainSetNumaParameters;
+} LIBVIRT_0.9.7;
+
# .... define new API here using predicted next version number ....
--
1.7.3.1