From patchwork Fri Oct 31 13:38:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 39890 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9E96202FE for ; Fri, 31 Oct 2014 13:38:42 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id h11sf618760wiw.11 for ; Fri, 31 Oct 2014 06:38:42 -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=VZt0MY+w9xTiG02rQqQ7rj/w+5e6Cibd/pb4y5bf67E=; b=kJFcDkeWq80B6ABd2Dlr2fqFzoTvKhf6o3xuH9wgQd6qzbHV8Ors3tL2XNlhTk1213 eFbGdTk7goiHTSVjvOisgW2cPcgfZ014VQBmZ6PPwyI6vwzNQjgOLuG2L2UYAmUnk47f CxjnFD7AehwvCxw4+7u4aXf4sjFRU4bvOsQxZRzbTvKAVyASwtuyFYCutK8nsf9vmwWk 9Elgj/rLFr/udMgdP5/BpIXzN/tj0I386p9/e2EyVnggpg0Wlz0iav9vAqAtf38yY9Px KEnz9wHqGCVdLpJ3SVmIDeKcA3sfwA5dijd1E7g0DD5d5RHUIQ+KM+3heXFHS8IW+Dzf EQHw== X-Gm-Message-State: ALoCoQn0bXgDWb5prkI80/GpFj1DW6Q6wpsrL1pxKsJC+iSDioWKwu+fepDi07fweibbcyfPFia9 X-Received: by 10.194.242.36 with SMTP id wn4mr472698wjc.4.1414762722020; Fri, 31 Oct 2014 06:38:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.6.7 with SMTP id cq7ls481452lad.8.gmail; Fri, 31 Oct 2014 06:38:41 -0700 (PDT) X-Received: by 10.152.5.100 with SMTP id r4mr26529059lar.26.1414762721866; Fri, 31 Oct 2014 06:38:41 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id ap3si16770973lbc.33.2014.10.31.06.38.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 06:38:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id z11so4030830lbi.5 for ; Fri, 31 Oct 2014 06:38:41 -0700 (PDT) X-Received: by 10.112.189.10 with SMTP id ge10mr26101630lbc.23.1414762721794; Fri, 31 Oct 2014 06:38:41 -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.112.84.229 with SMTP id c5csp203354lbz; Fri, 31 Oct 2014 06:38:41 -0700 (PDT) X-Received: by 10.194.176.100 with SMTP id ch4mr6535149wjc.101.1414762721275; Fri, 31 Oct 2014 06:38:41 -0700 (PDT) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com. [209.85.212.170]) by mx.google.com with ESMTPS id ez14si14640210wid.57.2014.10.31.06.38.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 06:38:41 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.170 as permitted sender) client-ip=209.85.212.170; Received: by mail-wi0-f170.google.com with SMTP id q5so1306956wiv.1 for ; Fri, 31 Oct 2014 06:38:41 -0700 (PDT) X-Received: by 10.181.29.105 with SMTP id jv9mr4056601wid.25.1414762721016; Fri, 31 Oct 2014 06:38:41 -0700 (PDT) Received: from midway01-04-00.lavalab ([88.98.47.97]) by mx.google.com with ESMTPSA id fv2sm12459458wib.2.2014.10.31.06.38.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 06:38:40 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, agraf@suse.de, pbonzini@redhat.com, aik@ozlabs.ru, bsd@redhat.com, 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, peter.maydell@linaro.org Subject: [PATCH v3 2/2] vfio: use kvm_resamplefds_enabled() Date: Fri, 31 Oct 2014 13:38:19 +0000 Message-Id: <1414762699-4700-3-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1414762699-4700-1-git-send-email-eric.auger@linaro.org> References: <1414762699-4700-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.217.174 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 Acked-by: Alex Williamson --- 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 b5e7981..75bfa1c 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); }