x86 hvm cpuid: fix some problem with the hvm's cpuid configuration.

- When we overwrite a cpuid's input, apply the default policy
    for the other registers.
  - For the python binding, get unsigned long instead long.
  - Fix the multiple inputs cpuid's configuration parsing.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
This commit is contained in:
Keir Fraser committed 2008-05-01 16:08:36 +01:00
1 parent 2608f924e4
commit 1d45c8ef8c
3 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -696,7 +696,7 @@ static PyObject *pyxc_dom_set_cpuid(XcObject *self,
unsigned int input[2];
char *regs[4], *regs_transform[4];
if ( !PyArg_ParseTuple(args, "iiOO", &domid,
if ( !PyArg_ParseTuple(args, "IIOO", &domid,
&input[0], &sub_input, &config) )
return NULL;
+3 -1
View File
@@ -856,7 +856,9 @@ def preprocess_cpuid(vals, attr_name):
if not vals.cpuid: return
cpuid = {}
for cpuid_input in getattr(vals, attr_name):
cpuid_match = re.match(r"(?P<input>(0x)?[0-9A-Fa-f]+):(?P<regs>.*)", cpuid_input)
input_re = "(0x)?[0-9A-Fa-f]+(,(0x)?[0-9A-Fa-f]+)?"
cpuid_match = re.match(r'(?P<input>%s):(?P<regs>.*)' % \
input_re, cpuid_input)
if cpuid_match != None:
res_cpuid = cpuid_match.groupdict()
input = res_cpuid['input']
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.