# HG changeset patch # User Tristan Gingold # Date 1183085060 -7200 # Node ID 6fa4704c8520629eb9a10c09413dc5feafd2608e # Parent d0e7e630e2e356456e746f368250b5cec4d91684 Cleanup: remove cpu_user_regs from arch-ia64.h Add a constant for isr.ni Signed-off-by: Tristan Gingold diff -r d0e7e630e2e3 -r 6fa4704c8520 xen/arch/ia64/vmx/vmx_minstate.h --- a/xen/arch/ia64/vmx/vmx_minstate.h Fri Jun 29 04:41:46 2007 +0200 +++ b/xen/arch/ia64/vmx/vmx_minstate.h Fri Jun 29 04:44:20 2007 +0200 @@ -124,9 +124,9 @@ ;; \ tbit.z p6,p0=r29,IA64_PSR_VM_BIT; \ ;; \ - tbit.nz.or p6,p0 = r18,39; \ + tbit.nz.or p6,p0 = r18,IA64_ISR_NI_BIT; \ ;; \ -(p6) br.sptk.few vmx_panic; \ +(p6) br.spnt.few vmx_panic; \ tbit.z p0,p15=r29,IA64_PSR_I_BIT; \ mov r1=r16; \ /* mov r21=r16; */ \ diff -r d0e7e630e2e3 -r 6fa4704c8520 xen/arch/ia64/xen/domain.c --- a/xen/arch/ia64/xen/domain.c Fri Jun 29 04:41:46 2007 +0200 +++ b/xen/arch/ia64/xen/domain.c Fri Jun 29 04:44:20 2007 +0200 @@ -610,6 +610,8 @@ int arch_vcpu_reset(struct vcpu *v) return 0; } +#define COPY_FPREG(dst,src) memcpy(dst,src,sizeof (struct ia64_fpreg)) + void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c) { int i; @@ -676,12 +678,12 @@ void arch_get_info_guest(struct vcpu *v, c.nat->regs.ar.ccv = uregs->ar_ccv; - c.nat->regs.f[6] = uregs->f6; - c.nat->regs.f[7] = uregs->f7; - c.nat->regs.f[8] = uregs->f8; - c.nat->regs.f[9] = uregs->f9; - c.nat->regs.f[10] = uregs->f10; - c.nat->regs.f[11] = uregs->f11; + COPY_FPREG(&c.nat->regs.f[6], &uregs->f6); + COPY_FPREG(&c.nat->regs.f[7], &uregs->f7); + COPY_FPREG(&c.nat->regs.f[8], &uregs->f8); + COPY_FPREG(&c.nat->regs.f[9], &uregs->f9); + COPY_FPREG(&c.nat->regs.f[10], &uregs->f10); + COPY_FPREG(&c.nat->regs.f[11], &uregs->f11); c.nat->regs.r[4] = uregs->r4; c.nat->regs.r[5] = uregs->r5; @@ -821,12 +823,12 @@ int arch_set_info_guest(struct vcpu *v, uregs->ar_ccv = c.nat->regs.ar.ccv; - uregs->f6 = c.nat->regs.f[6]; - uregs->f7 = c.nat->regs.f[7]; - uregs->f8 = c.nat->regs.f[8]; - uregs->f9 = c.nat->regs.f[9]; - uregs->f10 = c.nat->regs.f[10]; - uregs->f11 = c.nat->regs.f[11]; + COPY_FPREG (&uregs->f6, &c.nat->regs.f[6]); + COPY_FPREG (&uregs->f7, &c.nat->regs.f[7]); + COPY_FPREG (&uregs->f8, &c.nat->regs.f[8]); + COPY_FPREG (&uregs->f9, &c.nat->regs.f[9]); + COPY_FPREG (&uregs->f10, &c.nat->regs.f[10]); + COPY_FPREG (&uregs->f11, &c.nat->regs.f[11]); uregs->r4 = c.nat->regs.r[4]; uregs->r5 = c.nat->regs.r[5]; diff -r d0e7e630e2e3 -r 6fa4704c8520 xen/include/asm-ia64/linux-xen/asm/ptrace.h --- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h Fri Jun 29 04:41:46 2007 +0200 +++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h Fri Jun 29 04:44:20 2007 +0200 @@ -98,22 +98,10 @@ #ifdef XEN #include #include + #define pt_regs cpu_user_regs - -/* User regs at placed at the end of the vcpu area. - Convert a vcpu pointer to a regs pointer. - Note: this is the same as ia64_task_regs, but it uses a Xen-friendly name. -*/ -struct vcpu; -static inline struct cpu_user_regs * -vcpu_regs (struct vcpu *v) -{ - return (struct cpu_user_regs *) ((unsigned long) v + IA64_STK_OFFSET) - 1; -} - -struct pt_regs *guest_cpu_user_regs(void); - -#else +#endif + struct pt_regs { /* The following registers are saved by SAVE_MIN: */ unsigned long b6; /* scratch */ @@ -188,7 +176,29 @@ struct pt_regs { struct ia64_fpreg f9; /* scratch */ struct ia64_fpreg f10; /* scratch */ struct ia64_fpreg f11; /* scratch */ +#ifdef XEN + unsigned long r4; /* preserved */ + unsigned long r5; /* preserved */ + unsigned long r6; /* preserved */ + unsigned long r7; /* preserved */ + unsigned long eml_unat; /* used for emulating instruction */ + unsigned long pad0; /* alignment pad */ +#endif }; + +#ifdef XEN +/* User regs at placed at the end of the vcpu area. + Convert a vcpu pointer to a regs pointer. + Note: this is the same as ia64_task_regs, but it uses a Xen-friendly name. +*/ +struct vcpu; +static inline struct cpu_user_regs * +vcpu_regs (struct vcpu *v) +{ + return (struct cpu_user_regs *) ((unsigned long) v + IA64_STK_OFFSET) - 1; +} + +struct cpu_user_regs *guest_cpu_user_regs(void); #endif /* diff -r d0e7e630e2e3 -r 6fa4704c8520 xen/include/asm-ia64/vcpu.h --- a/xen/include/asm-ia64/vcpu.h Fri Jun 29 04:41:46 2007 +0200 +++ b/xen/include/asm-ia64/vcpu.h Fri Jun 29 04:44:20 2007 +0200 @@ -13,7 +13,8 @@ #include struct vcpu; typedef struct vcpu VCPU; -typedef cpu_user_regs_t REGS; +typedef struct cpu_user_regs REGS; + extern u64 cycle_to_ns(u64 cycle); /* Note: PSCB stands for Privilegied State Communication Block. */ diff -r d0e7e630e2e3 -r 6fa4704c8520 xen/include/asm-ia64/xenkregs.h --- a/xen/include/asm-ia64/xenkregs.h Fri Jun 29 04:41:46 2007 +0200 +++ b/xen/include/asm-ia64/xenkregs.h Fri Jun 29 04:44:20 2007 +0200 @@ -21,6 +21,9 @@ #define IA64_IFS_V_BIT 63 #define IA64_IFS_V (__IA64_UL(1) << IA64_IFS_V_BIT) +/* Interruption Status Register. */ +#define IA64_ISR_NI_BIT 39 /* Nested interrupt. */ + /* Page Table Address */ #define IA64_PTA_VE_BIT 0 #define IA64_PTA_SIZE_BIT 2 diff -r d0e7e630e2e3 -r 6fa4704c8520 xen/include/public/arch-ia64.h --- a/xen/include/public/arch-ia64.h Fri Jun 29 04:41:46 2007 +0200 +++ b/xen/include/public/arch-ia64.h Fri Jun 29 04:44:20 2007 +0200 @@ -123,83 +123,6 @@ struct pt_fpreg { long double __dummy; /* force 16-byte alignment */ } u; }; - -struct cpu_user_regs { - /* The following registers are saved by SAVE_MIN: */ - unsigned long b6; /* scratch */ - unsigned long b7; /* scratch */ - - unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */ - unsigned long ar_ssd; /* reserved for future use (scratch) */ - - unsigned long r8; /* scratch (return value register 0) */ - unsigned long r9; /* scratch (return value register 1) */ - unsigned long r10; /* scratch (return value register 2) */ - unsigned long r11; /* scratch (return value register 3) */ - - unsigned long cr_ipsr; /* interrupted task's psr */ - unsigned long cr_iip; /* interrupted task's instruction pointer */ - unsigned long cr_ifs; /* interrupted task's function state */ - - unsigned long ar_unat; /* interrupted task's NaT register (preserved) */ - unsigned long ar_pfs; /* prev function state */ - unsigned long ar_rsc; /* RSE configuration */ - /* The following two are valid only if cr_ipsr.cpl > 0: */ - unsigned long ar_rnat; /* RSE NaT */ - unsigned long ar_bspstore; /* RSE bspstore */ - - unsigned long pr; /* 64 predicate registers (1 bit each) */ - unsigned long b0; /* return pointer (bp) */ - unsigned long loadrs; /* size of dirty partition << 16 */ - - unsigned long r1; /* the gp pointer */ - unsigned long r12; /* interrupted task's memory stack pointer */ - unsigned long r13; /* thread pointer */ - - unsigned long ar_fpsr; /* floating point status (preserved) */ - unsigned long r15; /* scratch */ - - /* The remaining registers are NOT saved for system calls. */ - - unsigned long r14; /* scratch */ - unsigned long r2; /* scratch */ - unsigned long r3; /* scratch */ - unsigned long r16; /* scratch */ - unsigned long r17; /* scratch */ - unsigned long r18; /* scratch */ - unsigned long r19; /* scratch */ - unsigned long r20; /* scratch */ - unsigned long r21; /* scratch */ - unsigned long r22; /* scratch */ - unsigned long r23; /* scratch */ - unsigned long r24; /* scratch */ - unsigned long r25; /* scratch */ - unsigned long r26; /* scratch */ - unsigned long r27; /* scratch */ - unsigned long r28; /* scratch */ - unsigned long r29; /* scratch */ - unsigned long r30; /* scratch */ - unsigned long r31; /* scratch */ - unsigned long ar_ccv; /* compare/exchange value (scratch) */ - - /* - * Floating point registers that the kernel considers scratch: - */ - struct pt_fpreg f6; /* scratch */ - struct pt_fpreg f7; /* scratch */ - struct pt_fpreg f8; /* scratch */ - struct pt_fpreg f9; /* scratch */ - struct pt_fpreg f10; /* scratch */ - struct pt_fpreg f11; /* scratch */ - unsigned long r4; /* preserved */ - unsigned long r5; /* preserved */ - unsigned long r6; /* preserved */ - unsigned long r7; /* preserved */ - unsigned long eml_unat; /* used for emulating instruction */ - unsigned long pad0; /* alignment pad */ - -}; -typedef struct cpu_user_regs cpu_user_regs_t; union vac { unsigned long value; diff -r d0e7e630e2e3 -r 6fa4704c8520 xen/include/public/foreign/reference.size --- a/xen/include/public/foreign/reference.size Fri Jun 29 04:41:46 2007 +0200 +++ b/xen/include/public/foreign/reference.size Fri Jun 29 04:44:20 2007 +0200 @@ -4,7 +4,7 @@ start_info | 1104 1 start_info | 1104 1152 1152 trap_info | 8 16 - pt_fpreg | - - 16 -cpu_user_regs | 68 200 496 +cpu_user_regs | 68 200 - xen_ia64_boot_param | - - 96 ia64_tr_entry | - - 32 vcpu_tr_regs | - - 512