From patchwork Mon Dec 15 16:37:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 42262 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5756C26C69 for ; Mon, 15 Dec 2014 16:42:12 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id d49sf7806975eek.4 for ; Mon, 15 Dec 2014 08:42:11 -0800 (PST) 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:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=bhEuAyVGYSL30FyVkxXatUuQBTbigwVfFsM4lY1lg0A=; b=XIizRM7Upw5p+K+wvz3tdHCZ5IWiA/uirb9veyr9SNFZlyMaOaJFG7W74PU5v+iHP/ tac4Fvx6KRMeLNBXcRC39ib8oDFhL64NVN6Ji8k5AhSRi5hM9uEz3tH16dD+6UoAZjj6 t82fI2gS9mQoBOrm51SnX3RgvnvoIY8B+HFKuuZNo06OxJo86x8tVfBkzcYGki2BsUuC eCHgpUTWZ7vtPSDpn5K4TWaVtMrmfpowicUkFRjbAw39HujN4jeP2ckymREzTfS+Agc+ LbagRcMzflQqlQuiiiXBbPOcQBMkVw0muL3C38vgXLcEX/nhXH8FAKWY/AwGmcXsbFV8 G3AA== X-Gm-Message-State: ALoCoQnBLtkgPCjTzDALMUUf1Jh4QOIN+leR+I2MSKCeYPvI1lX3du9uYiDANXBP7G+Ob+QNkqiN X-Received: by 10.112.130.8 with SMTP id oa8mr478140lbb.11.1418661731555; Mon, 15 Dec 2014 08:42:11 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.38 with SMTP id ld6ls782379lac.50.gmail; Mon, 15 Dec 2014 08:42:11 -0800 (PST) X-Received: by 10.112.136.69 with SMTP id py5mr17411197lbb.56.1418661731287; Mon, 15 Dec 2014 08:42:11 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id v2si3418546laj.133.2014.12.15.08.42.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 08:42:11 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id 10so9539114lbg.15 for ; Mon, 15 Dec 2014 08:42:11 -0800 (PST) X-Received: by 10.112.235.137 with SMTP id um9mr11798025lbc.41.1418661731171; Mon, 15 Dec 2014 08:42:11 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp773650lbb; Mon, 15 Dec 2014 08:42:10 -0800 (PST) X-Received: by 10.140.82.101 with SMTP id g92mr17010148qgd.26.1418661729880; Mon, 15 Dec 2014 08:42:09 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id 94si11218089qga.22.2014.12.15.08.42.09 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 15 Dec 2014 08:42:09 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Received: from localhost ([::1]:40579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0Yin-00014k-4E for patch@linaro.org; Mon, 15 Dec 2014 11:42:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0Yfc-0005HN-U0 for qemu-devel@nongnu.org; Mon, 15 Dec 2014 11:39:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0YfX-00053W-Bc for qemu-devel@nongnu.org; Mon, 15 Dec 2014 11:38:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0YfX-00053S-3x for qemu-devel@nongnu.org; Mon, 15 Dec 2014 11:38:47 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBFGcjjP027847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Dec 2014 11:38:45 -0500 Received: from playground.com (ovpn-112-26.ams2.redhat.com [10.36.112.26]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBFGcXOo031674; Mon, 15 Dec 2014 11:38:43 -0500 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 15 Dec 2014 17:37:48 +0100 Message-Id: <1418661511-22348-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1418661511-22348-1-git-send-email-pbonzini@redhat.com> References: <1418661511-22348-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Eric Auger Subject: [Qemu-devel] [PULL 04/47] vfio: use kvm_resamplefds_enabled() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pbonzini@redhat.com 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.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Eric Auger Use the kvm_resamplefds_enabled function Signed-off-by: Eric Auger Acked-by: Alex Williamson Signed-off-by: Paolo Bonzini --- 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 fd318a1..a315c3a 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); }