WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2 of 2] trace: Trace emulated RDTSC values

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2 of 2] trace: Trace emulated RDTSC values
From: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Date: Thu, 8 Jul 2010 17:33:29 +0100
Cc: george.dunlap@xxxxxxxxxxxxx
Delivery-date: Thu, 08 Jul 2010 09:35:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1278606807@gdunlap-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1278606807@gdunlap-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff -r be013c2c88d7 -r 747f73b62c51 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Thu Jul 08 17:32:51 2010 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Thu Jul 08 17:32:51 2010 +0100
@@ -2011,6 +2011,8 @@
     tsc = hvm_get_guest_tsc(v);
     regs->eax = (uint32_t)tsc;
     regs->edx = (uint32_t)(tsc >> 32);
+
+    HVMTRACE_2D(RDTSC, regs->eax, regs->edx);
 }
 
 int hvm_msr_read_intercept(unsigned int msr, uint64_t *msr_content)
diff -r be013c2c88d7 -r 747f73b62c51 xen/include/asm-x86/hvm/trace.h
--- a/xen/include/asm-x86/hvm/trace.h   Thu Jul 08 17:32:51 2010 +0100
+++ b/xen/include/asm-x86/hvm/trace.h   Thu Jul 08 17:32:51 2010 +0100
@@ -35,6 +35,7 @@
 #define DO_TRC_HVM_DR_WRITE    DEFAULT_HVM_REGACCESS
 #define DO_TRC_HVM_MSR_READ    DEFAULT_HVM_REGACCESS
 #define DO_TRC_HVM_MSR_WRITE   DEFAULT_HVM_REGACCESS
+#define DO_TRC_HVM_RDTSC       DEFAULT_HVM_REGACCESS
 #define DO_TRC_HVM_CPUID       DEFAULT_HVM_MISC
 #define DO_TRC_HVM_INTR        DEFAULT_HVM_INTR
 #define DO_TRC_HVM_NMI         DEFAULT_HVM_INTR
diff -r be013c2c88d7 -r 747f73b62c51 xen/include/public/trace.h
--- a/xen/include/public/trace.h        Thu Jul 08 17:32:51 2010 +0100
+++ b/xen/include/public/trace.h        Thu Jul 08 17:32:51 2010 +0100
@@ -156,6 +156,7 @@
 #define TRC_HVM_CLTS            (TRC_HVM_HANDLER + 0x18)
 #define TRC_HVM_LMSW            (TRC_HVM_HANDLER + 0x19)
 #define TRC_HVM_LMSW64          (TRC_HVM_HANDLER + TRC_64_FLAG + 0x19)
+#define TRC_HVM_RDTSC           (TRC_HVM_HANDLER + 0x1a)
 #define TRC_HVM_INTR_WINDOW     (TRC_HVM_HANDLER + 0x20)
 #define TRC_HVM_NPF             (TRC_HVM_HANDLER + 0x21)
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>