From patchwork Mon May 11 15:36:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 23005 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4BFaniY013297 for ; Mon, 11 May 2009 15:36:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755663AbZEKPgp (ORCPT ); Mon, 11 May 2009 11:36:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756464AbZEKPgp (ORCPT ); Mon, 11 May 2009 11:36:45 -0400 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 Received: from mail1.sbs.de (localhost [127.0.0.1]) by lizzard.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n4BFaQIF029273; Mon, 11 May 2009 17:36:26 +0200 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail1.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n4BFaQmj023158; Mon, 11 May 2009 17:36:26 +0200 Message-ID: <4A0845FA.6000503@siemens.com> Date: Mon, 11 May 2009 17:36:26 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity CC: kvm-devel Subject: [PATCH] kmod: Adjust MSR helper availability Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;