From: Jean Guyader <jean.guyader@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] hvm's cpuid config fix
Date: Wed, 30 Apr 2008 16:32:39 +0100 [thread overview]
Message-ID: <48189117.5040100@eu.citrix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
Hi,
This patch fix some problem with the hvm's cpuid configuration.
- When we overwrite a cpuid's input, apply the default policy
for the other registers.
- For the python binding, get unsigned long instead long.
- Fix the multiple inputs cpuid's configuration parsing.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
--
Jean Guyader
[-- Attachment #2: cpuid_fix.patch --]
[-- Type: text/x-diff, Size: 1676 bytes --]
diff -r 483d006cc607 tools/libxc/xc_cpuid_x86.c
--- a/tools/libxc/xc_cpuid_x86.c Fri Apr 25 13:46:27 2008 +0100
+++ b/tools/libxc/xc_cpuid_x86.c Wed Apr 30 16:18:53 2008 +0100
@@ -385,7 +385,10 @@ int xc_cpuid_set(
for ( i = 0; i < 4; i++ )
{
if ( config[i] == NULL )
+ {
+ regs[i] = polregs[i];
continue;
+ }
config_transformed[i] = alloc_str();
diff -r 483d006cc607 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Fri Apr 25 13:46:27 2008 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Wed Apr 30 16:18:53 2008 +0100
@@ -696,7 +696,7 @@ static PyObject *pyxc_dom_set_cpuid(XcOb
unsigned int input[2];
char *regs[4], *regs_transform[4];
- if ( !PyArg_ParseTuple(args, "iiOO", &domid,
+ if ( !PyArg_ParseTuple(args, "IIOO", &domid,
&input[0], &sub_input, &config) )
return NULL;
diff -r 483d006cc607 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py Fri Apr 25 13:46:27 2008 +0100
+++ b/tools/python/xen/xm/create.py Wed Apr 30 16:18:53 2008 +0100
@@ -856,7 +856,9 @@ def preprocess_cpuid(vals, attr_name):
if not vals.cpuid: return
cpuid = {}
for cpuid_input in getattr(vals, attr_name):
- cpuid_match = re.match(r"(?P<input>(0x)?[0-9A-Fa-f]+):(?P<regs>.*)", cpuid_input)
+ input_re = "(0x)?[0-9A-Fa-f]+(,(0x)?[0-9A-Fa-f]+)?"
+ cpuid_match = re.match(r'(?P<input>%s):(?P<regs>.*)' % \
+ input_re, cpuid_input)
if cpuid_match != None:
res_cpuid = cpuid_match.groupdict()
input = res_cpuid['input']
[-- 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-04-30 15:32 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=48189117.5040100@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.