From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] kvm-kmod: Fix condition for native_read_msr_safe wrapping Date: Thu, 25 Jun 2009 10:24:12 +0200 Message-ID: <4A43342C.2070303@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]: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 Sender: kvm-owner@vger.kernel.org List-ID: 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(-) 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)