ia64/xen-unstable

changeset 10704:c8bc76d877e0

[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@intel.com>
author awilliam@xenbuild.aw
date Mon Jul 24 13:48:12 2006 -0600 (2006-07-24)
parents 8d501f39286c
children 47fc48740d45
files xen/arch/ia64/vmx/mmio.c xen/arch/ia64/xen/faults.c xen/arch/ia64/xen/privop.c xen/arch/ia64/xen/vcpu.c xen/include/asm-ia64/bundle.h
line diff
     1.1 --- a/xen/arch/ia64/vmx/mmio.c	Mon Jul 24 13:43:35 2006 -0600
     1.2 +++ b/xen/arch/ia64/vmx/mmio.c	Mon Jul 24 13:48:12 2006 -0600
     1.3 @@ -421,7 +421,6 @@ static void write_ipi (VCPU *vcpu, uint6
     1.4     dir 1: read 0:write
     1.5      inst_type 0:integer 1:floating point
     1.6   */
     1.7 -extern IA64_BUNDLE __vmx_get_domain_bundle(u64 iip);
     1.8  #define SL_INTEGER  0        // store/load interger
     1.9  #define SL_FLOATING    1       // store/load floating
    1.10  
     2.1 --- a/xen/arch/ia64/xen/faults.c	Mon Jul 24 13:43:35 2006 -0600
     2.2 +++ b/xen/arch/ia64/xen/faults.c	Mon Jul 24 13:48:12 2006 -0600
     2.3 @@ -314,7 +314,6 @@ handle_fpu_swa (int fp_fault, struct pt_
     2.4  {
     2.5  	struct vcpu *v = current;
     2.6  	IA64_BUNDLE bundle;
     2.7 -	IA64_BUNDLE __get_domain_bundle(UINT64);
     2.8  	unsigned long fault_ip;
     2.9  	fpswa_ret_t ret;
    2.10  
    2.11 @@ -325,7 +324,12 @@ handle_fpu_swa (int fp_fault, struct pt_
    2.12  	 */
    2.13  	if (!fp_fault && (ia64_psr(regs)->ri == 0))
    2.14  		fault_ip -= 16;
    2.15 -	bundle = __get_domain_bundle(fault_ip);
    2.16 +
    2.17 +	if (VMX_DOMAIN(current))
    2.18 +		bundle = __vmx_get_domain_bundle(fault_ip);
    2.19 +	else 
    2.20 +		bundle = __get_domain_bundle(fault_ip);
    2.21 +
    2.22  	if (!bundle.i64[0] && !bundle.i64[1]) {
    2.23  		printk("%s: floating-point bundle at 0x%lx not mapped\n",
    2.24  		       __FUNCTION__, fault_ip);
     3.1 --- a/xen/arch/ia64/xen/privop.c	Mon Jul 24 13:43:35 2006 -0600
     3.2 +++ b/xen/arch/ia64/xen/privop.c	Mon Jul 24 13:48:12 2006 -0600
     3.3 @@ -507,7 +507,6 @@ static IA64FAULT
     3.4  priv_handle_op(VCPU *vcpu, REGS *regs, int privlvl)
     3.5  {
     3.6  	IA64_BUNDLE bundle;
     3.7 -	IA64_BUNDLE __get_domain_bundle(UINT64);
     3.8  	int slot;
     3.9  	IA64_SLOT_TYPE slot_type;
    3.10  	INST64 inst;
     4.1 --- a/xen/arch/ia64/xen/vcpu.c	Mon Jul 24 13:43:35 2006 -0600
     4.2 +++ b/xen/arch/ia64/xen/vcpu.c	Mon Jul 24 13:48:12 2006 -0600
     4.3 @@ -31,7 +31,6 @@ extern void getfpreg (unsigned long regn
     4.4  extern void setfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs);
     4.5  
     4.6  extern void panic_domain(struct pt_regs *, const char *, ...);
     4.7 -extern IA64_BUNDLE __get_domain_bundle(UINT64);
     4.8  
     4.9  typedef	union {
    4.10  	struct ia64_psr ia64_psr;
     5.1 --- a/xen/include/asm-ia64/bundle.h	Mon Jul 24 13:43:35 2006 -0600
     5.2 +++ b/xen/include/asm-ia64/bundle.h	Mon Jul 24 13:48:12 2006 -0600
     5.3 @@ -223,6 +223,9 @@ typedef union U_INST64 {
     5.4      INST64_M47 M47;	// purge translation entry
     5.5  } INST64;
     5.6  
     5.7 +extern IA64_BUNDLE __vmx_get_domain_bundle(unsigned long iip);
     5.8 +extern IA64_BUNDLE __get_domain_bundle(unsigned long iip);
     5.9 +
    5.10  #define MASK_41 ((unsigned long)0x1ffffffffff)
    5.11  
    5.12  #endif /* _XEN_IA64_BUNDLE_H */