From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] kmod: Adjust MSR helper availability Date: Mon, 11 May 2009 17:36:26 +0200 Message-ID: <4A0845FA.6000503@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Avi Kivity Return-path: Received: from lizzard.sbs.de ([194.138.37.39]:22422 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755681AbZEKPgo (ORCPT ); Mon, 11 May 2009 11:36:44 -0400 Sender: kvm-owner@vger.kernel.org List-ID: native_read_msr_safe() and macros already materialized in 2.6.25, only rdmsrl_safe is required for that kernel. Signed-off-by: Jan Kiszka --- x86/external-module-compat.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index 13a218b..a9476ff 100644 --- a/x86/external-module-compat.h +++ b/x86/external-module-compat.h @@ -11,7 +11,7 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) #ifdef CONFIG_X86_64 #define DECLARE_ARGS(val, low, high) unsigned low, high @@ -73,6 +73,10 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr, return EAX_EDX_VAL(val, low, high); } +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) + static inline int rdmsrl_safe(unsigned msr, unsigned long long *p) { int err;