ia64/xen-unstable

changeset 15418:c7e16caf4e63

[IA64] Cleanup: remove cpu_user_regs from arch-ia64.h

Add a constant for isr.ni

Signed-off-by: Tristan Gingold <tgingold@free.fr>
author Alex Williamson <alex.williamson@hp.com>
date Mon Jul 02 09:54:53 2007 -0600 (2007-07-02)
parents 2a5b463f2e8d
children 962f22223817
files xen/arch/ia64/vmx/vmx_minstate.h xen/arch/ia64/xen/domain.c xen/include/asm-ia64/linux-xen/asm/ptrace.h xen/include/asm-ia64/vcpu.h xen/include/asm-ia64/xenkregs.h xen/include/public/arch-ia64.h xen/include/public/foreign/reference.size
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmx_minstate.h	Mon Jul 02 09:38:51 2007 -0600
     1.2 +++ b/xen/arch/ia64/vmx/vmx_minstate.h	Mon Jul 02 09:54:53 2007 -0600
     1.3 @@ -124,9 +124,9 @@
     1.4      ;;                                          \
     1.5      tbit.z p6,p0=r29,IA64_PSR_VM_BIT;       \
     1.6      ;;      \
     1.7 -    tbit.nz.or p6,p0 = r18,39; \
     1.8 +    tbit.nz.or p6,p0 = r18,IA64_ISR_NI_BIT; \
     1.9      ;;        \
    1.10 -(p6) br.sptk.few vmx_panic;        \
    1.11 +(p6) br.spnt.few vmx_panic;        \
    1.12      tbit.z p0,p15=r29,IA64_PSR_I_BIT;   \
    1.13      mov r1=r16;                     \
    1.14  /*    mov r21=r16;	*/		\
     2.1 --- a/xen/arch/ia64/xen/domain.c	Mon Jul 02 09:38:51 2007 -0600
     2.2 +++ b/xen/arch/ia64/xen/domain.c	Mon Jul 02 09:54:53 2007 -0600
     2.3 @@ -612,6 +612,8 @@ int arch_vcpu_reset(struct vcpu *v)
     2.4  	return 0;
     2.5  }
     2.6  
     2.7 +#define COPY_FPREG(dst, src) memcpy(dst, src, sizeof(struct ia64_fpreg))
     2.8 +
     2.9  void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c)
    2.10  {
    2.11  	int i;
    2.12 @@ -678,12 +680,12 @@ void arch_get_info_guest(struct vcpu *v,
    2.13  
    2.14  	c.nat->regs.ar.ccv = uregs->ar_ccv;
    2.15  
    2.16 -	c.nat->regs.f[6] = uregs->f6;
    2.17 -	c.nat->regs.f[7] = uregs->f7;
    2.18 -	c.nat->regs.f[8] = uregs->f8;
    2.19 -	c.nat->regs.f[9] = uregs->f9;
    2.20 -	c.nat->regs.f[10] = uregs->f10;
    2.21 -	c.nat->regs.f[11] = uregs->f11;
    2.22 +	COPY_FPREG(&c.nat->regs.f[6], &uregs->f6);
    2.23 +	COPY_FPREG(&c.nat->regs.f[7], &uregs->f7);
    2.24 +	COPY_FPREG(&c.nat->regs.f[8], &uregs->f8);
    2.25 +	COPY_FPREG(&c.nat->regs.f[9], &uregs->f9);
    2.26 +	COPY_FPREG(&c.nat->regs.f[10], &uregs->f10);
    2.27 +	COPY_FPREG(&c.nat->regs.f[11], &uregs->f11);
    2.28  
    2.29  	c.nat->regs.r[4] = uregs->r4;
    2.30  	c.nat->regs.r[5] = uregs->r5;
    2.31 @@ -820,12 +822,12 @@ int arch_set_info_guest(struct vcpu *v, 
    2.32  	
    2.33  	uregs->ar_ccv = c.nat->regs.ar.ccv;
    2.34  	
    2.35 -	uregs->f6 = c.nat->regs.f[6];
    2.36 -	uregs->f7 = c.nat->regs.f[7];
    2.37 -	uregs->f8 = c.nat->regs.f[8];
    2.38 -	uregs->f9 = c.nat->regs.f[9];
    2.39 -	uregs->f10 = c.nat->regs.f[10];
    2.40 -	uregs->f11 = c.nat->regs.f[11];
    2.41 +	COPY_FPREG(&uregs->f6, &c.nat->regs.f[6]);
    2.42 +	COPY_FPREG(&uregs->f7, &c.nat->regs.f[7]);
    2.43 +	COPY_FPREG(&uregs->f8, &c.nat->regs.f[8]);
    2.44 +	COPY_FPREG(&uregs->f9, &c.nat->regs.f[9]);
    2.45 +	COPY_FPREG(&uregs->f10, &c.nat->regs.f[10]);
    2.46 +	COPY_FPREG(&uregs->f11, &c.nat->regs.f[11]);
    2.47  	
    2.48  	uregs->r4 = c.nat->regs.r[4];
    2.49  	uregs->r5 = c.nat->regs.r[5];
     3.1 --- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h	Mon Jul 02 09:38:51 2007 -0600
     3.2 +++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h	Mon Jul 02 09:54:53 2007 -0600
     3.3 @@ -98,22 +98,10 @@
     3.4  #ifdef XEN
     3.5  #include <xen/types.h>
     3.6  #include <public/xen.h>
     3.7 -#define pt_regs cpu_user_regs
     3.8  
     3.9 -/*  User regs at placed at the end of the vcpu area.
    3.10 -    Convert a vcpu pointer to a regs pointer.
    3.11 -    Note: this is the same as ia64_task_regs, but it uses a Xen-friendly name.
    3.12 -*/
    3.13 -struct vcpu;
    3.14 -static inline struct cpu_user_regs *
    3.15 -vcpu_regs (struct vcpu *v)
    3.16 -{
    3.17 -  return (struct cpu_user_regs *) ((unsigned long) v + IA64_STK_OFFSET) - 1;
    3.18 -}
    3.19 +#define pt_regs cpu_user_regs
    3.20 +#endif
    3.21  
    3.22 -struct pt_regs *guest_cpu_user_regs(void);
    3.23 -
    3.24 -#else
    3.25  struct pt_regs {
    3.26  	/* The following registers are saved by SAVE_MIN: */
    3.27  	unsigned long b6;		/* scratch */
    3.28 @@ -188,7 +176,29 @@ struct pt_regs {
    3.29  	struct ia64_fpreg f9;		/* scratch */
    3.30  	struct ia64_fpreg f10;		/* scratch */
    3.31  	struct ia64_fpreg f11;		/* scratch */
    3.32 +#ifdef XEN
    3.33 +	unsigned long r4;		/* preserved */
    3.34 +	unsigned long r5;		/* preserved */
    3.35 +	unsigned long r6;		/* preserved */
    3.36 +	unsigned long r7;		/* preserved */
    3.37 +	unsigned long eml_unat;		/* used for emulating instruction */
    3.38 +	unsigned long pad0;		/* alignment pad */
    3.39 +#endif
    3.40  };
    3.41 +
    3.42 +#ifdef XEN
    3.43 +/*
    3.44 + * User regs are placed at the end of the vcpu area.
    3.45 + * Convert a vcpu pointer to a regs pointer.
    3.46 + * Note: this is the same as ia64_task_regs, but it uses a Xen-friendly name.
    3.47 + */
    3.48 +struct vcpu;
    3.49 +static inline struct cpu_user_regs *vcpu_regs(struct vcpu *v)
    3.50 +{
    3.51 +	return (struct cpu_user_regs *)((unsigned long)v + IA64_STK_OFFSET) - 1;
    3.52 +}
    3.53 +
    3.54 +struct cpu_user_regs *guest_cpu_user_regs(void);
    3.55  #endif
    3.56  
    3.57  /*
     4.1 --- a/xen/include/asm-ia64/vcpu.h	Mon Jul 02 09:38:51 2007 -0600
     4.2 +++ b/xen/include/asm-ia64/vcpu.h	Mon Jul 02 09:54:53 2007 -0600
     4.3 @@ -13,7 +13,8 @@
     4.4  #include <linux/acpi.h>
     4.5  struct vcpu;
     4.6  typedef struct vcpu VCPU;
     4.7 -typedef cpu_user_regs_t REGS;
     4.8 +typedef struct cpu_user_regs REGS;
     4.9 +
    4.10  extern u64 cycle_to_ns(u64 cycle);
    4.11  
    4.12  /* Note: PSCB stands for Privilegied State Communication Block.  */
     5.1 --- a/xen/include/asm-ia64/xenkregs.h	Mon Jul 02 09:38:51 2007 -0600
     5.2 +++ b/xen/include/asm-ia64/xenkregs.h	Mon Jul 02 09:54:53 2007 -0600
     5.3 @@ -21,6 +21,9 @@
     5.4  #define IA64_IFS_V_BIT		63
     5.5  #define IA64_IFS_V	(__IA64_UL(1) << IA64_IFS_V_BIT)
     5.6  
     5.7 +/* Interruption Status Register.  */
     5.8 +#define IA64_ISR_NI_BIT	39	/* Nested interrupt.  */
     5.9 +
    5.10  /* Page Table Address */
    5.11  #define IA64_PTA_VE_BIT 0
    5.12  #define IA64_PTA_SIZE_BIT 2
     6.1 --- a/xen/include/public/arch-ia64.h	Mon Jul 02 09:38:51 2007 -0600
     6.2 +++ b/xen/include/public/arch-ia64.h	Mon Jul 02 09:54:53 2007 -0600
     6.3 @@ -130,83 +130,6 @@ struct pt_fpreg {
     6.4      } u;
     6.5  };
     6.6  
     6.7 -struct cpu_user_regs {
     6.8 -    /* The following registers are saved by SAVE_MIN: */
     6.9 -    unsigned long b6;  /* scratch */
    6.10 -    unsigned long b7;  /* scratch */
    6.11 -
    6.12 -    unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */
    6.13 -    unsigned long ar_ssd; /* reserved for future use (scratch) */
    6.14 -
    6.15 -    unsigned long r8;  /* scratch (return value register 0) */
    6.16 -    unsigned long r9;  /* scratch (return value register 1) */
    6.17 -    unsigned long r10; /* scratch (return value register 2) */
    6.18 -    unsigned long r11; /* scratch (return value register 3) */
    6.19 -
    6.20 -    unsigned long cr_ipsr; /* interrupted task's psr */
    6.21 -    unsigned long cr_iip;  /* interrupted task's instruction pointer */
    6.22 -    unsigned long cr_ifs;  /* interrupted task's function state */
    6.23 -
    6.24 -    unsigned long ar_unat; /* interrupted task's NaT register (preserved) */
    6.25 -    unsigned long ar_pfs;  /* prev function state  */
    6.26 -    unsigned long ar_rsc;  /* RSE configuration */
    6.27 -    /* The following two are valid only if cr_ipsr.cpl > 0: */
    6.28 -    unsigned long ar_rnat;  /* RSE NaT */
    6.29 -    unsigned long ar_bspstore; /* RSE bspstore */
    6.30 -
    6.31 -    unsigned long pr;  /* 64 predicate registers (1 bit each) */
    6.32 -    unsigned long b0;  /* return pointer (bp) */
    6.33 -    unsigned long loadrs;  /* size of dirty partition << 16 */
    6.34 -
    6.35 -    unsigned long r1;  /* the gp pointer */
    6.36 -    unsigned long r12; /* interrupted task's memory stack pointer */
    6.37 -    unsigned long r13; /* thread pointer */
    6.38 -
    6.39 -    unsigned long ar_fpsr;  /* floating point status (preserved) */
    6.40 -    unsigned long r15;  /* scratch */
    6.41 -
    6.42 - /* The remaining registers are NOT saved for system calls.  */
    6.43 -
    6.44 -    unsigned long r14;  /* scratch */
    6.45 -    unsigned long r2;  /* scratch */
    6.46 -    unsigned long r3;  /* scratch */
    6.47 -    unsigned long r16;  /* scratch */
    6.48 -    unsigned long r17;  /* scratch */
    6.49 -    unsigned long r18;  /* scratch */
    6.50 -    unsigned long r19;  /* scratch */
    6.51 -    unsigned long r20;  /* scratch */
    6.52 -    unsigned long r21;  /* scratch */
    6.53 -    unsigned long r22;  /* scratch */
    6.54 -    unsigned long r23;  /* scratch */
    6.55 -    unsigned long r24;  /* scratch */
    6.56 -    unsigned long r25;  /* scratch */
    6.57 -    unsigned long r26;  /* scratch */
    6.58 -    unsigned long r27;  /* scratch */
    6.59 -    unsigned long r28;  /* scratch */
    6.60 -    unsigned long r29;  /* scratch */
    6.61 -    unsigned long r30;  /* scratch */
    6.62 -    unsigned long r31;  /* scratch */
    6.63 -    unsigned long ar_ccv;  /* compare/exchange value (scratch) */
    6.64 -
    6.65 -    /*
    6.66 -     * Floating point registers that the kernel considers scratch:
    6.67 -     */
    6.68 -    struct pt_fpreg f6;  /* scratch */
    6.69 -    struct pt_fpreg f7;  /* scratch */
    6.70 -    struct pt_fpreg f8;  /* scratch */
    6.71 -    struct pt_fpreg f9;  /* scratch */
    6.72 -    struct pt_fpreg f10;  /* scratch */
    6.73 -    struct pt_fpreg f11;  /* scratch */
    6.74 -    unsigned long r4;  /* preserved */
    6.75 -    unsigned long r5;  /* preserved */
    6.76 -    unsigned long r6;  /* preserved */
    6.77 -    unsigned long r7;  /* preserved */
    6.78 -    unsigned long eml_unat;    /* used for emulating instruction */
    6.79 -    unsigned long pad0;     /* alignment pad */
    6.80 -
    6.81 -};
    6.82 -typedef struct cpu_user_regs cpu_user_regs_t;
    6.83 -
    6.84  union vac {
    6.85      unsigned long value;
    6.86      struct {
     7.1 --- a/xen/include/public/foreign/reference.size	Mon Jul 02 09:38:51 2007 -0600
     7.2 +++ b/xen/include/public/foreign/reference.size	Mon Jul 02 09:54:53 2007 -0600
     7.3 @@ -4,7 +4,7 @@ structs                   |  x86_32  x86
     7.4  start_info                |    1104    1152    1152
     7.5  trap_info                 |       8      16       -
     7.6  pt_fpreg                  |       -       -      16
     7.7 -cpu_user_regs             |      68     200     496
     7.8 +cpu_user_regs             |      68     200       -
     7.9  xen_ia64_boot_param       |       -       -      96
    7.10  ia64_tr_entry             |       -       -      32
    7.11  vcpu_tr_regs              |       -       -     512