All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][3/5] x86-64-rdmsrl.patch
@ 2005-04-19 22:06 Arun Sharma
  0 siblings, 0 replies; only message in thread
From: Arun Sharma @ 2005-04-19 22:06 UTC (permalink / raw)
  To: Ian Pratt, Keir Fraser; +Cc: xen-devel

   Use the rdmsrl implementation from Linux.
   
   Signed-off-by: Arun Sharma <arun.sharma@intel.com>
 
diff -Nru a/xen/include/asm-x86/msr.h b/xen/include/asm-x86/msr.h
--- a/xen/include/asm-x86/msr.h	2005-04-18 16:49:38 -07:00
+++ b/xen/include/asm-x86/msr.h	2005-04-18 16:49:38 -07:00
@@ -6,6 +6,13 @@
 			  : "=a" (val1), "=d" (val2) \
 			  : "c" (msr))
 
+#define rdmsrl(msr,val) do { unsigned long a__,b__; \
+       __asm__ __volatile__("rdmsr" \
+			    : "=a" (a__), "=d" (b__) \
+			    : "c" (msr)); \
+       val = a__ | (b__<<32); \
+} while(0); 
+
 #define wrmsr(msr,val1,val2) \
      __asm__ __volatile__("wrmsr" \
 			  : /* no outputs */ \

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-19 22:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-19 22:06 [PATCH][3/5] x86-64-rdmsrl.patch Arun Sharma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.