WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] tools: Check the length of cpuid inputs

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] tools: Check the length of cpuid inputs
From: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
Date: Mon, 21 Jul 2008 12:45:00 +0100
Delivery-date: Mon, 21 Jul 2008 04:46:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509)

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

Signed-off-by: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>

--
Jean Guyader
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)
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] tools: Check the length of cpuid inputs, Jean Guyader <=