aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/trace.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-06-09 09:45:38 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-06-09 09:45:38 +0100
commit591e88391250ccb38b3726f8ea6cdc89587e6d71 (patch)
tree5ce52412e627c4a9955b4c20288f37b1a0995125 /xen/arch/x86/trace.c
parent00093d732e00b6486650c7ad8c0ef4c01d31aa30 (diff)
downloadxen-591e88391250ccb38b3726f8ea6cdc89587e6d71.tar.gz
xen-591e88391250ccb38b3726f8ea6cdc89587e6d71.tar.bz2
xen-591e88391250ccb38b3726f8ea6cdc89587e6d71.zip
xentrace: fix tracing for 64bit guests
Xen tracing some times ago used to put values of type 'long' into the trace buffer. This has changed to uint32_t. Some trace points log virtual addresses, which get cropped to 32bit in this case. There were some inline functions to handle at least PF_XEN and VMEXIT, which caused a lot of code duplication. The attached patch fixes several issues: 1. fix and extend tools/xentrace/formats 2. Fix xentrace_format to handle up to 7 parameters 3. create convenience macros to properly log long values 4. remove the inline functions in hvm/trace.h and replace them by macros 5. Change the CPUID trace to work correctly 6. group HVM trace points enable mechanism I used a similar approach as in PV tracing with bit 8 indicating 64bit pointers. Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Diffstat (limited to 'xen/arch/x86/trace.c')
-rw-r--r--xen/arch/x86/trace.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xen/arch/x86/trace.c b/xen/arch/x86/trace.c
index 65e66a3280..d56ed8fa74 100644
--- a/xen/arch/x86/trace.c
+++ b/xen/arch/x86/trace.c
@@ -7,8 +7,8 @@
#include <xen/trace.h>
#ifndef __x86_64__
-#undef TRC_PV_64_FLAG
-#define TRC_PV_64_FLAG 0
+#undef TRC_64_FLAG
+#define TRC_64_FLAG 0
#endif
asmlinkage void trace_hypercall(void)
@@ -38,7 +38,7 @@ asmlinkage void trace_hypercall(void)
u32 event;
event = TRC_PV_HYPERCALL;
- event |= TRC_PV_64_FLAG;
+ event |= TRC_64_FLAG;
d.eip = regs->eip;
d.eax = regs->eax;
@@ -84,7 +84,7 @@ void __trace_pv_trap(int trapnr, unsigned long eip,
d.use_error_code=!!use_error_code;
event = TRC_PV_TRAP;
- event |= TRC_PV_64_FLAG;
+ event |= TRC_64_FLAG;
__trace_var(event, 1, sizeof(d), (unsigned char *)&d);
}
}
@@ -119,7 +119,7 @@ void __trace_pv_page_fault(unsigned long addr, unsigned error_code)
d.addr = addr;
d.error_code = error_code;
event = TRC_PV_PAGE_FAULT;
- event |= TRC_PV_64_FLAG;
+ event |= TRC_64_FLAG;
__trace_var(event, 1, sizeof(d), (unsigned char *)&d);
}
}
@@ -135,7 +135,7 @@ void __trace_trap_one_addr(unsigned event, unsigned long va)
else
#endif
{
- event |= TRC_PV_64_FLAG;
+ event |= TRC_64_FLAG;
__trace_var(event, 1, sizeof(va), (unsigned char *)&va);
}
}
@@ -161,7 +161,7 @@ void __trace_trap_two_addr(unsigned event, unsigned long va1,
} __attribute__((packed)) d;
d.va1=va1;
d.va2=va2;
- event |= TRC_PV_64_FLAG;
+ event |= TRC_64_FLAG;
__trace_var(event, 1, sizeof(d), (unsigned char *)&d);
}
}
@@ -207,7 +207,7 @@ void __trace_ptwr_emulation(unsigned long addr, l1_pgentry_t npte)
event = ((CONFIG_PAGING_LEVELS == 3) ?
TRC_PV_PTWR_EMULATION_PAE : TRC_PV_PTWR_EMULATION);
- event |= TRC_PV_64_FLAG;
+ event |= TRC_64_FLAG;
__trace_var(event, 1/*tsc*/, sizeof(d), (unsigned char *)&d);
}
}