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

[Xen-changelog] [xen-unstable] x86 hvm cpuid: fix some problem with the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 hvm cpuid: fix some problem with the hvm's cpuid configuration.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 May 2008 08:10:08 -0700
Delivery-date: Thu, 01 May 2008 08:57:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1209654516 -3600
# Node ID eb3437db158ba73d5df1ae93074916709e1dc481
# Parent  45c975a6554d75e6661996a1b97dcc8c01d49888
x86 hvm cpuid: 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@xxxxxxxxxxxxx>
---
 tools/libxc/xc_cpuid_x86.c        |    3 +++
 tools/python/xen/lowlevel/xc/xc.c |    2 +-
 tools/python/xen/xm/create.py     |    4 +++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff -r 45c975a6554d -r eb3437db158b tools/libxc/xc_cpuid_x86.c
--- a/tools/libxc/xc_cpuid_x86.c        Thu May 01 16:07:56 2008 +0100
+++ b/tools/libxc/xc_cpuid_x86.c        Thu May 01 16:08:36 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 45c975a6554d -r eb3437db158b tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Thu May 01 16:07:56 2008 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Thu May 01 16:08:36 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 45c975a6554d -r eb3437db158b tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Thu May 01 16:07:56 2008 +0100
+++ b/tools/python/xen/xm/create.py     Thu May 01 16:08:36 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']

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 hvm cpuid: fix some problem with the hvm's cpuid configuration., Xen patchbot-unstable <=