aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-04-07 11:04:27 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-04-07 11:04:27 +0100
commit6cc1002a775bdf4d155aef6492bc486339096167 (patch)
treec5e3a28ebc1adc9949c53d5db1ac859727d2a0c8
parent104dbd4fd23e826babc7d99c84fad2224ee8e664 (diff)
downloadxen-6cc1002a775bdf4d155aef6492bc486339096167.tar.gz
xen-6cc1002a775bdf4d155aef6492bc486339096167.tar.bz2
xen-6cc1002a775bdf4d155aef6492bc486339096167.zip
xentrace: Only trace 64b vmexit when in long mode.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
-rw-r--r--xen/arch/x86/hvm/svm/svm.c11
-rw-r--r--xen/arch/x86/hvm/vmx/vmx.c11
2 files changed, 16 insertions, 6 deletions
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index bd320fbe1f..a70f0ffd95 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1217,9 +1217,14 @@ asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs)
exit_reason = vmcb->exitcode;
- HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
- (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
- 0, 0, 0);
+ if ( hvm_long_mode_enabled(v) )
+ HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
+ (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
+ 0, 0, 0);
+ else
+ HVMTRACE_ND(VMEXIT, 1/*cycles*/, 2, exit_reason,
+ (uint32_t)regs->eip,
+ 0, 0, 0, 0);
if ( unlikely(exit_reason == VMEXIT_INVALID) )
{
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 3374ebb657..2d4c44bd63 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2241,9 +2241,14 @@ asmlinkage void vmx_vmexit_handler(struct cpu_user_regs *regs)
exit_reason = __vmread(VM_EXIT_REASON);
- HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
- (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
- 0, 0, 0);
+ if ( hvm_long_mode_enabled(v) )
+ HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
+ (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
+ 0, 0, 0);
+ else
+ HVMTRACE_ND(VMEXIT, 1/*cycles*/, 2, exit_reason,
+ (uint32_t)regs->eip,
+ 0, 0, 0, 0);
perfc_incra(vmexits, exit_reason);