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 2/7] vti save-restore: fix ia64_leave_hypervisor

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 2/7] vti save-restore: fix ia64_leave_hypervisor
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Mon, 22 Oct 2007 16:29:50 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Mon, 22 Oct 2007 00:30:25 -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>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1193021259 -32400
# Node ID c45062957ef2e79bd7e4339fd25c9a1b2f02eea3
# Parent  cd7ee3e5470185e37314d2088df8a499b3352278
fix ia64_leave_hypervisor. It doesn't restore cr.ifs depending pNonSys.
However cr.ifs isn't preserved between vcpu context switches so that
kernel bits is leaked as ar.cfm to HVM domain.
This patche fixes it.
PATCHNAME: fix_ia64_leave_hypervisor

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r cd7ee3e54701 -r c45062957ef2 xen/arch/ia64/vmx/vmx_entry.S
--- a/xen/arch/ia64/vmx/vmx_entry.S     Mon Oct 22 15:56:36 2007 +0900
+++ b/xen/arch/ia64/vmx/vmx_entry.S     Mon Oct 22 11:47:39 2007 +0900
@@ -352,7 +352,7 @@ vmx_rse_clear_invalid:
     ;;
     mov cr.ipsr=r31
     mov cr.iip=r30
-(pNonSys) mov cr.ifs=r29
+    mov cr.ifs=r29
     mov ar.pfs=r27
     adds r18=IA64_VPD_BASE_OFFSET,r21
     ;;
diff -r cd7ee3e54701 -r c45062957ef2 xen/arch/ia64/vmx/vmx_init.c
--- a/xen/arch/ia64/vmx/vmx_init.c      Mon Oct 22 15:56:36 2007 +0900
+++ b/xen/arch/ia64/vmx/vmx_init.c      Mon Oct 22 11:47:39 2007 +0900
@@ -301,7 +301,6 @@ vmx_final_setup_guest(struct vcpu *v)
 {
        vpd_t *vpd;
        int rc;
-       struct switch_stack *sw;
 
        vpd = alloc_vpd();
        ASSERT(vpd);
@@ -335,10 +334,6 @@ vmx_final_setup_guest(struct vcpu *v)
        /* Set up guest 's indicator for VTi domain*/
        set_bit(ARCH_VMX_DOMAIN, &v->arch.arch_vmx.flags);
 
-       /* Initialize pNonSys=1 for the first context switching */
-       sw = (struct switch_stack *)vcpu_regs(v) - 1;
-       sw->pr = (1UL << PRED_NON_SYSCALL);
-
        return 0;
 }
 
diff -r cd7ee3e54701 -r c45062957ef2 xen/arch/ia64/vmx/vmx_ivt.S
--- a/xen/arch/ia64/vmx/vmx_ivt.S       Mon Oct 22 15:56:36 2007 +0900
+++ b/xen/arch/ia64/vmx/vmx_ivt.S       Mon Oct 22 11:47:39 2007 +0900
@@ -913,7 +913,6 @@ GLOBAL_ENTRY(ia64_hypercall_setup)
 (p13)   mov in6=-1
 (p8)    mov in7=-1
 
-    cmp.eq pSys,pNonSys=r0,r0          // set pSys=1, pNonSys=0
     movl r17=FPSR_DEFAULT
     ;;
     mov.m ar.fpsr=r17                  // set ar.fpsr to kernel default value
diff -r cd7ee3e54701 -r c45062957ef2 xen/arch/ia64/vmx/vmx_minstate.h
--- a/xen/arch/ia64/vmx/vmx_minstate.h  Mon Oct 22 15:56:36 2007 +0900
+++ b/xen/arch/ia64/vmx/vmx_minstate.h  Mon Oct 22 11:47:39 2007 +0900
@@ -174,7 +174,6 @@
     ;;                                          \
     st8 [r16]=r29,16;   /* save b0 */                           \
     st8 [r17]=r18,16;   /* save ar.rsc value for "loadrs" */                \
-    cmp.eq pNonSys,pSys=r0,r0   /* initialize pSys=0, pNonSys=1 */          \
     ;;                                          \
 .mem.offset 0,0; st8.spill [r16]=r20,16;    /* save original r1 */             
 \
 .mem.offset 8,0; st8.spill [r17]=r12,16;                            \

Attachment: 16179_c45062957ef2_fix_ia64_leave_hypervisor.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH 2/7] vti save-restore: fix ia64_leave_hypervisor, Isaku Yamahata <=