[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] vti fault handler clean up: make VTI_DEBUG configurable
# HG changeset patch # User Alex Williamson <alex.williamson@xxxxxx> # Date 1197662942 25200 # Node ID ba569af64b44c9514314f8c77283d45c8cf4b49f # Parent 0f5926ba1d282d2552a6ebead7f5680660fa2699 [IA64] vti fault handler clean up: make VTI_DEBUG configurable And make IVT_DEBUG_MAX changable. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> --- xen/arch/ia64/Rules.mk | 5 ++++- xen/arch/ia64/asm-offsets.c | 1 + xen/arch/ia64/vmx/vmx_ivt.S | 5 +++-- xen/arch/ia64/vmx/vmx_vcpu.c | 3 --- xen/include/asm-ia64/vmx_vpd.h | 12 +++++++++++- 5 files changed, 19 insertions(+), 7 deletions(-) diff -r 0f5926ba1d28 -r ba569af64b44 xen/arch/ia64/Rules.mk --- a/xen/arch/ia64/Rules.mk Fri Dec 14 13:07:01 2007 -0700 +++ b/xen/arch/ia64/Rules.mk Fri Dec 14 13:09:02 2007 -0700 @@ -6,6 +6,7 @@ HAS_VGA := y HAS_VGA := y xenoprof := y no_warns ?= n +vti_debug ?= n xen_ia64_expose_p2m ?= y xen_ia64_pervcpu_vhpt ?= y xen_ia64_tlb_track ?= y @@ -36,7 +37,9 @@ CFLAGS += -DIA64 -DXEN -DLINUX_2_6 CFLAGS += -DIA64 -DXEN -DLINUX_2_6 CFLAGS += -ffixed-r13 -mfixed-range=f2-f5,f12-f127,b2-b5 CFLAGS += -g -#CFLAGS += -DVTI_DEBUG +ifeq ($(vti_debug),y) +CFLAGS += -DVTI_DEBUG +endif ifeq ($(xen_ia64_expose_p2m),y) CFLAGS += -DCONFIG_XEN_IA64_EXPOSE_P2M endif diff -r 0f5926ba1d28 -r ba569af64b44 xen/arch/ia64/asm-offsets.c --- a/xen/arch/ia64/asm-offsets.c Fri Dec 14 13:07:01 2007 -0700 +++ b/xen/arch/ia64/asm-offsets.c Fri Dec 14 13:09:02 2007 -0700 @@ -46,6 +46,7 @@ void foo(void) #ifdef VTI_DEBUG DEFINE(IVT_CUR_OFS, offsetof(struct vcpu, arch.arch_vmx.ivt_current)); DEFINE(IVT_DBG_OFS, offsetof(struct vcpu, arch.arch_vmx.ivt_debug)); + DEFINE(IVT_DEBUG_SIZE, sizeof(struct ivt_debug)); #endif DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); diff -r 0f5926ba1d28 -r ba569af64b44 xen/arch/ia64/vmx/vmx_ivt.S --- a/xen/arch/ia64/vmx/vmx_ivt.S Fri Dec 14 13:07:01 2007 -0700 +++ b/xen/arch/ia64/vmx/vmx_ivt.S Fri Dec 14 13:09:02 2007 -0700 @@ -70,6 +70,7 @@ #ifdef VTI_DEBUG +#define IVT_DEBUG_MASK (IVT_DEBUG_SIZE * (IVT_DEBUG_MAX - 1)) #define VMX_DBG_FAULT(i) \ add r16=IVT_CUR_OFS,r21; \ add r17=IVT_DBG_OFS,r21;; \ @@ -80,9 +81,9 @@ mov r22=cr.ifa; \ mov r23=i;; \ st8 [r17]=r19,8; \ - add r18=32,r18;; \ + add r18=IVT_DEBUG_SIZE,r18;; \ st8 [r17]=r20,8; \ - mov r19=0xfe0;; \ + mov r19=IVT_DEBUG_MASK;; \ st8 [r17]=r22,8; \ and r18=r19,r18;; \ st8 [r17]=r23; \ diff -r 0f5926ba1d28 -r ba569af64b44 xen/arch/ia64/vmx/vmx_vcpu.c --- a/xen/arch/ia64/vmx/vmx_vcpu.c Fri Dec 14 13:07:01 2007 -0700 +++ b/xen/arch/ia64/vmx/vmx_vcpu.c Fri Dec 14 13:09:02 2007 -0700 @@ -111,13 +111,10 @@ vmx_vcpu_set_psr(VCPU *vcpu, unsigned lo } new_psr.val=VCPU(vcpu, vpsr); #ifdef VTI_DEBUG - { - struct pt_regs *regs = vcpu_regs(vcpu); guest_psr_buf[guest_psr_index].ip = regs->cr_iip; guest_psr_buf[guest_psr_index].psr = new_psr.val; if (++guest_psr_index >= 100) guest_psr_index = 0; - } #endif #if 0 if (old_psr.i != new_psr.i) { diff -r 0f5926ba1d28 -r ba569af64b44 xen/include/asm-ia64/vmx_vpd.h --- a/xen/include/asm-ia64/vmx_vpd.h Fri Dec 14 13:07:01 2007 -0700 +++ b/xen/include/asm-ia64/vmx_vpd.h Fri Dec 14 13:09:02 2007 -0700 @@ -22,6 +22,17 @@ #ifndef _ASM_IA64_VMX_VPD_H_ #define _ASM_IA64_VMX_VPD_H_ +#ifdef VTI_DEBUG +/* + * must be power of 2. + * Be carefull to avoid stack over flow keeping + * struct arch_vmx_struct(i.e. struct vcpu) small enough. + * sizeof(struct ivt_debug) * IVT_DEBUG_MAX = 32 * IVT_DEBUG_MAX + */ +//#define IVT_DEBUG_MAX 128 /* 4096 bytes */ +#define IVT_DEBUG_MAX 16 /* 512 bytes */ +#endif + #ifndef __ASSEMBLY__ #include <asm/vtm.h> @@ -39,7 +50,6 @@ struct ivt_debug{ unsigned long ifa; unsigned long vector; }; -#define IVT_DEBUG_MAX 128 #endif struct arch_vmx_struct { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |