tools: cpuid inputs must be 32 character long if hexadecimal value is
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 21 Jul 2008 13:03:26 +0000 (14:03 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 21 Jul 2008 13:03:26 +0000 (14:03 +0100)
not used.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
tools/python/xen/xm/create.py

index 30d2ce18bd2991e235abd63f6f6999b9e5be0461..3652d8c7755a55390119c48c56481f2005f86368 100644 (file)
@@ -956,6 +956,10 @@ def preprocess_cpuid(vals, attr_name):
                 if reg_match == None:
                     err("cpuid's syntax is (eax|ebx|ecx|edx)=value")
                 res = reg_match.groupdict()
+                if (res['val'][:2] != '0x' and len(res['val']) != 32):
+                    err("cpuid: We should specify all the bits " \
+                        "of the register %s for input %s\n"
+                        % (res['reg'], input) )
                 cpuid[input][res['reg']] = res['val'] # new register
     setattr(vals, attr_name, cpuid)