Skip to contentSkip to conversation

kvm-kmod: Fix condition for native_read_msr_safe wrapping

PATCH Applied Jan Kiszka 2 participants 2 messages Jun 25, 2009 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 kvm-kmod: Fix condition for native_read_msr_safe wrapping

For i386, native_read_msr_safe was already introduced in 2.6.22.

---

 x86/external-module-compat.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
x86/external-module-compat.h +4 -0
index 881602e..8436e43 100644
@@ -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)
Applied
#1 lore raw
Quoted 2 lines · Jan Kiszka

For i386, native_read_msr_safe was already introduced in 2.6.22.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function