[PATCH] kmod: Adjust MSR helper availability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <jan.kiszka@xxxxxxxxxxx>
---

 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 <asm/msr.h>
 #include <asm/asm.h>
 
-#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;
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux