mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
1 parent
2608f924e4
commit
1d45c8ef8c
3 files changed
+7
-2
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
@@ -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']
|
||||
|
||||