xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen: fix MSR xentrace output
@ 2010-08-03 16:24 Christoph Egger
  2010-08-03 16:39 ` George Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Egger @ 2010-08-03 16:24 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 471 bytes --]


Hi!

Attached patch corrects MSR read/write trace output.
Also avoid duplicate MSR read/write lines in xentrace output.
MSR and value are mixed up.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_fixtrace.diff --]
[-- Type: text/x-diff, Size: 1396 bytes --]

diff -r 2c6ae364ed7b xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Mon Aug 02 11:00:56 2010 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Tue Aug 03 18:21:41 2010 +0200
@@ -2105,11 +2105,12 @@ int hvm_msr_read_intercept(unsigned int 
         }
     }
 
-    HVMTRACE_3D(MSR_READ, (uint32_t)*msr_content, (uint32_t)(*msr_content >> 32), msr);
+    HVMTRACE_3D(MSR_READ, msr, (uint32_t)*msr_content, (uint32_t)(*msr_content >> 32));
 
     return X86EMUL_OKAY;
 
 gp_fault:
+    HVMTRACE_3D(MSR_READ, msr, (uint32_t)*msr_content, (uint32_t)(*msr_content >> 32));
     hvm_inject_exception(TRAP_gp_fault, 0, 0);
     return X86EMUL_EXCEPTION;
 }
@@ -2121,8 +2122,6 @@ int hvm_msr_write_intercept(unsigned int
     uint32_t cpuid[4];
     int ret;
 
-    HVMTRACE_3D(MSR_WRITE, (uint32_t)msr_content, (uint32_t)(msr_content >> 32), msr);
-
     hvm_cpuid(1, &cpuid[0], &cpuid[1], &cpuid[2], &cpuid[3]);
     mtrr = !!(cpuid[3] & bitmaskof(X86_FEATURE_MTRR));
 
@@ -2203,9 +2202,13 @@ int hvm_msr_write_intercept(unsigned int
             return hvm_funcs.msr_write_intercept(msr, msr_content);
     }
 
+    HVMTRACE_3D(MSR_WRITE, msr, (uint32_t)msr_content, (uint32_t)(msr_content >> 32));
+
     return X86EMUL_OKAY;
 
 gp_fault:
+    HVMTRACE_3D(MSR_WRITE, msr, (uint32_t)msr_content, (uint32_t)(msr_content >> 32));
+
     hvm_inject_exception(TRAP_gp_fault, 0, 0);
     return X86EMUL_EXCEPTION;
 }

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-08-04  8:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 16:24 [PATCH] xen: fix MSR xentrace output Christoph Egger
2010-08-03 16:39 ` George Dunlap
2010-08-03 16:48   ` George Dunlap
2010-08-03 16:57   ` Keir Fraser
2010-08-04  8:40     ` George Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).