- 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>
for ( i = 0; i < 4; i++ )
{
if ( config[i] == NULL )
+ {
+ regs[i] = polregs[i];
continue;
+ }
config_transformed[i] = alloc_str();
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;
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']