On 09/10/2014 08:08 AM, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> > --- > src/conf/domain_conf.h | 94 ++++++++++++++++++++++++++++++-------------------- > 1 file changed, 57 insertions(+), 37 deletions(-) > Little light on the description. There are those that would prefer 3 patches - one for each structure... The Blkiotune and PM are unrelated... > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h > index efae2f5..c82b224 100644 > --- a/src/conf/domain_conf.h > +++ b/src/conf/domain_conf.h > @@ -1894,6 +1894,59 @@ struct _virDomaiHugePage { Hmmmm... Seeing as you're fixing things - do you see it? would't it be ice to fix this oe too? :-) > unsigned long long size; /* hugepage size in KiB */ > }; > > +typedef struct _virDomainCputune virDomainCputune; > +typedef virDomainCputune *virDomainCputunePtr; > + > +struct _virDomainCputune { > + unsigned long shares; > + bool sharesSpecified; > + unsigned long long period; > + long long quota; > + unsigned long long emulator_period; > + long long emulator_quota; > + size_t nvcpupin; > + virDomainVcpuPinDefPtr *vcpupin; > + virDomainVcpuPinDefPtr emulatorpin; > +}; > + > +typedef struct _virDomainBlkiotune virDomainBlkiotune; > +typedef virDomainBlkiotune *virDomainBlkiotunePtr; > + > +struct _virDomainBlkiotune { > + unsigned int weight; > + > + size_t ndevices; > + virBlkioDevicePtr devices; > +}; > + > +typedef struct _virDomainMemtune virDomainMemtune; > +typedef virDomainMemtune *virDomainMemtunePtr; > + > +struct _virDomainMemtune { > + unsigned long long max_balloon; /* in kibibytes */ > + unsigned long long cur_balloon; /* in kibibytes */ > + > + virDomainHugePagePtr hugepages; > + size_t nhugepages; > + > + bool nosharepages; > + bool locked; > + int dump_core; /* enum virTristateSwitch */ > + unsigned long long hard_limit; /* in kibibytes */ > + unsigned long long soft_limit; /* in kibibytes */ > + unsigned long long min_guarantee; /* in kibibytes */ > + unsigned long long swap_hard_limit; /* in kibibytes */ > +}; > + > +typedef struct _virDomainPM virDomainPM; > +typedef virDomainPM *virDomainPMPtr; > + > +struct _virDomainPM { s/PM/PowerManagement > + /* These options are of type enum virTristateBool */ > + int s3; > + int s4; > +}; > + > /* > * Guest VM main configuration > * > @@ -1910,28 +1963,9 @@ struct _virDomainDef { > char *title; > char *description; > > - struct { > - unsigned int weight; > - > - size_t ndevices; > - virBlkioDevicePtr devices; > - } blkio; > + virDomainBlkiotune blkio; > + virDomainMemtune mem; > > - struct { > - unsigned long long max_balloon; /* in kibibytes */ > - unsigned long long cur_balloon; /* in kibibytes */ > - > - virDomainHugePagePtr hugepages; > - size_t nhugepages; > - > - bool nosharepages; > - bool locked; > - int dump_core; /* enum virTristateSwitch */ > - unsigned long long hard_limit; /* in kibibytes */ > - unsigned long long soft_limit; /* in kibibytes */ > - unsigned long long min_guarantee; /* in kibibytes */ > - unsigned long long swap_hard_limit; /* in kibibytes */ > - } mem; > unsigned short vcpus; > unsigned short maxvcpus; > int placement_mode; > @@ -1939,17 +1973,7 @@ struct _virDomainDef { > > unsigned int iothreads; > > - struct { > - unsigned long shares; > - bool sharesSpecified; > - unsigned long long period; > - long long quota; > - unsigned long long emulator_period; > - long long emulator_quota; > - size_t nvcpupin; > - virDomainVcpuPinDefPtr *vcpupin; > - virDomainVcpuPinDefPtr emulatorpin; > - } cputune; > + virDomainCputune cputune; > > virDomainNumatunePtr numatune; > virDomainResourceDefPtr resource; > @@ -1962,11 +1986,7 @@ struct _virDomainDef { > > int onLockFailure; /* enum virDomainLockFailureAction */ > > - struct { > - /* These options are of type enum virTristateBool */ > - int s3; > - int s4; > - } pm; > + virDomainPM pm; > > virDomainOSDef os; > char *emulator; > -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list