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

[Xen-ia64-devel] [patch 08/14] Kexec: Zap VHPT in relocate_kernel

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [patch 08/14] Kexec: Zap VHPT in relocate_kernel
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Wed, 12 Sep 2007 17:08:53 +0900
Delivery-date: Wed, 12 Sep 2007 01:43:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
References: <20070912080845.674923870@xxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
On XEN do_ia64_purge_tlb unpins the VHPT entry, so it seems
logical that relocate_kernel should do the same thing.
It seems to work, but is it correct?

There is a companion hypervisor portion of this patch

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Index: xen-unstable.hg/xen/arch/ia64/xen/machine_kexec.c
===================================================================
--- xen-unstable.hg.orig/xen/arch/ia64/xen/machine_kexec.c      2007-08-16 
17:17:01.000000000 +0900
+++ xen-unstable.hg/xen/arch/ia64/xen/machine_kexec.c   2007-08-16 
17:17:07.000000000 +0900
@@ -12,12 +12,14 @@
 #include <xen/lib.h>
 #include <xen/types.h>
 #include <xen/smp.h>
+#include <xen/acpi.h>
 #include <public/kexec.h>
 #include <linux/efi.h>
 #include <asm/delay.h>
 #include <asm/meminit.h>
 #include <asm/hw_irq.h>
 #include <asm/kexec.h>
+#include <asm/vhpt.h>
 #include <linux/cpu.h>
 #include <linux/cpu.h>
 #include <linux/notifier.h>
@@ -29,7 +31,8 @@ typedef asmlinkage NORET_TYPE void (*rel
                                        unsigned long pal_addr,
                                        unsigned long cpu_data_pa,
                                        unsigned long kernel_start,
-                                       unsigned long page_offset)
+                                       unsigned long page_offset,
+                                       unsigned long vhpt)
                                        ATTRIB_NORET;
 
 #define kexec_flush_icache_page(page)                                  \
@@ -55,6 +58,7 @@ static void ia64_machine_kexec(struct un
     unsigned long cpu_data_pa = (unsigned long)
                                __pa(cpu_data(smp_processor_id()));
     unsigned long vector;
+    unsigned long vhpt;
     int ii;
 
     /* Interrupts aren't acceptable while we reboot */
@@ -82,11 +86,13 @@ static void ia64_machine_kexec(struct un
         vector = ia64_get_ivr();
     }
     platform_kernel_launch_event();
+    vhpt = __va_ul(vcpu_vhpt_maddr(current));
+    BUG_ON(!vhpt);
     rnk = (relocate_new_kernel_t)&code_addr;
     (*rnk)(image->indirection_page, image->start_address,
           ia64_boot_param,
            GRANULEROUNDDOWN((unsigned long) pal_vaddr), cpu_data_pa,
-          KERNEL_START, PAGE_OFFSET);
+          KERNEL_START, PAGE_OFFSET, vhpt);
     BUG();
 }
 

-- 

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


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

<Prev in Thread] Current Thread [Next in Thread>