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 04/12] ia64: kexec: Unpin shared_info and mapped

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [patch 04/12] ia64: kexec: Unpin shared_info and mapped_regs TR in ia64_do_tlb_purge
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 17:52:52 +1100
Cc: Aron Griffis <aron@xxxxxx>, Isaku Yamahata <yamahata@xxxxxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxx>
Delivery-date: Tue, 22 Apr 2008 18:33:44 -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: <20080423012200.632155842@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
Unpinning shared_info and mapped_regs seems to be missing
from ia64_do_tlb_purge and seems to be needed for kexec.

Like VHPT, the pinned value is recored in a percpu variable
so that the correct value can be unpinned.

Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Index: xen-unstable.hg/xen/arch/ia64/linux-xen/mca_asm.S
===================================================================
--- xen-unstable.hg.orig/xen/arch/ia64/linux-xen/mca_asm.S      2008-02-05 
16:18:50.000000000 +0900
+++ xen-unstable.hg/xen/arch/ia64/linux-xen/mca_asm.S   2008-02-05 
16:18:51.000000000 +0900
@@ -26,6 +26,7 @@
 #include <asm/mca.h>
 #ifdef XEN
 #include <asm/vhpt.h>
+#include <public/arch-ia64.h>
 #endif
 
 /*
@@ -320,7 +321,30 @@ ia64_do_tlb_purge:
        srlz.i
        ;;
 #ifdef XEN
-       // 5. VHPT
+       // 5. shared_info
+       // v->domain->arch.shared_info_va may not be the
+       // value of shared_info currently pinned into the TLB
+       GET_THIS_PADDR(r2, inserted_shared_info);;
+       ld8 r16=[r2]
+       mov r18=XSI_SHIFT<<2
+       ;;
+       ptr.d r16,r18
+       ;;
+       srlz.d
+       ;;
+
+       // 6. mapped_regs
+       mov r2=XMAPPEDREGS_OFS
+       mov r18=XMAPPEDREGS_SHIFT<<2
+       ;;
+       add r16=r16,r2
+       ;;
+       ptr.d r16,r18
+       ;;
+       srlz.d
+       ;;
+
+       // 7. VHPT
 #if VHPT_ENABLED
        // GET_VA_VCPU_VHPT_MADDR() may not give the
        // value of the VHPT currently pinned into the TLB
Index: xen-unstable.hg/xen/arch/ia64/xen/regionreg.c
===================================================================
--- xen-unstable.hg.orig/xen/arch/ia64/xen/regionreg.c  2008-02-05 
16:18:50.000000000 +0900
+++ xen-unstable.hg/xen/arch/ia64/xen/regionreg.c       2008-02-05 
16:18:51.000000000 +0900
@@ -231,6 +231,7 @@ set_rr(unsigned long rr, unsigned long r
 #if VHPT_ENABLED
 DEFINE_PER_CPU(unsigned long, inserted_vhpt);
 #endif
+DEFINE_PER_CPU(unsigned long, inserted_shared_info);
 
 // validates and changes a single region register
 // in the currently executing domain
@@ -268,6 +269,8 @@ int set_one_rr(unsigned long rr, unsigne
 #if VHPT_ENABLED
                __get_cpu_var(inserted_vhpt) = __va_ul(vcpu_vhpt_maddr(v));
 #endif
+               __get_cpu_var(inserted_shared_info) =
+                                       v->domain->arch.shared_info_va;
                ia64_new_rr7(vmMangleRID(newrrv.rrval),v->domain->shared_info,
                             v->arch.privregs, v->domain->arch.shared_info_va,
                             __va_ul(vcpu_vhpt_maddr(v)));

-- 

-- 
Horms


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

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