From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Guyader Subject: [PATCH] tools: Check the length of cpuid inputs Date: Mon, 21 Jul 2008 12:45:00 +0100 Message-ID: <488476BC.6060202@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040309000903010500030708" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------040309000903010500030708 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit tools: cpuid inputs must be 32 character long if hexadecimal value is not used. Signed-off-by: Jean Guyader -- Jean Guyader --------------040309000903010500030708 Content-Type: text/plain; name="cpuid_check_length.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cpuid_check_length.patch" 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) --------------040309000903010500030708 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------040309000903010500030708--