diff mbox

[kvm-kmod,1/2] Provide VFIO_DMA_CC_IOMMU and *cpu_notifier* functions for kernels < 3.15

Message ID 20140422145133.GA1630@ERROL.INI.CMU.EDU (mailing list archive)
State New, archived
Headers show

Commit Message

Gabriel L. Somlo April 22, 2014, 2:51 p.m. UTC
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---

Jan,

I upgraded my fedora 20 box to 3.13.10-200.fc20.x86_64 today, and
noticed that in order to build the latest kvm via kvm-kmod, I need
these two patches (second patch to follow shortly).

Thanks,
   Gabriel

 x86/external-module-compat.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox

Patch

diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
index 3c41c74..40c31f2 100644
--- a/x86/external-module-compat.h
+++ b/x86/external-module-compat.h
@@ -1472,6 +1472,16 @@  static inline void update_debugctlmsr(unsigned long debugctlmsr)
 #define POSTED_INTR_VECTOR		0xf2
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
+#define VFIO_DMA_CC_IOMMU		4
+static inline void cpu_notifier_register_begin(void) {}
+static inline void cpu_notifier_register_done(void) {}
+static inline int __register_hotcpu_notifier(struct notifier_block *nb)
+{
+	return 0;
+}
+#endif
+
 #ifndef MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS
 #define MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS (1ULL << 29)
 #endif