From patchwork Tue Apr 22 14:51:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gabriel L. Somlo" X-Patchwork-Id: 4033111 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C59129F1F4 for ; Tue, 22 Apr 2014 14:52:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D0B7E201F7 for ; Tue, 22 Apr 2014 14:52:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D944201FB for ; Tue, 22 Apr 2014 14:51:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756884AbaDVOvp (ORCPT ); Tue, 22 Apr 2014 10:51:45 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=qGh+ZXemMQSOSf0HU6VKu2PFNWcMCHUl7425t7nWRAM=; b=kym6rvOV2PDu5OMXjwYDR0aIJmCHTiUykOxNoOJfPjZ9TIXH/2LxZnTTJFPqJ44Yc3 n/CZfeqB7La7p2hIoCzLzA6k/Mk0YNZwM1/a+3A+elWh2yk9F3V5du3vBRPt6u53iqd7 IP1B7QxQdxk0rvrQvF6ELgqOjbiqNtZ9+KvuSidK6dajBS7MMZ6v5vDBHm7xLcPvQIQc pqOuxov4qKzsy1GfwcdDKTNSt4V6WgSGFgegix2df4UmH2PiHZyuxW0++Beugsls9KNM OisQL9ehefFf/CKsYod8Deb7QfWvisuIeNa6OdW0v74Y+ymQapwhZyNaeGrFU4CH68pT Mp5w== X-Received: by 10.140.108.4 with SMTP id i4mr25950137qgf.80.1398178301101; Tue, 22 Apr 2014 07:51:41 -0700 (PDT) Received: from ERROL.INI.CMU.EDU (ERROL.INI.CMU.EDU. [128.2.16.43]) by mx.google.com with ESMTPSA id j2sm41314341qge.16.2014.04.22.07.51.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Apr 2014 07:51:40 -0700 (PDT) Date: Tue, 22 Apr 2014 10:51:36 -0400 From: gsomlo@gmail.com To: jan.kiszka@siemens.com Cc: kvm@vger.kernel.org Subject: [kvm-kmod PATCH 1/2] Provide VFIO_DMA_CC_IOMMU and *cpu_notifier* functions for kernels < 3.15 Message-ID: <20140422145133.GA1630@ERROL.INI.CMU.EDU> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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