All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Guyader <jean.guyader@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] tools: Check the length of cpuid inputs
Date: Mon, 21 Jul 2008 12:45:00 +0100	[thread overview]
Message-ID: <488476BC.6060202@eu.citrix.com> (raw)

[-- 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

                 reply	other threads:[~2008-07-21 11:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=488476BC.6060202@eu.citrix.com \
    --to=jean.guyader@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.