cputune: Add data structures presenting cputune XML

Also related new functions' declaration, and expose the new introduced
functions in libvirt_private.syms.

v1 - v2:
  Don't expose "virAllocVar" in libvirt_private.syms
This commit is contained in:
Osier Yang 2011-03-29 21:33:36 +08:00
parent 6b3644202a
commit 853f0fdfd9
2 changed files with 29 additions and 0 deletions

View File

@ -1029,6 +1029,21 @@ void virDomainSnapshotObjListRemove(virDomainSnapshotObjListPtr snapshots,
int virDomainSnapshotHasChildren(virDomainSnapshotObjPtr snap, int virDomainSnapshotHasChildren(virDomainSnapshotObjPtr snap,
virDomainSnapshotObjListPtr snapshots); virDomainSnapshotObjListPtr snapshots);
typedef struct _virDomainVcpupinDef virDomainVcpupinDef;
typedef virDomainVcpupinDef *virDomainVcpupinDefPtr;
struct _virDomainVcpupinDef {
int vcpuid;
char *cpumask;
};
int virDomainVcpupinIsDuplicate(virDomainVcpupinDefPtr *def,
int nvcpupin,
int vcpu);
virDomainVcpupinDefPtr virDomainVcpupinFindByVcpu(virDomainVcpupinDefPtr *def,
int nvcpupin,
int vcpu);
/* Guest VM main configuration */ /* Guest VM main configuration */
typedef struct _virDomainDef virDomainDef; typedef struct _virDomainDef virDomainDef;
typedef virDomainDef *virDomainDefPtr; typedef virDomainDef *virDomainDefPtr;
@ -1057,6 +1072,12 @@ struct _virDomainDef {
int cpumasklen; int cpumasklen;
char *cpumask; char *cpumask;
struct {
unsigned long shares;
int nvcpupin;
virDomainVcpupinDefPtr *vcpupin;
} cputune;
/* These 3 are based on virDomainLifeCycleAction enum flags */ /* These 3 are based on virDomainLifeCycleAction enum flags */
int onReboot; int onReboot;
int onPoweroff; int onPoweroff;
@ -1256,6 +1277,11 @@ int virDomainCpuSetParse(const char **str,
char *virDomainCpuSetFormat(char *cpuset, char *virDomainCpuSetFormat(char *cpuset,
int maxcpu); int maxcpu);
int virDomainVcpupinAdd(virDomainDefPtr def,
unsigned char *cpumap,
int maplen,
int vcpu);
int virDomainDiskInsert(virDomainDefPtr def, int virDomainDiskInsert(virDomainDefPtr def,
virDomainDiskDefPtr disk); virDomainDiskDefPtr disk);
void virDomainDiskInsertPreAlloced(virDomainDefPtr def, void virDomainDiskInsertPreAlloced(virDomainDefPtr def,

View File

@ -320,6 +320,9 @@ virDomainTimerTickpolicyTypeFromString;
virDomainTimerTickpolicyTypeToString; virDomainTimerTickpolicyTypeToString;
virDomainTimerTrackTypeFromString; virDomainTimerTrackTypeFromString;
virDomainTimerTrackTypeToString; virDomainTimerTrackTypeToString;
virDomainVcpupinAdd;
virDomainVcpupinFindByVcpu;
virDomainVcpupinIsDuplicate;
virDomainVideoDefFree; virDomainVideoDefFree;
virDomainVideoDefaultRAM; virDomainVideoDefaultRAM;
virDomainVideoDefaultType; virDomainVideoDefaultType;