ia64/xen-unstable

changeset 5397:f40340412b5a

bitkeeper revision 1.1668.1.6 (42a855abmDUqg5YrgIMWSBLOJP_HYg)

Fast reflecting now working for breaks
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>
author djm@kirby.fc.hp.com
date Thu Jun 09 14:43:55 2005 +0000 (2005-06-09)
parents ba7d283dc8dd
children 9ea1f1f71313
files xen/arch/ia64/hyperprivop.S xen/arch/ia64/patch/linux-2.6.11/efi.c xen/arch/ia64/process.c
line diff
     1.1 --- a/xen/arch/ia64/hyperprivop.S	Thu Jun 09 02:32:35 2005 +0000
     1.2 +++ b/xen/arch/ia64/hyperprivop.S	Thu Jun 09 14:43:55 2005 +0000
     1.3 @@ -221,7 +221,7 @@ ENTRY(hyper_ssm_i)
     1.4  //	r19 == vpsr.ic (low 32 bits) | vpsr.i (high 32 bits)
     1.5  //	r31 == pr
     1.6  GLOBAL_ENTRY(fast_break_reflect)
     1.7 -//#define FAST_BREAK
     1.8 +#define FAST_BREAK
     1.9  #ifndef FAST_BREAK
    1.10  	br.sptk.many dispatch_break_fault ;;
    1.11  #endif
    1.12 @@ -233,6 +233,18 @@ GLOBAL_ENTRY(fast_break_reflect)
    1.13  	extr.u r21=r30,IA64_PSR_PP_BIT,1 ;;
    1.14  	cmp.ne p7,p0=r21,r0 ;;
    1.15  (p7)	br.sptk.many dispatch_break_fault ;;
    1.16 +#if 1 /* special handling in case running on simulator */
    1.17 +	movl r20=first_break;;
    1.18 +	ld4 r23=[r20];;
    1.19 +	movl r21=0x80001;
    1.20 +	movl r22=0x80002;;
    1.21 +	cmp.ne p7,p0=r23,r0;;
    1.22 +(p7)	br.sptk.many dispatch_break_fault ;;
    1.23 +	cmp.eq p7,p0=r21,r17;
    1.24 +(p7)	br.sptk.many dispatch_break_fault ;;
    1.25 +	cmp.eq p7,p0=r22,r17;
    1.26 +(p7)	br.sptk.many dispatch_break_fault ;;
    1.27 +#endif
    1.28  #ifdef FAST_REFLECT_CNT
    1.29  	movl r20=fast_reflect_count+((0x2c00>>8)*8);;
    1.30  	ld8 r21=[r20];;
     2.1 --- a/xen/arch/ia64/patch/linux-2.6.11/efi.c	Thu Jun 09 02:32:35 2005 +0000
     2.2 +++ b/xen/arch/ia64/patch/linux-2.6.11/efi.c	Thu Jun 09 14:43:55 2005 +0000
     2.3 @@ -1,19 +1,23 @@
     2.4  --- ../../linux-2.6.11/arch/ia64/kernel/efi.c	2005-03-02 00:37:47.000000000 -0700
     2.5 -+++ arch/ia64/efi.c	2005-06-08 20:23:39.000000000 -0600
     2.6 -@@ -320,6 +320,12 @@
     2.7 ++++ arch/ia64/efi.c	2005-06-09 06:15:36.000000000 -0600
     2.8 +@@ -320,6 +320,16 @@
     2.9   		if (!(md->attribute & EFI_MEMORY_WB))
    2.10   			continue;
    2.11   
    2.12  +#ifdef XEN
    2.13  +// this works around a problem in the ski bootloader
    2.14 -+		if (md->type != EFI_CONVENTIONAL_MEMORY)  continue;
    2.15 ++{
    2.16 ++		extern long running_on_sim;
    2.17 ++		if (running_on_sim && md->type != EFI_CONVENTIONAL_MEMORY)
    2.18 ++			continue;
    2.19 ++}
    2.20  +// this is a temporary hack to avoid CONFIG_VIRTUAL_MEM_MAP
    2.21  +		if (md->phys_addr >= 0x100000000) continue;
    2.22  +#endif
    2.23   		/*
    2.24   		 * granule_addr is the base of md's first granule.
    2.25   		 * [granule_addr - first_non_wb_addr) is guaranteed to
    2.26 -@@ -719,6 +725,30 @@
    2.27 +@@ -719,6 +729,30 @@
    2.28   	return 0;
    2.29   }
    2.30   
     3.1 --- a/xen/arch/ia64/process.c	Thu Jun 09 02:32:35 2005 +0000
     3.2 +++ b/xen/arch/ia64/process.c	Thu Jun 09 14:43:55 2005 +0000
     3.3 @@ -774,18 +774,19 @@ if (!running_on_sim) { printf("SSC_OPEN,
     3.4  	vcpu_increment_iip(current);
     3.5  }
     3.6  
     3.7 +int first_break = 1;
     3.8 +
     3.9  void
    3.10  ia64_handle_break (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long iim)
    3.11  {
    3.12 -	static int first_time = 1;
    3.13  	struct domain *d = (struct domain *) current->domain;
    3.14  	struct vcpu *v = (struct domain *) current;
    3.15  	extern unsigned long running_on_sim;
    3.16  
    3.17 -	if (first_time) {
    3.18 +	if (first_break) {
    3.19  		if (platform_is_hp_ski()) running_on_sim = 1;
    3.20  		else running_on_sim = 0;
    3.21 -		first_time = 0;
    3.22 +		first_break = 0;
    3.23  	}
    3.24  	if (iim == 0x80001 || iim == 0x80002) {	//FIXME: don't hardcode constant
    3.25  		if (running_on_sim) do_ssc(vcpu_get_gr(current,36), regs);
    3.26 @@ -821,6 +822,8 @@ ia64_handle_privop (unsigned long ifa, s
    3.27  #define INTR_TYPE_MAX	10
    3.28  UINT64 int_counts[INTR_TYPE_MAX];
    3.29  
    3.30 +void dis_foo(void) { }
    3.31 +
    3.32  void
    3.33  ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long iim, unsigned long vector)
    3.34  {
    3.35 @@ -854,7 +857,10 @@ ia64_handle_reflection (unsigned long if
    3.36  		check_lazy_cover = 1;
    3.37  		vector = IA64_DATA_ACCESS_RIGHTS_VECTOR; break;
    3.38  	    case 25:
    3.39 -		vector = IA64_DISABLED_FPREG_VECTOR; break;
    3.40 +		vector = IA64_DISABLED_FPREG_VECTOR;
    3.41 +//printf("*** Attempting to handle disabled_fpreg\n");
    3.42 +		dis_foo();
    3.43 +		break;
    3.44  	    case 26:
    3.45  printf("*** NaT fault... attempting to handle as privop\n");
    3.46  		vector = priv_emulate(v,regs,isr);