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-ia64-devel

Re: [Xen-ia64-devel] Re: PATCH: all registers in vcpu_guest_context

To: tgingold@xxxxxxx
Subject: Re: [Xen-ia64-devel] Re: PATCH: all registers in vcpu_guest_context
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Thu, 10 May 2007 12:56:16 -0600
Cc: Xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 10 May 2007 11:55:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1178782418.4642cad24b3d9@xxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: HP OSLO R&D
References: <20070506044328.GA2928@saphi> <1178582607.23328.104.camel@bling> <1178763147.27751.1.camel@bling> <1178782418.4642cad24b3d9@xxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2007-05-10 at 09:33 +0200, tgingold@xxxxxxx wrote:
> Quoting Alex Williamson <alex.williamson@xxxxxx>:
> >    I just noticed another problem, checker doesn't build on x86_32/64
> > with this:
> Yes, I saw this yesterday during a cross-make.
> 
> > Could you take a look?  Thanks,
> I won't be able to fix this before 2 or 3 weeks (I am away).
> The fix is not trivial because mkheader.py doesn't handle union yet.
> 
> A simple work-around is not to build ia64.h on x86.
> 
> Sorry for this issue.

Hi Tristan,

   Is something like the patch below what you had in mind?  Thanks,

        Alex


Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---

diff -r eabda101b0c5 xen/include/public/foreign/mkheader.py
--- a/xen/include/public/foreign/mkheader.py    Tue May 08 13:12:52 2007 -0600
+++ b/xen/include/public/foreign/mkheader.py    Thu May 10 12:39:21 2007 -0600
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 
 import sys, re;
-from structs import structs, defines;
+from structs import unions, structs, defines;
 
 # command line arguments
 arch    = sys.argv[1];
@@ -110,6 +110,16 @@ input = re.compile("/\*(.*?)\*/", re.S).
 input = re.compile("/\*(.*?)\*/", re.S).sub("", input)
 input = re.compile("\n\s*\n", re.S).sub("\n", input);
 
+# add unions to output
+for union in unions:
+    regex = "union\s+%s\s*\{(.*?)\n\};" % union;
+    match = re.search(regex, input, re.S)
+    if None == match:
+        output += "#define %s_has_no_%s 1\n" % (arch, union);
+    else:
+        output += "union %s_%s {%s\n};\n" % (union, arch, match.group(1));
+    output += "\n";
+
 # add structs to output
 for struct in structs:
     regex = "struct\s+%s\s*\{(.*?)\n\};" % struct;
@@ -135,6 +145,10 @@ for define in defines:
         replace = define + "_" + arch;
     output = re.sub("\\b%s\\b" % define, replace, output);
 
+# replace: unions
+for union in unions:
+    output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output);
+
 # replace: structs + struct typedefs
 for struct in structs:
     output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output);
diff -r eabda101b0c5 xen/include/public/foreign/reference.size
--- a/xen/include/public/foreign/reference.size Tue May 08 13:12:52 2007 -0600
+++ b/xen/include/public/foreign/reference.size Thu May 10 12:53:04 2007 -0600
@@ -7,7 +7,8 @@ cpu_user_regs        |      68     200  
 cpu_user_regs        |      68     200     496
 xen_ia64_boot_param  |       -       -      96
 ia64_tr_entry        |       -       -      32
-vcpu_extra_regs      |       -       -       -
+vcpu_tr_regs         |       -       -     512
+vcpu_guest_context_regs |       -       -   21872
 vcpu_guest_context   |    2800    5168   21904
 arch_vcpu_info       |      24      16       0
 vcpu_time_info       |      32      32      32
diff -r eabda101b0c5 xen/include/public/foreign/structs.py
--- a/xen/include/public/foreign/structs.py     Tue May 08 13:12:52 2007 -0600
+++ b/xen/include/public/foreign/structs.py     Thu May 10 12:49:41 2007 -0600
@@ -1,4 +1,7 @@
 # configuration: what needs translation
+
+unions  = [ "vcpu_cr_regs",
+            "vcpu_ar_regs" ];
 
 structs = [ "start_info",
             "trap_info",
@@ -6,7 +9,8 @@ structs = [ "start_info",
             "cpu_user_regs",
             "xen_ia64_boot_param",
             "ia64_tr_entry",
-            "vcpu_extra_regs",
+            "vcpu_tr_regs",
+            "vcpu_guest_context_regs",
             "vcpu_guest_context",
             "arch_vcpu_info",
             "vcpu_time_info",



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