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] Handle VTi's fp fault & trap in hy

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Handle VTi's fp fault & trap in hypervisor instead of injecting to guest
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jun 2006 18:40:33 +0000
Delivery-date: Fri, 16 Jun 2006 11:43:46 -0700
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 awilliam@xxxxxxxxxxx
# Node ID 8771f539663a903e58f59a2a9b39ed3e37af7049
# Parent  9765174339938e4374947e2e6e9eae675c267f22
[IA64] Handle VTi's fp fault & trap in hypervisor instead of injecting to guest

Signed-off-by : Zhang xiantao <xiantao.zhang@xxxxxxxxx>
Signed-off-by : Kevin Tian    <kevin.tian@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vmx_process.c |   14 +++++++++++++-
 xen/arch/ia64/xen/process.c     |   12 +++++-------
 2 files changed, 18 insertions(+), 8 deletions(-)

diff -r 976517433993 -r 8771f539663a xen/arch/ia64/vmx/vmx_process.c
--- a/xen/arch/ia64/vmx/vmx_process.c   Sat Jun 03 15:21:07 2006 -0600
+++ b/xen/arch/ia64/vmx/vmx_process.c   Sat Jun 03 15:34:07 2006 -0600
@@ -62,6 +62,7 @@ extern void alt_itlb (VCPU *vcpu, u64 va
 extern void alt_itlb (VCPU *vcpu, u64 vadr);
 extern void itlb_fault (VCPU *vcpu, u64 vadr);
 extern void ivhpt_fault (VCPU *vcpu, u64 vadr);
+extern unsigned long handle_fpu_swa (int fp_fault, struct pt_regs *regs, 
unsigned long isr);
 
 #define DOMN_PAL_REQUEST    0x110000
 #define DOMN_SAL_REQUEST    0x110001
@@ -84,8 +85,19 @@ void vmx_reflect_interruption(UINT64 ifa
     VCPU *vcpu = current;
     UINT64 vpsr = vmx_vcpu_get_psr(vcpu);
     vector=vec2off[vector];
-    if(!(vpsr&IA64_PSR_IC)&&(vector!=0x1400)){
+    if(!(vpsr&IA64_PSR_IC)&&(vector!=IA64_DATA_NESTED_TLB_VECTOR)){
         panic_domain(regs, "Guest nested fault vector=%lx!\n", vector);
+    }
+    else{ // handle fpswa emulation
+        // fp fault
+        if(vector == IA64_FP_FAULT_VECTOR && !handle_fpu_swa(1, regs, isr)){
+            vmx_vcpu_increment_iip(vcpu);
+            return;
+        }
+        //fp trap
+        else if(vector == IA64_FP_TRAP_VECTOR && !handle_fpu_swa(0, regs, 
isr)){
+            return; 
+        }
     }
     VCPU(vcpu,isr)=isr;
     VCPU(vcpu,iipa) = regs->cr_iip;
diff -r 976517433993 -r 8771f539663a xen/arch/ia64/xen/process.c
--- a/xen/arch/ia64/xen/process.c       Sat Jun 03 15:21:07 2006 -0600
+++ b/xen/arch/ia64/xen/process.c       Sat Jun 03 15:34:07 2006 -0600
@@ -447,7 +447,7 @@ fp_emulate (int fp_fault, void *bundle, 
 /*
  * Handle floating-point assist faults and traps for domain.
  */
-static unsigned long
+unsigned long
 handle_fpu_swa (int fp_fault, struct pt_regs *regs, unsigned long isr)
 {
        struct vcpu *v = current;
@@ -477,11 +477,6 @@ handle_fpu_swa (int fp_fault, struct pt_
                PSCBX(v, fpswa_ret) = ret;
                printk("%s(%s): fp_emulate() returned %ld\n",
                       __FUNCTION__, fp_fault?"fault":"trap", ret.status);
-       } else {
-               if (fp_fault) {
-                       /* emulation was successful */
-                       vcpu_increment_iip(v);
-               }
        }
 
        return ret.status;
@@ -869,7 +864,10 @@ ia64_handle_reflection (unsigned long if
                // FIXME: Should we handle unaligned refs in Xen??
                vector = IA64_UNALIGNED_REF_VECTOR; break;
            case 32:
-               if (!(handle_fpu_swa(1, regs, isr))) return;
+               if (!(handle_fpu_swa(1, regs, isr))) {
+                   vcpu_increment_iip(v);
+                   return;
+               }
                printf("ia64_handle_reflection: handling FP fault\n");
                vector = IA64_FP_FAULT_VECTOR; break;
            case 33:

_______________________________________________
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] Handle VTi's fp fault & trap in hypervisor instead of injecting to guest, Xen patchbot-unstable <=