add new API virDomain{G, S}etNumaParameters

Set up the types for the numa functions and insert them into the
virDriver structure definition.
This commit is contained in:
Hu Tao
2011-12-20 16:35:00 +08:00
committed by Eric Blake
parent 9d3a721ad5
commit c57ca57034
6 changed files with 191 additions and 8 deletions

View File

@@ -1344,6 +1344,45 @@ typedef enum {
} virDomainMemoryModFlags;
/* Manage numa parameters */
/**
* virDomainNumatuneMemMode:
* Representation of the various modes in the <numatune> element of
* a domain.
*/
typedef enum {
VIR_DOMAIN_NUMATUNE_MEM_STRICT = 0,
VIR_DOMAIN_NUMATUNE_MEM_PREFERRED = 1,
VIR_DOMAIN_NUMATUNE_MEM_INTERLEAVE = 2,
/* This constant is subject to change */
VIR_DOMAIN_NUMATUNE_MEM_LAST
} virDomainNumatuneMemMode;
/**
* VIR_DOMAIN_NUMA_NODESET:
*
* Macro for typed parameter name that lists the numa nodeset of a
* domain, as a string.
*/
#define VIR_DOMAIN_NUMA_NODESET "numa_nodeset"
/**
* VIR_DOMAIN_NUMA_MODE:
*
* Macro for typed parameter name that lists the numa mode of a domain,
* as an int containing a virDomainNumatuneMemMode value.
*/
#define VIR_DOMAIN_NUMA_MODE "numa_mode"
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
*/