From patchwork Thu Jun 25 08:24:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 32335 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 n5P8Ob5I019146 for ; Thu, 25 Jun 2009 08:24:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbZFYIYa (ORCPT ); Thu, 25 Jun 2009 04:24:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751845AbZFYIYa (ORCPT ); Thu, 25 Jun 2009 04:24:30 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:20382 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751663AbZFYIY2 (ORCPT ); Thu, 25 Jun 2009 04:24:28 -0400 Received: from mail2.sbs.de (localhost [127.0.0.1]) by lizzard.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n5P8OCR3018541; Thu, 25 Jun 2009 10:24:13 +0200 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail2.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n5P8OCDu032420; Thu, 25 Jun 2009 10:24:12 +0200 Message-ID: <4A43342C.2070303@siemens.com> Date: Thu, 25 Jun 2009 10:24:12 +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] kvm-kmod: Fix condition for native_read_msr_safe wrapping Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org For i386, native_read_msr_safe was already introduced in 2.6.22. Signed-off-by: Jan Kiszka --- x86/external-module-compat.h | 4 ++++ 1 files changed, 4 insertions(+), 0 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 881602e..8436e43 100644 --- a/x86/external-module-compat.h +++ b/x86/external-module-compat.h @@ -72,6 +72,8 @@ typedef u64 phys_addr_t; #define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) || defined(CONFIG_X86_64) + static inline unsigned long long native_read_msr_safe(unsigned int msr, int *err) { @@ -90,6 +92,8 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr, #endif +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) static inline int rdmsrl_safe(unsigned msr, unsigned long long *p)