ia64/xen-unstable

changeset 8831:2ff0ade58aab

[IA64] declaration of metaphysical_rr

I'm making a patch for domain destruction.
While I tested my patch by repeatedly
creating/destructing domains,
a reserved register/field fault occurred in load_region_regs().

The cause of this fault is rr0 value overflow(0xFFFFFFFF********)
because metaphysical_rr0 in the arch_domain struct is
declared as integer (should be unsigned long).
The attached patch fixes the problem.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Fri Feb 17 14:42:02 2006 -0700 (2006-02-17)
parents b9a76893a1ee
children 81aae0c1487e
files xen/arch/ia64/xen/hyperprivop.S xen/include/asm-ia64/domain.h
line diff
     1.1 --- a/xen/arch/ia64/xen/hyperprivop.S	Fri Feb 17 14:34:17 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/hyperprivop.S	Fri Feb 17 14:42:02 2006 -0700
     1.3 @@ -1336,7 +1336,7 @@ ENTRY(hyper_ssm_dt)
     1.4  	movl r22=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;;
     1.5  	ld8 r22=[r22];;
     1.6  	adds r22=IA64_VCPU_META_SAVED_RR0_OFFSET,r22;;
     1.7 -	ld4 r23=[r22];;
     1.8 +	ld8 r23=[r22];;
     1.9  	mov rr[r0]=r23;;
    1.10  	srlz.i;;
    1.11  	st4 [r20]=r0 ;;
    1.12 @@ -1372,7 +1372,7 @@ ENTRY(hyper_rsm_dt)
    1.13  	movl r22=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;;
    1.14  	ld8 r22=[r22];;
    1.15  	adds r22=IA64_VCPU_META_RR0_OFFSET,r22;;
    1.16 -	ld4 r23=[r22];;
    1.17 +	ld8 r23=[r22];;
    1.18  	mov rr[r0]=r23;;
    1.19  	srlz.i;;
    1.20  	adds r21=1,r0 ;;
    1.21 @@ -1733,7 +1733,7 @@ ENTRY(hyper_set_rr)
    1.22  	dep r23=r28,r23,16,8;;
    1.23  	dep r23=r29,r23,8,8
    1.24  	cmp.eq p6,p0=r25,r0;;	// if rr0, save for metaphysical
    1.25 -(p6)	st4 [r24]=r23
    1.26 +(p6)	st8 [r24]=r23
    1.27  	mov rr[r8]=r23;;
    1.28  	// done, mosey on back
    1.29  1:	mov r24=cr.ipsr
     2.1 --- a/xen/include/asm-ia64/domain.h	Fri Feb 17 14:34:17 2006 -0700
     2.2 +++ b/xen/include/asm-ia64/domain.h	Fri Feb 17 14:42:02 2006 -0700
     2.3 @@ -15,8 +15,8 @@ extern void domain_relinquish_resources(
     2.4  struct arch_domain {
     2.5      struct mm_struct *active_mm;
     2.6      struct mm_struct *mm;
     2.7 -    int metaphysical_rr0;
     2.8 -    int metaphysical_rr4;
     2.9 +    unsigned long metaphysical_rr0;
    2.10 +    unsigned long metaphysical_rr4;
    2.11      int starting_rid;		/* first RID assigned to domain */
    2.12      int ending_rid;		/* one beyond highest RID assigned to domain */
    2.13      int rid_bits;		/* number of virtual rid bits (default: 18) */
    2.14 @@ -61,10 +61,10 @@ struct arch_vcpu {
    2.15  	unsigned long xen_timer_interval;
    2.16  #endif
    2.17      mapped_regs_t *privregs; /* save the state of vcpu */
    2.18 -    int metaphysical_rr0;		// from arch_domain (so is pinned)
    2.19 -    int metaphysical_rr4;		// from arch_domain (so is pinned)
    2.20 -    int metaphysical_saved_rr0;		// from arch_domain (so is pinned)
    2.21 -    int metaphysical_saved_rr4;		// from arch_domain (so is pinned)
    2.22 +    unsigned long metaphysical_rr0;		// from arch_domain (so is pinned)
    2.23 +    unsigned long metaphysical_rr4;		// from arch_domain (so is pinned)
    2.24 +    unsigned long metaphysical_saved_rr0;	// from arch_domain (so is pinned)
    2.25 +    unsigned long metaphysical_saved_rr4;	// from arch_domain (so is pinned)
    2.26      int breakimm;			// from arch_domain (so is pinned)
    2.27      int starting_rid;		/* first RID assigned to domain */
    2.28      int ending_rid;		/* one beyond highest RID assigned to domain */