ia64/xen-unstable

changeset 5983:12ddc012238a

put back cpu_user_reg patch done in Intel-5979
author fred@xuni-t01.sc.intel.com
date Mon Aug 15 13:06:03 2005 -0800 (2005-08-15)
parents fd61ce502c71
children ed7e557deedd
files xen/arch/ia64/Rules.mk xen/arch/ia64/asm-offsets.c xen/arch/ia64/domain.c xen/arch/ia64/vmx_vcpu.c xen/include/asm-ia64/linux-xen/asm/ptrace.h xen/include/asm-ia64/regs.h xen/include/asm-ia64/vcpu.h xen/include/public/arch-ia64.h
line diff
     1.1 --- a/xen/arch/ia64/Rules.mk	Mon Aug 15 14:52:20 2005 +0800
     1.2 +++ b/xen/arch/ia64/Rules.mk	Mon Aug 15 13:06:03 2005 -0800
     1.3 @@ -22,7 +22,7 @@ CFLAGS  += -I$(BASEDIR)/include/asm-ia64
     1.4             -I$(BASEDIR)/include/asm-ia64/linux-xen 			\
     1.5             -I$(BASEDIR)/arch/ia64/linux -I$(BASEDIR)/arch/ia64/linux-xen
     1.6  CFLAGS  += -Wno-pointer-arith -Wredundant-decls
     1.7 -CFLAGS  += -DIA64 -DXEN -DLINUX_2_6 -DXEN_HYPERVISOR
     1.8 +CFLAGS  += -DIA64 -DXEN -DLINUX_2_6
     1.9  CFLAGS	+= -ffixed-r13 -mfixed-range=f12-f15,f32-f127
    1.10  CFLAGS	+= -w -g
    1.11  ifeq ($(CONFIG_VTI),y)
     2.1 --- a/xen/arch/ia64/asm-offsets.c	Mon Aug 15 14:52:20 2005 +0800
     2.2 +++ b/xen/arch/ia64/asm-offsets.c	Mon Aug 15 13:06:03 2005 -0800
     2.3 @@ -139,14 +139,14 @@ void foo(void)
     2.4  	DEFINE(IA64_PT_REGS_R2_OFFSET, offsetof (struct pt_regs, r2));
     2.5  	DEFINE(IA64_PT_REGS_R3_OFFSET, offsetof (struct pt_regs, r3));
     2.6  #ifdef CONFIG_VTI
     2.7 -	DEFINE(IA64_PT_REGS_R4_OFFSET, offsetof (struct xen_regs, r4));
     2.8 -	DEFINE(IA64_PT_REGS_R5_OFFSET, offsetof (struct xen_regs, r5));
     2.9 -	DEFINE(IA64_PT_REGS_R6_OFFSET, offsetof (struct xen_regs, r6));
    2.10 -	DEFINE(IA64_PT_REGS_R7_OFFSET, offsetof (struct xen_regs, r7));
    2.11 -	DEFINE(IA64_PT_REGS_CR_IIPA_OFFSET, offsetof (struct xen_regs, cr_iipa));
    2.12 -	DEFINE(IA64_PT_REGS_CR_ISR_OFFSET, offsetof (struct xen_regs, cr_isr));
    2.13 -	DEFINE(IA64_PT_REGS_EML_UNAT_OFFSET, offsetof (struct xen_regs, eml_unat));
    2.14 -	DEFINE(IA64_PT_REGS_RFI_PFS_OFFSET, offsetof (struct xen_regs, rfi_pfs));
    2.15 +	DEFINE(IA64_PT_REGS_R4_OFFSET, offsetof (struct pt_regs, r4));
    2.16 +	DEFINE(IA64_PT_REGS_R5_OFFSET, offsetof (struct pt_regs, r5));
    2.17 +	DEFINE(IA64_PT_REGS_R6_OFFSET, offsetof (struct pt_regs, r6));
    2.18 +	DEFINE(IA64_PT_REGS_R7_OFFSET, offsetof (struct pt_regs, r7));
    2.19 +	DEFINE(IA64_PT_REGS_CR_IIPA_OFFSET, offsetof (struct pt_regs, cr_iipa));
    2.20 +	DEFINE(IA64_PT_REGS_CR_ISR_OFFSET, offsetof (struct pt_regs, cr_isr));
    2.21 +	DEFINE(IA64_PT_REGS_EML_UNAT_OFFSET, offsetof (struct pt_regs, eml_unat));
    2.22 +	DEFINE(IA64_PT_REGS_RFI_PFS_OFFSET, offsetof (struct pt_regs, rfi_pfs));
    2.23  	DEFINE(RFI_IIP_OFFSET, offsetof(struct vcpu, arch.arch_vmx.rfi_iip));
    2.24  	DEFINE(RFI_IPSR_OFFSET, offsetof(struct vcpu, arch.arch_vmx.rfi_ipsr));
    2.25  	DEFINE(RFI_IFS_OFFSET,offsetof(struct vcpu ,arch.arch_vmx.rfi_ifs));
     3.1 --- a/xen/arch/ia64/domain.c	Mon Aug 15 14:52:20 2005 +0800
     3.2 +++ b/xen/arch/ia64/domain.c	Mon Aug 15 13:06:03 2005 -0800
     3.3 @@ -450,7 +450,7 @@ void new_thread(struct vcpu *v,
     3.4                  unsigned long start_info)
     3.5  {
     3.6  	struct domain *d = v->domain;
     3.7 -	struct xen_regs *regs;
     3.8 +	struct pt_regs *regs;
     3.9  	struct ia64_boot_param *bp;
    3.10  	extern char saved_command_line[];
    3.11  	//char *dom0_cmdline = "BOOT_IMAGE=scsi0:\EFI\redhat\xenlinux nomca root=/dev/sdb1 ro";
     4.1 --- a/xen/arch/ia64/vmx_vcpu.c	Mon Aug 15 14:52:20 2005 +0800
     4.2 +++ b/xen/arch/ia64/vmx_vcpu.c	Mon Aug 15 13:06:03 2005 -0800
     4.3 @@ -111,7 +111,7 @@ vmx_vcpu_set_psr(VCPU *vcpu, unsigned lo
     4.4      }
     4.5      new_psr.val=vmx_vcpu_get_psr(vcpu);
     4.6      {
     4.7 -    struct xen_regs *regs = vcpu_regs(vcpu);
     4.8 +    struct pt_regs *regs = vcpu_regs(vcpu);
     4.9      guest_psr_buf[guest_psr_index].ip = regs->cr_iip;
    4.10      guest_psr_buf[guest_psr_index].psr = new_psr.val;
    4.11      if (++guest_psr_index >= 100)
    4.12 @@ -141,7 +141,7 @@ vmx_vcpu_set_psr(VCPU *vcpu, unsigned lo
    4.13      return IA64_NO_FAULT;
    4.14  }
    4.15  
    4.16 -/* Adjust slot both in xen_regs and vpd, upon vpsr.ri which
    4.17 +/* Adjust slot both in pt_regs and vpd, upon vpsr.ri which
    4.18   * should have sync with ipsr in entry.
    4.19   *
    4.20   * Clear some bits due to successfully emulation.
     5.1 --- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h	Mon Aug 15 14:52:20 2005 +0800
     5.2 +++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h	Mon Aug 15 13:06:03 2005 -0800
     5.3 @@ -97,6 +97,7 @@
     5.4   */
     5.5  #ifdef XEN
     5.6  #include <public/arch-ia64.h>
     5.7 +#define pt_regs cpu_user_regs
     5.8  #else
     5.9  struct pt_regs {
    5.10  	/* The following registers are saved by SAVE_MIN: */
     6.1 --- a/xen/include/asm-ia64/regs.h	Mon Aug 15 14:52:20 2005 +0800
     6.2 +++ b/xen/include/asm-ia64/regs.h	Mon Aug 15 13:06:03 2005 -0800
     6.3 @@ -1,3 +1,2 @@
     6.4  #include <asm/ptrace.h>
     6.5 -#define cpu_user_regs pt_regs
     6.6  #define xen_regs pt_regs
     7.1 --- a/xen/include/asm-ia64/vcpu.h	Mon Aug 15 14:52:20 2005 +0800
     7.2 +++ b/xen/include/asm-ia64/vcpu.h	Mon Aug 15 13:06:03 2005 -0800
     7.3 @@ -6,6 +6,7 @@
     7.4  
     7.5  //#include "thread.h"
     7.6  #include <asm/ia64_int.h>
     7.7 +#include <public/arch-ia64.h>
     7.8  
     7.9  typedef	unsigned long UINT64;
    7.10  typedef	unsigned int UINT;
    7.11 @@ -13,7 +14,7 @@ typedef	int BOOLEAN;
    7.12  struct vcpu;
    7.13  typedef	struct vcpu VCPU;
    7.14  
    7.15 -typedef struct pt_regs REGS;
    7.16 +typedef cpu_user_regs_t REGS;
    7.17  
    7.18  #define VCPU(_v,_x)	_v->vcpu_info->arch.privregs->_x
    7.19  
     8.1 --- a/xen/include/public/arch-ia64.h	Mon Aug 15 14:52:20 2005 +0800
     8.2 +++ b/xen/include/public/arch-ia64.h	Mon Aug 15 13:06:03 2005 -0800
     8.3 @@ -57,11 +57,7 @@ struct pt_fpreg {
     8.4          } u;
     8.5  };
     8.6  
     8.7 -#ifdef XEN_HYPERVISOR
     8.8 -struct pt_regs {
     8.9 -#else
    8.10 -struct xen_pt_regs {
    8.11 -#endif
    8.12 +typedef struct cpu_user_regs{
    8.13  	/* The following registers are saved by SAVE_MIN: */
    8.14  	unsigned long b6;		/* scratch */
    8.15  	unsigned long b7;		/* scratch */
    8.16 @@ -142,7 +138,7 @@ struct xen_pt_regs {
    8.17  	struct pt_fpreg f9;		/* scratch */
    8.18  	struct pt_fpreg f10;		/* scratch */
    8.19  	struct pt_fpreg f11;		/* scratch */
    8.20 -};
    8.21 +}cpu_user_regs_t;
    8.22  
    8.23  typedef union {
    8.24  	unsigned long value;
    8.25 @@ -278,11 +274,7 @@ typedef struct vcpu_guest_context {
    8.26  	unsigned long vm_assist;   /* VMASST_TYPE_* bitmap, now none on IPF */
    8.27  	unsigned long guest_iip;   /* Guest entry point */
    8.28  
    8.29 -#ifdef XEN_HYPERVISOR
    8.30 -	struct pt_regs regs;
    8.31 -#else
    8.32 -	struct xen_pt_regs regs;
    8.33 -#endif
    8.34 +	cpu_user_regs_t regs;
    8.35  	arch_vcpu_info_t vcpu;
    8.36  	arch_shared_info_t shared;
    8.37  } vcpu_guest_context_t;