[libvirt] [PATCH v3 00/13] Implement memory control api
by Nikunj A. Dadhania
Changelog from v2:
* Implement virDomainGetMemoryParameters api
* Add virDomainGetMemoryParameters to memtune command in virsh
* Provide domainGetMemoryParameters implementation for remote, QEmu and LXC
drivers
* Auto-generate code using rpcgen and remote_generate_stubs.pl
* Squash all the changes related to remote driver and remote protocol into
one single patch.
* Patch re-ordering
Changelog from v1:
* Patch re-ordering for compilation
* Folded python bindings changes to patch 01
* Added defines for string constants for memory tunables
* Typo fix: min_guarantee
* Moved initialization of function pointers in driver.h patch
This patch series implement public api for controlling various memory tunables
exported by the OS. This is based on the following RFC[1].
* Implement virDomainSetMemoryParameters api
* Provide implementation for remote, QEmu and LXC drivers
* Enable memory controller support fro QEmu
* virsh command for runtime changes to the memory parameters
* Domain configuration parsing for memory control parameters
* Cgroup memory controller code for memory hard_limit/soft_limit, swap
hard_limit
To Do
* Python bindings is just a place holder, need to implement
1. https://www.redhat.com/archives/libvir-list/2010-August/msg00607.html
2. https://www.redhat.com/archives/libvir-list/2010-August/msg00699.html
---
Nikunj A. Dadhania (13):
Adding structure and defines for virDomainSet/GetMemoryParameters
Adding virDomainSetMemoryParameters and virDomainGetMemoryParameters API
Adds xml entries for memory tunables
XML parsing for memory tunables
Implement cgroup memory controller tunables
Implement driver interface domainSetMemoryParamters for QEmu
Implement driver interface domainGetMemoryParamters for QEmu
Adding memtunables to qemuSetupCgroup
Adding memtunables to libvirt-lxc command
Implement driver interface domainSetMemoryParamters for LXC
Implement driver interface domainGetMemoryParamters for LXC
Adding memtune command to virsh tool
Remote protocol changes and implements virDomainSet/GetMemoryParameters
daemon/remote.c | 158 ++++++++++++++++++++++
daemon/remote_dispatch_args.h | 2
daemon/remote_dispatch_prototypes.h | 16 ++
daemon/remote_dispatch_ret.h | 1
daemon/remote_dispatch_table.h | 10 +
docs/schemas/domain.rng | 31 ++++
include/libvirt/libvirt.h.in | 68 +++++++++
python/generator.py | 2
python/libvirt-override-api.xml | 12 ++
python/libvirt-override.c | 14 ++
src/conf/domain_conf.c | 50 ++++++-
src/conf/domain_conf.h | 12 +-
src/driver.h | 12 ++
src/esx/esx_driver.c | 2
src/esx/esx_vmx.c | 30 ++--
src/libvirt.c | 103 ++++++++++++++
src/libvirt_private.syms | 6 +
src/libvirt_public.syms | 6 +
src/lxc/lxc_controller.c | 24 +++
src/lxc/lxc_driver.c | 213 ++++++++++++++++++++++++++++-
src/openvz/openvz_driver.c | 10 +
src/phyp/phyp_driver.c | 2
src/qemu/qemu.conf | 4 -
src/qemu/qemu_conf.c | 11 +-
src/qemu/qemu_driver.c | 256 ++++++++++++++++++++++++++++++++++-
src/remote/remote_driver.c | 146 ++++++++++++++++++++
src/remote/remote_protocol.c | 84 +++++++++++
src/remote/remote_protocol.h | 56 ++++++++
src/remote/remote_protocol.x | 42 ++++++
src/test/test_driver.c | 14 +-
src/uml/uml_conf.c | 2
src/uml/uml_driver.c | 16 +-
src/util/cgroup.c | 106 ++++++++++++++
src/util/cgroup.h | 7 +
src/xen/xen_driver.c | 2
tools/virsh.c | 130 ++++++++++++++++++
36 files changed, 1592 insertions(+), 68 deletions(-)
14 years, 1 month
[libvirt] [PATCH 4/8] virsh: add vrshCommandParser abstraction
by Lai Jiangshan
add vrshCommandParser and make vshCommandParse() accepts different
parsers.
the current code for parse command string is integrated as
vshCommandStringParse().
Signed-off-by: Lai Jiangshan <laijs(a)cn.fujitsu.com>
---
virsh.c | 91 +++++++++++++++++++++++++++++++---------------------------------
1 file changed, 45 insertions(+), 46 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index f97ee42..27321a5 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -10158,23 +10158,29 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd)
return ret;
}
+#define VSH_TK_ERROR -1
+#define VSH_TK_ARG 0
+#define VSH_TK_SUBCMD_END 1
+#define VSH_TK_END 2
+
+typedef struct __vshCommandParser {
+ int (*getNextArg)(vshControl *, struct __vshCommandParser *, char **);
+ char *pos;
+} vshCommandParser;
+
+static int vshCommandParse(vshControl *ctl, vshCommandParser *parser);
+
/* ---------------
* Command string parsing
* ---------------
*/
-#define VSH_TK_ERROR -1
-#define VSH_TK_NONE 0
-#define VSH_TK_DATA 1
-#define VSH_TK_END 2
static int
-vshCommandGetToken(vshControl *ctl, char *str, char **end, char **res)
+vshCommandStringGetArg(vshControl *ctl, vshCommandParser *parser, char **res)
{
bool double_quote = false;
int sz = 0;
- char *p = str, *q;
-
- *end = NULL;
+ char *p = parser->pos, *q;
while (p && *p && (*p == ' ' || *p == '\t'))
p++;
@@ -10182,8 +10188,8 @@ vshCommandGetToken(vshControl *ctl, char *str, char **end, char **res)
if (p == NULL || *p == '\0')
return VSH_TK_END;
if (*p == ';') {
- *end = ++p; /* = \0 or begin of next command */
- return VSH_TK_END;
+ parser->pos = ++p; /* = \0 or begin of next command */
+ return VSH_TK_SUBCMD_END;
}
q = p;
@@ -10218,14 +10224,25 @@ copy:
}
*(*res + sz) = '\0';
- *end = p;
- return VSH_TK_DATA;
+ parser->pos = p;
+ return VSH_TK_ARG;
+}
+
+static int vshCommandStringParse(vshControl *ctl, char *cmdstr)
+{
+ vshCommandParser parser;
+
+ if (cmdstr == NULL || *cmdstr == '\0')
+ return FALSE;
+
+ parser.pos = cmdstr;
+ parser.getNextArg = vshCommandStringGetArg;
+ return vshCommandParse(ctl, &parser);
}
static int
-vshCommandParse(vshControl *ctl, char *cmdstr)
+vshCommandParse(vshControl *ctl, vshCommandParser *parser)
{
- char *str;
char *tkdata = NULL;
vshCmd *clast = NULL;
vshCmdOpt *first = NULL;
@@ -10235,44 +10252,27 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
ctl->cmd = NULL;
}
- if (cmdstr == NULL || *cmdstr == '\0')
- return FALSE;
-
- str = cmdstr;
- while (str && *str) {
+ for (;;) {
vshCmdOpt *last = NULL;
const vshCmdDef *cmd = NULL;
- int tk = VSH_TK_NONE;
+ int tk;
int data_ct = 0;
first = NULL;
- while (tk != VSH_TK_END) {
- char *end = NULL;
+ for (;;) {
const vshCmdOptDef *opt = NULL;
tkdata = NULL;
+ tk = parser->getNextArg(ctl, parser, &tkdata);
- /* get token */
- tk = vshCommandGetToken(ctl, str, &end, &tkdata);
-
- str = end;
-
- if (tk == VSH_TK_END) {
- VIR_FREE(tkdata);
- break;
- }
if (tk == VSH_TK_ERROR)
goto syntaxError;
+ if (tk != VSH_TK_ARG)
+ break;
if (cmd == NULL) {
/* first token must be command name */
- if (tk != VSH_TK_DATA) {
- vshError(ctl,
- _("unexpected token (command name): '%s'"),
- tkdata);
- goto syntaxError;
- }
if (!(cmd = vshCmddefSearch(tkdata))) {
vshError(ctl, _("unknown command: '%s'"), tkdata);
goto syntaxError; /* ... or ignore this command only? */
@@ -10299,11 +10299,10 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
if (optstr)
tkdata = optstr;
else
- tk = vshCommandGetToken(ctl, str, &end, &tkdata);
- str = end;
+ tk = parser->getNextArg(ctl, parser, &tkdata);
if (tk == VSH_TK_ERROR)
goto syntaxError;
- if (tk != VSH_TK_DATA) {
+ if (tk != VSH_TK_ARG) {
vshError(ctl,
_("expected syntax: --%s <%s>"),
opt->name,
@@ -10320,7 +10319,7 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
goto syntaxError;
}
}
- } else if (tk == VSH_TK_DATA) {
+ } else {
if (!(opt = vshCmddefGetData(cmd, data_ct++))) {
vshError(ctl, _("unexpected data '%s'"), tkdata);
goto syntaxError;
@@ -10347,8 +10346,6 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
opt->type != VSH_OT_BOOL ? _("optdata") : _("bool"),
opt->type != VSH_OT_BOOL ? arg->data : _("(none)"));
}
- if (!str)
- break;
}
/* command parsed -- allocate new struct for the command */
@@ -10370,6 +10367,9 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
clast->next = c;
clast = c;
}
+
+ if (tk == VSH_TK_END)
+ break;
}
return TRUE;
@@ -10385,7 +10385,6 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
return FALSE;
}
-
/* ---------------
* Misc utils
* ---------------
@@ -11086,7 +11085,7 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
strncat(cmdstr, " ", sz--);
}
vshDebug(ctl, 2, "command: \"%s\"\n", cmdstr);
- ret = vshCommandParse(ctl, cmdstr);
+ ret = vshCommandStringParse(ctl, cmdstr);
VIR_FREE(cmdstr);
return ret;
@@ -11165,7 +11164,7 @@ main(int argc, char **argv)
#if USE_READLINE
add_history(ctl->cmdstr);
#endif
- if (vshCommandParse(ctl, ctl->cmdstr))
+ if (vshCommandStringParse(ctl, ctl->cmdstr))
vshCommandRun(ctl, ctl->cmd);
}
VIR_FREE(ctl->cmdstr);
14 years, 1 month
[libvirt] [PATCH 7/8] virsh: support single quote
by Lai Jiangshan
Some use may type command like this at the virsh shell:
virsh # somecmd 'some arg'
because some users often use single quote in linux shell.
Signed-off-by: Lai Jiangshan <laijs(a)cn.fujitsu.com>
---
diff --git a/tools/virsh.c b/tools/virsh.c
index b96071d..a5b438b 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -10213,6 +10213,7 @@ static int vshCommandArgvParse(vshControl *ctl, int nargs, char **argv)
static int
vshCommandStringGetArg(vshControl *ctl, vshCommandParser *parser, char **res)
{
+ bool single_quote = false;
bool double_quote = false;
int sz = 0;
char *p = parser->pos, *q;
@@ -10232,14 +10233,23 @@ vshCommandStringGetArg(vshControl *ctl, vshCommandParser *parser, char **res)
copy:
while (*p) {
/* end of token is blank space or ';' */
- if (!double_quote && (*p == ' ' || *p == '\t' || *p == ';'))
+ if (!double_quote && !single_quote
+ && (*p == ' ' || *p == '\t' || *p == ';'))
break;
- if (*p == '\\') { /* escape */
+ if (!double_quote && *p == '\'') { /* single quote */
+ single_quote = !single_quote;
+ p++;
+ continue;
+ } else if (!single_quote && *p == '\\') { /* escape */
+ /*
+ * The same as the bash, a \ in "" is an escaper,
+ * but a \ in '' is not an escaper.
+ */
p++;
if (*p == '\0')
break;
- } else if (*p == '"') { /* double quote */
+ } else if (!single_quote && *p == '"') { /* double quote */
double_quote = !double_quote;
p++;
continue;
14 years, 1 month
[libvirt] [PATCH 6/8] virsh: add escaper \ for command string parsing
by Lai Jiangshan
add escaper \ for command string parsing, example:
virsh # cd /path/which/have/a/double\"quote
Signed-off-by: Lai Jiangshan <laijs(a)cn.fujitsu.com>
---
diff --git a/tools/virsh.c b/tools/virsh.c
index 9fd0602..b96071d 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -10235,7 +10235,11 @@ copy:
if (!double_quote && (*p == ' ' || *p == '\t' || *p == ';'))
break;
- if (*p == '"') {
+ if (*p == '\\') { /* escape */
+ p++;
+ if (*p == '\0')
+ break;
+ } else if (*p == '"') { /* double quote */
double_quote = !double_quote;
p++;
continue;
14 years, 1 month
[libvirt] [PATCH V3 0/8] virsh: rework command parsing
by Lai Jiangshan
Old virsh command parsing mashes all the args back into a string and
miss the quotes, this patches fix it. It is also needed for introducing
qemu-monitor-command which is very useful.
This patches add vrshCommandParser abstraction to parser the args.
For command string, we use vshCommandStringParse()
For command argument vector, we use vshCommandArgvParse()
And the usage was changed:
old:
virsh [options] [commands]
new:
virsh [options]... [<command_string>]
virsh [options]... <command> [args...]
So we still support commands like:
# virsh "define D.xml; dumpxml D"
"define D.xml; dumpxml D" was parsed as a commands-string.
and support commands like:
# virsh qemu-monitor-command f13guest "info cpus"
we will not mash them into a string, we use new argv parser for it.
But we don't support the command like:
# virsh "define D.xml; dumpxml" D
"define D.xml; dumpxml" was parsed as a command-name, but we have no such command-name.
Misc changed behavior:
1) support single quote
2) support escape '\'
3) a better double quoting support, the following commands are now supported:
virsh # dumpxml --"update-cpu" vm1
virsh # dumpxml --update-cpu vm"1"
4) better handling the boolean options, in old code the following commands are equivalent:
virsh # dumpxml --update-cpu=vm1
virsh # dumpxml --update-cpu vm1
after this patch applied, the first one will become illegal.
5) support "--"
The idea of this patch is from Daniel P. Berrange.
changed from V1:
changed the usage as Eric Blake suggested.
changed from V2
new vrshCommandParser abstraction
apply Eric Blake's comments.
Signed-off-by: Lai Jiangshan <laijs(a)cn.fujitsu.com>
---
virsh.c | 259 +++++++++++++++++++++++++++++++++++++---------------------------
1 file changed, 152 insertions(+), 107 deletions(-)
---
I was preparing for linuxcon japan and attended it and took a long vacation
after it, very late for V3.
14 years, 1 month
[libvirt] [PATCH 3/8] virsh: better handling the boolean option
by Lai Jiangshan
in old code the following commands are equivalent:
virsh # dumpxml --update-cpu=vm1
virsh # dumpxml --update-cpu vm1
because the old code split the option argument into 2 parts:
--update-cpu=vm1 is split into update-cpu and vm1,
and update-cpu is a boolean option, so the parser takes vm1 as another
argument, very strange.
after this patch applied, the first one will become illegal.
To achieve this, we don't parse/check options when parsing command sting,
but check options when parsing a command argument. And the argument is
not split when parsing command sting.
Signed-off-by: Lai Jiangshan <laijs(a)cn.fujitsu.com>
---
diff --git a/tools/virsh.c b/tools/virsh.c
index 1e95023..f97ee42 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -10164,14 +10164,12 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd)
*/
#define VSH_TK_ERROR -1
#define VSH_TK_NONE 0
-#define VSH_TK_OPTION 1
-#define VSH_TK_DATA 2
-#define VSH_TK_END 3
+#define VSH_TK_DATA 1
+#define VSH_TK_END 2
static int
vshCommandGetToken(vshControl *ctl, char *str, char **end, char **res)
{
- int tk = VSH_TK_NONE;
bool double_quote = false;
int sz = 0;
char *p = str, *q;
@@ -10196,22 +10194,6 @@ copy:
if (!double_quote && (*p == ' ' || *p == '\t' || *p == ';'))
break;
- /* end of option name could be '=' */
- if (tk == VSH_TK_OPTION && *p == '=') {
- p++; /* skip '=' */
- break;
- }
-
- if (tk == VSH_TK_NONE) {
- if (*p == '-' && *(p + 1) == '-' && *(p + 2)
- && c_isalnum(*(p + 2))) {
- tk = VSH_TK_OPTION;
- p += 2;
- } else {
- tk = VSH_TK_DATA;
- }
- }
-
if (*p == '"') {
double_quote = !double_quote;
p++;
@@ -10237,7 +10219,7 @@ copy:
*(*res + sz) = '\0';
*end = p;
- return tk;
+ return VSH_TK_DATA;
}
static int
@@ -10296,18 +10278,28 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
goto syntaxError; /* ... or ignore this command only? */
}
VIR_FREE(tkdata);
- } else if (tk == VSH_TK_OPTION) {
- if (!(opt = vshCmddefGetOption(cmd, tkdata))) {
+ } else if (*tkdata == '-' && *(tkdata + 1) == '-' && *(tkdata + 2)
+ && c_isalnum(*(tkdata + 2))) {
+ char *optstr = strchr(tkdata + 2, '=');
+ if (optstr) {
+ *optstr = '\0'; /* conver the '=' to '\0' */
+ optstr = vshStrdup(ctl, optstr + 1);
+ }
+ if (!(opt = vshCmddefGetOption(cmd, tkdata + 2))) {
vshError(ctl,
_("command '%s' doesn't support option --%s"),
- cmd->name, tkdata);
+ cmd->name, tkdata + 2);
+ VIR_FREE(optstr);
goto syntaxError;
}
- VIR_FREE(tkdata); /* option name */
+ VIR_FREE(tkdata);
if (opt->type != VSH_OT_BOOL) {
/* option data */
- tk = vshCommandGetToken(ctl, str, &end, &tkdata);
+ if (optstr)
+ tkdata = optstr;
+ else
+ tk = vshCommandGetToken(ctl, str, &end, &tkdata);
str = end;
if (tk == VSH_TK_ERROR)
goto syntaxError;
@@ -10319,6 +10311,14 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
VSH_OT_INT ? _("number") : _("string"));
goto syntaxError;
}
+ } else {
+ tkdata = NULL;
+ if (optstr) {
+ vshError(ctl, _("invalid '=' after option --%s"),
+ opt->name);
+ VIR_FREE(optstr);
+ goto syntaxError;
+ }
}
} else if (tk == VSH_TK_DATA) {
if (!(opt = vshCmddefGetData(cmd, data_ct++))) {
@@ -10344,8 +10344,8 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
vshDebug(ctl, 4, "%s: %s(%s): %s\n",
cmd->name,
opt->name,
- tk == VSH_TK_OPTION ? _("OPTION") : _("DATA"),
- arg->data);
+ opt->type != VSH_OT_BOOL ? _("optdata") : _("bool"),
+ opt->type != VSH_OT_BOOL ? arg->data : _("(none)"));
}
if (!str)
break;
14 years, 1 month
[libvirt] [PATCH 2/8] virsh: allow zero length arguments
by Lai Jiangshan
the following command is allowed at shell, we also make it allowed at virsh shel.
# somecmd ""
Signed-off-by: Lai Jiangshan <laijs(a)cn.fujitsu.com>
---
diff --git a/tools/virsh.c b/tools/virsh.c
index 7b6f2b6..1e95023 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -10175,7 +10175,6 @@ vshCommandGetToken(vshControl *ctl, char *str, char **end, char **res)
bool double_quote = false;
int sz = 0;
char *p = str, *q;
- char *tkstr = NULL;
*end = NULL;
@@ -10211,7 +10210,6 @@ copy:
} else {
tk = VSH_TK_DATA;
}
- tkstr = p; /* begin of token */
}
if (*p == '"') {
@@ -10229,10 +10227,6 @@ copy:
vshError(ctl, "%s", _("missing \""));
return VSH_TK_ERROR;
}
- if (tkstr == NULL || *tkstr == '\0' || p == NULL)
- return VSH_TK_END;
- if (sz == 0)
- return VSH_TK_END;
if (!*res) {
*res = vshMalloc(ctl, sz + 1);
14 years, 1 month
[libvirt] [PATCH] cpu: Remove redundant features
by Jiri Denemark
Some features provided by the recently added CPU models were mentioned
twice for each model. This was a result of automatic generation of the
XML from qemu's CPU configuration file without noticing this redundancy.
---
src/cpu/cpu_map.xml | 84 ---------------------------------------------------
1 files changed, 0 insertions(+), 84 deletions(-)
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
index 986c61d..edbb21c 100644
--- a/src/cpu/cpu_map.xml
+++ b/src/cpu/cpu_map.xml
@@ -357,284 +357,200 @@
<model name='Conroe'>
<vendor>Intel</vendor>
<feature name='sse2'/>
<feature name='sse'/>
<feature name='fxsr'/>
<feature name='mmx'/>
<feature name='pat'/>
<feature name='cmov'/>
<feature name='pge'/>
<feature name='sep'/>
<feature name='apic'/>
<feature name='cx8'/>
<feature name='mce'/>
<feature name='pae'/>
<feature name='msr'/>
<feature name='tsc'/>
<feature name='pse'/>
<feature name='de'/>
<feature name='fpu'/>
<feature name='mtrr'/>
<feature name='clflush'/>
<feature name='mca'/>
<feature name='pse36'/>
<feature name='pni'/>
<feature name='ssse3'/>
- <feature name='fxsr'/>
- <feature name='mmx'/>
- <feature name='pat'/>
- <feature name='cmov'/>
- <feature name='pge'/>
- <feature name='apic'/>
- <feature name='cx8'/>
- <feature name='mce'/>
- <feature name='pae'/>
- <feature name='msr'/>
- <feature name='tsc'/>
- <feature name='pse'/>
- <feature name='de'/>
- <feature name='fpu'/>
<feature name='lm'/>
<feature name='syscall'/>
<feature name='nx'/>
<feature name='lahf_lm'/>
</model>
<model name='Penryn'>
<vendor>Intel</vendor>
<feature name='sse2'/>
<feature name='sse'/>
<feature name='fxsr'/>
<feature name='mmx'/>
<feature name='pat'/>
<feature name='cmov'/>
<feature name='pge'/>
<feature name='sep'/>
<feature name='apic'/>
<feature name='cx8'/>
<feature name='mce'/>
<feature name='pae'/>
<feature name='msr'/>
<feature name='tsc'/>
<feature name='pse'/>
<feature name='de'/>
<feature name='fpu'/>
<feature name='mtrr'/>
<feature name='clflush'/>
<feature name='mca'/>
<feature name='pse36'/>
<feature name='pni'/>
<feature name='cx16'/>
<feature name='ssse3'/>
<feature name='sse4.1'/>
- <feature name='fxsr'/>
- <feature name='mmx'/>
- <feature name='pat'/>
- <feature name='cmov'/>
- <feature name='pge'/>
- <feature name='apic'/>
- <feature name='cx8'/>
- <feature name='mce'/>
- <feature name='pae'/>
- <feature name='msr'/>
- <feature name='tsc'/>
- <feature name='pse'/>
- <feature name='de'/>
- <feature name='fpu'/>
<feature name='lm'/>
<feature name='syscall'/>
<feature name='nx'/>
<feature name='lahf_lm'/>
</model>
<model name='Nehalem'>
<vendor>Intel</vendor>
<feature name='sse2'/>
<feature name='sse'/>
<feature name='fxsr'/>
<feature name='mmx'/>
<feature name='pat'/>
<feature name='cmov'/>
<feature name='pge'/>
<feature name='sep'/>
<feature name='apic'/>
<feature name='cx8'/>
<feature name='mce'/>
<feature name='pae'/>
<feature name='msr'/>
<feature name='tsc'/>
<feature name='pse'/>
<feature name='de'/>
<feature name='fpu'/>
<feature name='mtrr'/>
<feature name='clflush'/>
<feature name='mca'/>
<feature name='pse36'/>
<feature name='pni'/>
<feature name='cx16'/>
<feature name='ssse3'/>
<feature name='sse4.1'/>
<feature name='sse4.2'/>
<feature name='popcnt'/>
- <feature name='fxsr'/>
- <feature name='mmx'/>
- <feature name='pat'/>
- <feature name='cmov'/>
- <feature name='pge'/>
- <feature name='apic'/>
- <feature name='cx8'/>
- <feature name='mce'/>
- <feature name='pae'/>
- <feature name='msr'/>
- <feature name='tsc'/>
- <feature name='pse'/>
- <feature name='de'/>
- <feature name='fpu'/>
<feature name='lm'/>
<feature name='syscall'/>
<feature name='nx'/>
<feature name='lahf_lm'/>
</model>
<model name='Opteron_G1'>
<vendor>AMD</vendor>
<feature name='sse2'/>
<feature name='sse'/>
<feature name='fxsr'/>
<feature name='mmx'/>
<feature name='pat'/>
<feature name='cmov'/>
<feature name='pge'/>
<feature name='sep'/>
<feature name='apic'/>
<feature name='cx8'/>
<feature name='mce'/>
<feature name='pae'/>
<feature name='msr'/>
<feature name='tsc'/>
<feature name='pse'/>
<feature name='de'/>
<feature name='fpu'/>
<feature name='mtrr'/>
<feature name='clflush'/>
<feature name='mca'/>
<feature name='pse36'/>
<feature name='pni'/>
- <feature name='fxsr'/>
- <feature name='mmx'/>
- <feature name='pat'/>
- <feature name='cmov'/>
- <feature name='pge'/>
- <feature name='apic'/>
- <feature name='cx8'/>
- <feature name='mce'/>
- <feature name='pae'/>
- <feature name='msr'/>
- <feature name='tsc'/>
- <feature name='pse'/>
- <feature name='de'/>
- <feature name='fpu'/>
<feature name='lm'/>
<feature name='syscall'/>
<feature name='nx'/>
</model>
<model name='Opteron_G2'>
<vendor>AMD</vendor>
<feature name='sse2'/>
<feature name='sse'/>
<feature name='fxsr'/>
<feature name='mmx'/>
<feature name='pat'/>
<feature name='cmov'/>
<feature name='pge'/>
<feature name='sep'/>
<feature name='apic'/>
<feature name='cx8'/>
<feature name='mce'/>
<feature name='pae'/>
<feature name='msr'/>
<feature name='tsc'/>
<feature name='pse'/>
<feature name='de'/>
<feature name='fpu'/>
<feature name='mtrr'/>
<feature name='clflush'/>
<feature name='mca'/>
<feature name='pse36'/>
<feature name='pni'/>
<feature name='cx16'/>
- <feature name='fxsr'/>
- <feature name='mmx'/>
- <feature name='pat'/>
- <feature name='cmov'/>
- <feature name='pge'/>
- <feature name='apic'/>
- <feature name='cx8'/>
- <feature name='mce'/>
- <feature name='pae'/>
- <feature name='msr'/>
- <feature name='tsc'/>
- <feature name='pse'/>
- <feature name='de'/>
- <feature name='fpu'/>
<feature name='lm'/>
<feature name='syscall'/>
<feature name='nx'/>
<feature name='rdtscp'/>
<feature name='svm'/>
<feature name='lahf_lm'/>
</model>
<model name='Opteron_G3'>
<vendor>AMD</vendor>
<feature name='sse2'/>
<feature name='sse'/>
<feature name='fxsr'/>
<feature name='mmx'/>
<feature name='pat'/>
<feature name='cmov'/>
<feature name='pge'/>
<feature name='sep'/>
<feature name='apic'/>
<feature name='cx8'/>
<feature name='mce'/>
<feature name='pae'/>
<feature name='msr'/>
<feature name='tsc'/>
<feature name='pse'/>
<feature name='de'/>
<feature name='fpu'/>
<feature name='mtrr'/>
<feature name='clflush'/>
<feature name='mca'/>
<feature name='pse36'/>
<feature name='pni'/>
<feature name='cx16'/>
<feature name='monitor'/>
<feature name='popcnt'/>
- <feature name='fxsr'/>
- <feature name='mmx'/>
- <feature name='pat'/>
- <feature name='cmov'/>
- <feature name='pge'/>
- <feature name='apic'/>
- <feature name='cx8'/>
- <feature name='mce'/>
- <feature name='pae'/>
- <feature name='msr'/>
- <feature name='tsc'/>
- <feature name='pse'/>
- <feature name='de'/>
- <feature name='fpu'/>
<feature name='lm'/>
<feature name='syscall'/>
<feature name='nx'/>
<feature name='rdtscp'/>
<feature name='svm'/>
<feature name='sse4a'/>
<feature name='abm'/>
<feature name='misalignsse'/>
<feature name='lahf_lm'/>
</model>
</arch>
</cpus>
--
1.7.3.1
14 years, 1 month
[libvirt] [PATCH 00/12] vcpus: initial implemantation of <vcpu current=x>.
by Eric Blake
As promised, here's my first round of patches to make <vcpu> support
add the ability to persistently remember if a domain should have
fewer vcpus at boot than the maximum allowed for hot-plugging.
Patches 1-10 are pretty well tested, 11 may need some tweaking to
get the semantics right, and 12 is mainly for RFC, since I need
help finishing off the series.
Eric Blake (12):
vcpu: improve cpuset attribute
vcpu: add current attribute to <vcpu> element
vcpu: add new public API
vcpu: define internal driver API
vcpu: implement the public APIs
vcpu: implement the remote protocol
vcpu: make old API trivially wrap to new API
vcpu: support maxvcpu in domain_conf
vcpu: add virsh support
vcpu: improve vcpu support in qemu command line
vcpu: complete vcpu support in qemu driver
food for thought
daemon/remote.c | 53 +++++++
daemon/remote_dispatch_args.h | 2 +
daemon/remote_dispatch_prototypes.h | 16 ++
daemon/remote_dispatch_ret.h | 1 +
daemon/remote_dispatch_table.h | 10 ++
docs/formatdomain.html.in | 17 ++-
docs/schemas/domain.rng | 14 ++-
include/libvirt/libvirt.h.in | 14 ++
src/conf/domain_conf.c | 41 ++++--
src/conf/domain_conf.h | 3 +-
src/driver.h | 9 +
src/esx/esx_driver.c | 30 ++++-
src/esx/esx_vmx.c | 24 ++-
src/libvirt.c | 125 +++++++++++++++-
src/libvirt_public.syms | 6 +
src/lxc/lxc_driver.c | 2 +
src/opennebula/one_conf.c | 11 +-
src/opennebula/one_driver.c | 2 +
src/openvz/openvz_conf.c | 7 +-
src/openvz/openvz_driver.c | 47 +++++-
src/phyp/phyp_driver.c | 32 ++++-
src/qemu/qemu_conf.c | 19 ++-
src/qemu/qemu_driver.c | 119 +++++++++++++--
src/remote/remote_driver.c | 55 +++++++
src/remote/remote_protocol.c | 33 ++++
src/remote/remote_protocol.h | 26 +++
src/remote/remote_protocol.x | 19 +++-
src/remote_protocol-structs | 12 ++
src/test/test_driver.c | 34 ++++-
src/uml/uml_driver.c | 2 +
src/vbox/vbox_tmpl.c | 46 +++++-
src/xen/xen_driver.c | 32 ++++-
src/xen/xend_internal.c | 15 ++-
src/xen/xm_internal.c | 15 ++-
src/xenapi/xenapi_driver.c | 60 +++++++-
src/xenapi/xenapi_utils.c | 6 +-
tests/qemuargv2xmltest.c | 2 +
tests/qemuxml2argvdata/qemuxml2argv-smp.args | 1 +
tests/qemuxml2argvdata/qemuxml2argv-smp.xml | 28 ++++
tests/qemuxml2argvtest.c | 2 +
tests/qemuxml2xmltest.c | 2 +
tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml | 22 +++
tools/virsh.c | 211 +++++++++++++++++++++++---
tools/virsh.pod | 28 ++++-
44 files changed, 1140 insertions(+), 115 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-smp.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-smp.xml
create mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml
--
1.7.2.3
14 years, 1 month
[libvirt] [PATCH] util: add missing export
by Eric Blake
Commit 1fe2927a3 forgot to export a symbol.
* src/libvirt_private.syms (virHexToBin): Add.
* src/.gitignore: Ignore temporary file.
---
src/.gitignore | 1 +
src/libvirt_private.syms | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/.gitignore b/src/.gitignore
index 7ea8d89..a619643 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -14,4 +14,5 @@ libvirt.syms
libvirt_qemu.def
*.i
*.s
+remote_protocol-structs-t
virt-aa-helper
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 301b0ef..1d94b12 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -668,6 +668,7 @@ virFileResolveLink;
saferead;
safewrite;
safezero;
+virHexToBin;
virMacAddrCompare;
virEnumFromString;
virEnumToString;
--
1.7.2.3
14 years, 1 month