From: gsomlo@gmail.com Subject: [kvm-kmod PATCH 1/2] Provide VFIO_DMA_CC_IOMMU and *cpu_notifier* functions for kernels < 3.15 Date: Tue, 22 Apr 2014 10:51:36 -0400 Message-ID: <20140422145133.GA1630@ERROL.INI.CMU.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: jan.kiszka@siemens.com Return-path: Received: from mail-qc0-f172.google.com ([209.85.216.172]:42621 "EHLO mail-qc0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756819AbaDVOvm (ORCPT ); Tue, 22 Apr 2014 10:51:42 -0400 Received: by mail-qc0-f172.google.com with SMTP id i8so5442514qcq.17 for ; Tue, 22 Apr 2014 07:51:41 -0700 (PDT) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Gabriel Somlo --- 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 --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 -- 1.9.0