From patchwork Wed Sep 3 09:54:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 36543 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8834C202E4 for ; Wed, 3 Sep 2014 09:54:45 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf44467307oag.0 for ; Wed, 03 Sep 2014 02:54:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Z8GtUKr8+RbTqIijL0eQ9nL0uw2GbW+AUdvUd3L0mS4=; b=IiH/ID4JJdzR1WckITWQEDXCoZ0O8T8KK+JZgKNlWAywr4uAQbbUVao9MIVfuTIYqT fo/UH3eYWbQHbQAybq2Bxr6k1GMusfrJ670kPw1WYkA/Ja7GphG4CI6ayJgNsfv2MJ+y R2gGsc+t1MOI5rvwbZtCBtNFsGcqW1RZhozYZD36VBJB6L5RuFMAVc5KcuGZ4tjg53uE Y18mOePrEbZbfE2TJ0pSk0mLgryYZ+n4bayT1ekjtwollYTBokx9y3SJKyw0NCQfGYgo ABlQsM6MPJ4ogqE7fSH39BR4P8nebWd4S/WVs0kXGCjyF2vOWGRt7I4AnSCD3mwj3bzx OFBg== X-Gm-Message-State: ALoCoQmxt6XzsYsF0F9VLhrMGXbImhZYIT4DBAAjU9rgkU3TrxJBzv/XtyWxPQDppWS+GzgcwzQF X-Received: by 10.43.152.197 with SMTP id kx5mr23898813icc.9.1409738085198; Wed, 03 Sep 2014 02:54:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.16.232 with SMTP id 95ls2789081qgb.94.gmail; Wed, 03 Sep 2014 02:54:45 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr28887577vdb.27.1409738085036; Wed, 03 Sep 2014 02:54:45 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id m9si3364184vcl.104.2014.09.03.02.54.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 02:54:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id la4so8618552vcb.29 for ; Wed, 03 Sep 2014 02:54:45 -0700 (PDT) X-Received: by 10.52.148.2 with SMTP id to2mr4737723vdb.38.1409738084964; Wed, 03 Sep 2014 02:54:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp654498vcb; Wed, 3 Sep 2014 02:54:44 -0700 (PDT) X-Received: by 10.181.5.42 with SMTP id cj10mr9703530wid.52.1409738084102; Wed, 03 Sep 2014 02:54:44 -0700 (PDT) Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by mx.google.com with ESMTPS id a2si2014272wiv.49.2014.09.03.02.54.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 02:54:44 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 74.125.82.44 as permitted sender) client-ip=74.125.82.44; Received: by mail-wg0-f44.google.com with SMTP id m15so8186147wgh.15 for ; Wed, 03 Sep 2014 02:54:43 -0700 (PDT) X-Received: by 10.180.230.197 with SMTP id ta5mr33688954wic.10.1409738083700; Wed, 03 Sep 2014 02:54:43 -0700 (PDT) Received: from midway01-04-00.lavalab ([88.98.47.97]) by mx.google.com with ESMTPSA id gh1sm3606157wib.18.2014.09.03.02.54.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 02:54:43 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, a.rigo@virtualopensystems.com, agraf@suse.de, aik@ozlabs.ru, bsd@redhat.com, pbonzini@redhat.com, peter.maydell@linaro.org, mtosatti@redhat.com, borntraeger@de.ibm.com, cornelia.huck@de.ibm.com, rth@twiddle.net, thuth@linux.vnet.ibm.com, afaerber@suse.de, qemu-ppc@nongnu.org Cc: eric.auger@linaro.org, kvmarm@lists.cs.columbia.edu, patches@linaro.org, alex.williamson@redhat.com Subject: [PATCH v2 2/2] vfio: use kvm_resamplefds_enabled() Date: Wed, 3 Sep 2014 10:54:10 +0100 Message-Id: <1409738050-3810-3-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1409738050-3810-1-git-send-email-eric.auger@linaro.org> References: <1409738050-3810-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use the kvm_resamplefds_enabled function Signed-off-by: Eric Auger --- hw/misc/vfio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 40dcaa6..24f6a3a 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -406,7 +406,7 @@ static void vfio_enable_intx_kvm(VFIODevice *vdev) if (!VFIO_ALLOW_KVM_INTX || !kvm_irqfds_enabled() || vdev->intx.route.mode != PCI_INTX_ENABLED || - !kvm_check_extension(kvm_state, KVM_CAP_IRQFD_RESAMPLE)) { + !kvm_resamplefds_enabled()) { return; } @@ -568,8 +568,7 @@ static int vfio_enable_intx(VFIODevice *vdev) * Only conditional to avoid generating error messages on platforms * where we won't actually use the result anyway. */ - if (kvm_irqfds_enabled() && - kvm_check_extension(kvm_state, KVM_CAP_IRQFD_RESAMPLE)) { + if (kvm_irqfds_enabled() && kvm_resamplefds_enabled()) { vdev->intx.route = pci_device_route_intx_to_irq(&vdev->pdev, vdev->intx.pin); }