debuggers.hg
changeset 17589:eb3437db158b
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>
- 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>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu May 01 16:08:36 2008 +0100 (2008-05-01) |
parents | 45c975a6554d |
children | 84a066b9e57a |
files | tools/libxc/xc_cpuid_x86.c tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xm/create.py |
line diff
1.1 --- a/tools/libxc/xc_cpuid_x86.c Thu May 01 16:07:56 2008 +0100 1.2 +++ b/tools/libxc/xc_cpuid_x86.c Thu May 01 16:08:36 2008 +0100 1.3 @@ -385,7 +385,10 @@ int xc_cpuid_set( 1.4 for ( i = 0; i < 4; i++ ) 1.5 { 1.6 if ( config[i] == NULL ) 1.7 + { 1.8 + regs[i] = polregs[i]; 1.9 continue; 1.10 + } 1.11 1.12 config_transformed[i] = alloc_str(); 1.13
2.1 --- a/tools/python/xen/lowlevel/xc/xc.c Thu May 01 16:07:56 2008 +0100 2.2 +++ b/tools/python/xen/lowlevel/xc/xc.c Thu May 01 16:08:36 2008 +0100 2.3 @@ -696,7 +696,7 @@ static PyObject *pyxc_dom_set_cpuid(XcOb 2.4 unsigned int input[2]; 2.5 char *regs[4], *regs_transform[4]; 2.6 2.7 - if ( !PyArg_ParseTuple(args, "iiOO", &domid, 2.8 + if ( !PyArg_ParseTuple(args, "IIOO", &domid, 2.9 &input[0], &sub_input, &config) ) 2.10 return NULL; 2.11
3.1 --- a/tools/python/xen/xm/create.py Thu May 01 16:07:56 2008 +0100 3.2 +++ b/tools/python/xen/xm/create.py Thu May 01 16:08:36 2008 +0100 3.3 @@ -856,7 +856,9 @@ def preprocess_cpuid(vals, attr_name): 3.4 if not vals.cpuid: return 3.5 cpuid = {} 3.6 for cpuid_input in getattr(vals, attr_name): 3.7 - cpuid_match = re.match(r"(?P<input>(0x)?[0-9A-Fa-f]+):(?P<regs>.*)", cpuid_input) 3.8 + input_re = "(0x)?[0-9A-Fa-f]+(,(0x)?[0-9A-Fa-f]+)?" 3.9 + cpuid_match = re.match(r'(?P<input>%s):(?P<regs>.*)' % \ 3.10 + input_re, cpuid_input) 3.11 if cpuid_match != None: 3.12 res_cpuid = cpuid_match.groupdict() 3.13 input = res_cpuid['input']