All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: Check the length of cpuid inputs
@ 2008-07-21 11:45 Jean Guyader
  0 siblings, 0 replies; only message in thread
From: Jean Guyader @ 2008-07-21 11:45 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]


tools: cpuid inputs must be 32 character long if hexadecimal value is 
not used.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>

-- 
Jean Guyader

[-- Attachment #2: cpuid_check_length.patch --]
[-- Type: text/plain, Size: 758 bytes --]

diff -r 63317b6c3eab tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py	Mon Jul 14 15:21:03 2008 +0100
+++ b/tools/python/xen/xm/create.py	Mon Jul 21 12:40:53 2008 +0100
@@ -955,6 +960,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)
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-21 11:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-21 11:45 [PATCH] tools: Check the length of cpuid inputs Jean Guyader

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.