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] [IA64] Fix LOAD_PHYSICAL for INIT handler

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Fix LOAD_PHYSICAL for INIT handler
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Dec 2007 08:40:08 -0800
Delivery-date: Thu, 13 Dec 2007 08:40:10 -0800
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 Alex Williamson <alex.williamson@xxxxxx>
# Date 1197393251 25200
# Node ID 35b2c54f59d5ab9c8fa414be86f2668da4149b6a
# Parent  4054cd60895b667eb349221effb678bb5244042e
[IA64] Fix LOAD_PHYSICAL for INIT handler

Xen virtual address space moves to 0xf400000004000000.
So LOAD_PHYSICAL is broken. I fixed LOAD_PHYSICAL with ia64 patch.
This patch also fixes INIT handler.

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/linux-xen/setup.c               |    2 --
 xen/arch/ia64/xen/xenpatch.c                  |   24 ++++++++++++++++++++++++
 xen/include/asm-ia64/linux-xen/asm/asmmacro.h |    8 --------
 3 files changed, 24 insertions(+), 10 deletions(-)

diff -r 4054cd60895b -r 35b2c54f59d5 xen/arch/ia64/linux-xen/setup.c
--- a/xen/arch/ia64/linux-xen/setup.c   Mon Dec 10 13:49:22 2007 +0000
+++ b/xen/arch/ia64/linux-xen/setup.c   Tue Dec 11 10:14:11 2007 -0700
@@ -500,9 +500,7 @@ setup_arch (char **cmdline_p)
 {
        unw_init();
 
-#ifndef XEN
        ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) 
__end___vtop_patchlist);
-#endif
 
        *cmdline_p = __va(ia64_boot_param->command_line);
 #ifndef XEN
diff -r 4054cd60895b -r 35b2c54f59d5 xen/arch/ia64/xen/xenpatch.c
--- a/xen/arch/ia64/xen/xenpatch.c      Mon Dec 10 13:49:22 2007 +0000
+++ b/xen/arch/ia64/xen/xenpatch.c      Tue Dec 11 10:14:11 2007 -0700
@@ -106,6 +106,30 @@ static void __init xen_patch_frametable_
 #endif
 }
 
+/*
+ * We need sometimes to load the physical address of a kernel
+ * object.  Often we can convert the virtual address to physical
+ * at execution time, but sometimes (either for performance reasons
+ * or during error recovery) we cannot to this.  Patch the marked
+ * bundles to load the physical address.
+ */
+void __init
+ia64_patch_vtop (unsigned long start, unsigned long end)
+{
+       s32 *offp = (s32 *)start;
+       u64 ip;
+
+       while (offp < (s32 *)end) {
+               ip = (u64)offp + *offp;
+
+               /* replace virtual address with corresponding physical address 
*/
+               ia64_patch_imm64(ip, ia64_tpa(get_imm64(ip)));
+               ia64_fc((void *)ip);
+               ++offp;
+       }
+       ia64_sync_i();
+       ia64_srlz_i();
+}
 
 void __init xen_patch_kernel(void)
 {
diff -r 4054cd60895b -r 35b2c54f59d5 
xen/include/asm-ia64/linux-xen/asm/asmmacro.h
--- a/xen/include/asm-ia64/linux-xen/asm/asmmacro.h     Mon Dec 10 13:49:22 
2007 +0000
+++ b/xen/include/asm-ia64/linux-xen/asm/asmmacro.h     Tue Dec 11 10:14:11 
2007 -0700
@@ -59,17 +59,9 @@ name:
        .section ".data.patch.vtop", "a"        // declare section & section 
attributes
        .previous
 
-#ifdef XEN
-#define        LOAD_PHYSICAL(pr, reg, obj)             \
-[1:](pr)movl reg = obj;;                       \
-       shl reg = reg,4;;                       \
-       shr.u reg = reg,4;;                     \
-       .xdata4 ".data.patch.vtop", 1b-.
-#else
 #define        LOAD_PHYSICAL(pr, reg, obj)             \
 [1:](pr)movl reg = obj;                                \
        .xdata4 ".data.patch.vtop", 1b-.
-#endif
 
 /*
  * For now, we always put in the McKinley E9 workaround.  On CPUs that don't 
need it,

_______________________________________________
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] [IA64] Fix LOAD_PHYSICAL for INIT handler, Xen patchbot-unstable <=