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

[Xen-changelog] [xen-unstable] [IA64] Fix fetch code method when FP fault occurs @VTi side



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID c8bc76d877e02b3ef6ce4dd9c680bf5f5aae14d7
# Parent  8d501f39286c28cddfd0f26e5e92a6e86176bbe4
[IA64] Fix fetch code method when FP fault occurs @VTi side

This patch intends to use __vmx_get_domain_bundle to fetch code
when FP fault @VTi side.

Singed-off-by: Zhang xiantao <xiantao.zhang@xxxxxxxxx>
---
 xen/arch/ia64/vmx/mmio.c      |    1 -
 xen/arch/ia64/xen/faults.c    |    8 ++++++--
 xen/arch/ia64/xen/privop.c    |    1 -
 xen/arch/ia64/xen/vcpu.c      |    1 -
 xen/include/asm-ia64/bundle.h |    3 +++
 5 files changed, 9 insertions(+), 5 deletions(-)

diff -r 8d501f39286c -r c8bc76d877e0 xen/arch/ia64/vmx/mmio.c
--- a/xen/arch/ia64/vmx/mmio.c  Mon Jul 24 13:43:35 2006 -0600
+++ b/xen/arch/ia64/vmx/mmio.c  Mon Jul 24 13:48:12 2006 -0600
@@ -421,7 +421,6 @@ static void write_ipi (VCPU *vcpu, uint6
    dir 1: read 0:write
     inst_type 0:integer 1:floating point
  */
-extern IA64_BUNDLE __vmx_get_domain_bundle(u64 iip);
 #define SL_INTEGER  0        // store/load interger
 #define SL_FLOATING    1       // store/load floating
 
diff -r 8d501f39286c -r c8bc76d877e0 xen/arch/ia64/xen/faults.c
--- a/xen/arch/ia64/xen/faults.c        Mon Jul 24 13:43:35 2006 -0600
+++ b/xen/arch/ia64/xen/faults.c        Mon Jul 24 13:48:12 2006 -0600
@@ -314,7 +314,6 @@ handle_fpu_swa (int fp_fault, struct pt_
 {
        struct vcpu *v = current;
        IA64_BUNDLE bundle;
-       IA64_BUNDLE __get_domain_bundle(UINT64);
        unsigned long fault_ip;
        fpswa_ret_t ret;
 
@@ -325,7 +324,12 @@ handle_fpu_swa (int fp_fault, struct pt_
         */
        if (!fp_fault && (ia64_psr(regs)->ri == 0))
                fault_ip -= 16;
-       bundle = __get_domain_bundle(fault_ip);
+
+       if (VMX_DOMAIN(current))
+               bundle = __vmx_get_domain_bundle(fault_ip);
+       else 
+               bundle = __get_domain_bundle(fault_ip);
+
        if (!bundle.i64[0] && !bundle.i64[1]) {
                printk("%s: floating-point bundle at 0x%lx not mapped\n",
                       __FUNCTION__, fault_ip);
diff -r 8d501f39286c -r c8bc76d877e0 xen/arch/ia64/xen/privop.c
--- a/xen/arch/ia64/xen/privop.c        Mon Jul 24 13:43:35 2006 -0600
+++ b/xen/arch/ia64/xen/privop.c        Mon Jul 24 13:48:12 2006 -0600
@@ -507,7 +507,6 @@ priv_handle_op(VCPU *vcpu, REGS *regs, i
 priv_handle_op(VCPU *vcpu, REGS *regs, int privlvl)
 {
        IA64_BUNDLE bundle;
-       IA64_BUNDLE __get_domain_bundle(UINT64);
        int slot;
        IA64_SLOT_TYPE slot_type;
        INST64 inst;
diff -r 8d501f39286c -r c8bc76d877e0 xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Mon Jul 24 13:43:35 2006 -0600
+++ b/xen/arch/ia64/xen/vcpu.c  Mon Jul 24 13:48:12 2006 -0600
@@ -31,7 +31,6 @@ extern void setfpreg (unsigned long regn
 extern void setfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct 
pt_regs *regs);
 
 extern void panic_domain(struct pt_regs *, const char *, ...);
-extern IA64_BUNDLE __get_domain_bundle(UINT64);
 
 typedef        union {
        struct ia64_psr ia64_psr;
diff -r 8d501f39286c -r c8bc76d877e0 xen/include/asm-ia64/bundle.h
--- a/xen/include/asm-ia64/bundle.h     Mon Jul 24 13:43:35 2006 -0600
+++ b/xen/include/asm-ia64/bundle.h     Mon Jul 24 13:48:12 2006 -0600
@@ -223,6 +223,9 @@ typedef union U_INST64 {
     INST64_M47 M47;    // purge translation entry
 } INST64;
 
+extern IA64_BUNDLE __vmx_get_domain_bundle(unsigned long iip);
+extern IA64_BUNDLE __get_domain_bundle(unsigned long iip);
+
 #define MASK_41 ((unsigned long)0x1ffffffffff)
 
 #endif /* _XEN_IA64_BUNDLE_H */

_______________________________________________
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®.