[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Kexec: Zap VHPT in relocate_kernel



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1190931994 21600
# Node ID cbe97b8802e928233b9e4de9db6bbd1c40391b6f
# Parent  687de7ae22983e4078c1fd945e72c47641ac4592
[IA64] Kexec: Zap VHPT in relocate_kernel

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?

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 xen/arch/ia64/xen/machine_kexec.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r 687de7ae2298 -r cbe97b8802e9 xen/arch/ia64/xen/machine_kexec.c
--- a/xen/arch/ia64/xen/machine_kexec.c Thu Sep 27 16:24:02 2007 -0600
+++ b/xen/arch/ia64/xen/machine_kexec.c Thu Sep 27 16:26:34 2007 -0600
@@ -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
                                  __va(image->reboot_code_buffer);
        unsigned long cpu_data_pa = (unsigned long)
                                  __pa(cpu_data(smp_processor_id()));
+       unsigned long vhpt;
        int ii;
 
        /* Interrupts aren't acceptable while we reboot */
@@ -79,10 +83,12 @@ static void ia64_machine_kexec(struct un
        while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR)
                ia64_eoi();
        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();
 }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.