From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Sharma Subject: [PATCH][3/5] x86-64-rdmsrl.patch Date: Tue, 19 Apr 2005 15:06:50 -0700 Message-ID: <20050419220650.GA25296@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt , Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Use the rdmsrl implementation from Linux. Signed-off-by: Arun Sharma 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 */ \