From patchwork Wed May 7 13:19:07 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: 4128021 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 1A3EA9F23C for ; Wed, 7 May 2014 13:19:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 309CE20266 for ; Wed, 7 May 2014 13:19:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29EAB201DE for ; Wed, 7 May 2014 13:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933656AbaEGNTP (ORCPT ); Wed, 7 May 2014 09:19:15 -0400 Received: from mail-qc0-f177.google.com ([209.85.216.177]:53266 "EHLO mail-qc0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932832AbaEGNTN (ORCPT ); Wed, 7 May 2014 09:19:13 -0400 Received: by mail-qc0-f177.google.com with SMTP id i17so1000313qcy.8 for ; Wed, 07 May 2014 06:19:12 -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:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=5kY4OawE+Sa78q1u/Nh2XeaJul8XYGHenG9FE4HIkOA=; b=kS9ieJK2AMc1MfANxw/NyM1TtF9I/Q/GTwHXQjaBnQf+wwCu8CErthcR7ekae13DRE rHftr+byl+WdI4CQwLbyizHLxTCcLuHVX0f9N7EPxq2sd+mMe/HPjoXH6ZdTNTP0p6Hv UaUtmrUee5lZuoAXCKpwplgeqBMXB5ZF0kf6E6dVP3m8dA/bL118l9Q916zlP5DL5xHv 90UqDDHK5RqI2YY6SZo8hiaVCbB/P8W33NSDh85GSaDtPdUmGwdrVZrSjewompy7vUC4 kfBpB8XLe8a/JXwz1EfMWTbweRR7LBpo0DRyF5M904f9C2Q+6mHKWpy9IWXrmV9XFBUH nuVQ== X-Received: by 10.224.114.145 with SMTP id e17mr64483397qaq.53.1399468752834; Wed, 07 May 2014 06:19:12 -0700 (PDT) Received: from ERROL.INI.CMU.EDU (ERROL.INI.CMU.EDU. [128.2.16.43]) by mx.google.com with ESMTPSA id y79sm19930399qgy.18.2014.05.07.06.19.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 May 2014 06:19:12 -0700 (PDT) Date: Wed, 7 May 2014 09:19:07 -0400 From: "Gabriel L. Somlo" To: Jan Kiszka Cc: kvm@vger.kernel.org Subject: Re: [kvm-kmod PATCH] Provide pci_enable_msix_exact() for kernels < 3.15 Message-ID: <20140507131907.GA1655@ERROL.INI.CMU.EDU> References: <20140506183427.GI5644@ERROL.INI.CMU.EDU> <5369D2BF.2050509@siemens.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5369D2BF.2050509@siemens.com> 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 On Wed, May 07, 2014 at 08:29:19AM +0200, Jan Kiszka wrote: > On 2014-05-06 20:35, gsomlo@gmail.com wrote: > > Signed-off-by: Gabriel Somlo > > --- > > > > Jan, > > > > After today's pull from kvm, I also need this to build against my > > Fedora 20 kernel (3.13.10-200.fc20.x86_64). > > Which version did you pull? Neither next nor queue contain this change yet. I have 89ca3b881987f5a4be4c5dbaa7f0df12bbdde2fd (Linux 3.15-rc4) as the top commit. > Right now I'm seeing different build problems: > > http://buildbot.kiszka.org/kvm-kmod/builders/4-latest-kvm/builds/1788/steps/3.11-x86-64/logs/stdio > > Didn't look into details yet. That's kernel 3.11, afaict, so entirely different problem :) > > x86/external-module-compat.h | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h > > index dde9463..e62486b 100644 > > --- a/x86/external-module-compat.h > > +++ b/x86/external-module-compat.h > > @@ -1480,6 +1480,11 @@ static inline int __register_hotcpu_notifier(struct notifier_block *nb) > > { > > return 0; > > } > > +static inline int pci_enable_msix_exact(struct pci_dev *dev, > > + struct msix_entry *entries, int nvec) > > +{ > > + return -ENOSYS; > > +} > > First, this is not x86-specific, thus should go to > external-module-compat-comm.h. Second, pci_enable_msix_exact was > introduced with 3.14. And then I think we can (and should) provide the > original content of this wrapper once it is needed, not a stub. The patch I sent fixed building for 3.13.10-200.fc20.x86_64; as soon as I upgraded to 3.14.2-200.fc20.x86_64 (about half hour later), I could build for it just fine, no errors. So I don't really *need* this fix anymore, but given what you said and that it works fine on 3.14 without a patch (at least for me), the patch *should* then probably be: --- except I can't test it anymore without rebooting to 3.13, which I can't do right away :) Regards, --G -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index 086127d..94b18cc 100644 --- a/external-module-compat-comm.h +++ b/external-module-compat-comm.h @@ -1401,3 +1401,11 @@ static inline void guest_exit(void) #if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) static inline void smp_mb__after_srcu_read_unlock(void) {} #endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) +static inline int pci_enable_msix_exact(struct pci_dev *dev, + struct msix_entry *entries, int nvec) +{ + return -ENOSYS; +} +#endif