Skip to contentSkip to conversation

Provide VFIO_DMA_CC_IOMMU and *cpu_notifier* functions for kernels < 3.15

PATCH In review [email protected] 1 participant 1 message Apr 22, 2014 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Provide VFIO_DMA_CC_IOMMU and *cpu_notifier* functions for kernels < 3.15

---

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(+)
x86/external-module-compat.h +10 -0
index 3c41c74..40c31f2 100644
@@ -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
Signature · 1 line
1.9.0