From patchwork Wed Mar 20 06:20:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 10860881 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1B90139A for ; Wed, 20 Mar 2019 06:21:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99586299D3 for ; Wed, 20 Mar 2019 06:21:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CB7A299D5; Wed, 20 Mar 2019 06:21:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38904299D3 for ; Wed, 20 Mar 2019 06:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727453AbfCTGVQ (ORCPT ); Wed, 20 Mar 2019 02:21:16 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:44126 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727505AbfCTGVQ (ORCPT ); Wed, 20 Mar 2019 02:21:16 -0400 Received: by mail-oi1-f194.google.com with SMTP id i21so884940oib.11 for ; Tue, 19 Mar 2019 23:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=clpCQzSBoguvAsOQb5+AHrmE6H+MysxHikfRWT15AjI=; b=oyqmhm8wqdYmeW49pOJZx6kWHiKDVsu6mO0AtDB3KWaqry+VChCSRX11ylVZqzq0x3 L+bzAwk9OPL1vXQx1VzemuDFhgA2wRwCNbt5utrTqy/a5hlpRuWpSX1bvqElwUhATxcF VE9hb/z7qo4waRtOQ6YNoXbWGZagx6h/N4PTRX+elfg8P/Tee1hZowuDJBN2pOJcSxPQ 38q/+wd0aZ1nviTKGTOTqNyTJ3ZMxfTvZ6BzbU6ADMes4R39Jkj7TvhRPto3gFd97z8c OZK3Ds1wslc2QGASW2RW8hxBXJsDweuO7VGZ7TkOtUbbFgWgzgx2aeFm2G6RSlBT9AB9 mztQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=clpCQzSBoguvAsOQb5+AHrmE6H+MysxHikfRWT15AjI=; b=VDQdQr8dqJcDeUu/X5D9FPHxlVuTmEMJ7eVKg6WgasJ3ySLQlc9mM6nIcGuEz+BLPW nVy1nTPDYqY5QT7BLMchALX4oXEeUhOnAUqXwaxel95QupDozEEE2agj2lCQcl7qFBQu pmHyZgS5oCOA19283krSKPZBpVbowXu5kMKNPhQjDyMRUc0T54pDyxbGlTGX7nWPvPsB WU3Hl0g4bbA9X/TBBeXTHME1R4ychNjQJYRyBlZjWqXDxozdylwWA+PyB2h3sAKJdw+t 2ftBVMQq7wfeXP0RtytwjqdUzP/AecWS4UA85w4j3tdLfExiz4/hHb5hY6yQhSsd29Vr GTOQ== X-Gm-Message-State: APjAAAXDuBfT8SFylbZbx6Ga8w7Mto0mZWbVdmKVNKwkQl+Cbq26bSK0 tOIAxxKmHyNiESn+oTv1HnkAJMWpg5g= X-Google-Smtp-Source: APXvYqzw2h4pPAz5LzuuSDP5LAM0YGg9FPNgY4lM6SR6vVWkTXOJP/i8IYs8HXa5FDwdWFK2TE2fOA== X-Received: by 2002:aca:cf96:: with SMTP id f144mr4112569oig.19.1553062875372; Tue, 19 Mar 2019 23:21:15 -0700 (PDT) Received: from localhost.localdomain (li808-42.members.linode.com. [104.237.132.42]) by smtp.gmail.com with ESMTPSA id e186sm401517oia.44.2019.03.19.23.21.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2019 23:21:14 -0700 (PDT) From: Leo Yan To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Will Deacon , Marc Zyngier , Jean-Philippe Brucker , Eric Auger , Robin Murphy Cc: Leo Yan Subject: [PATCH kvmtool v2 2/3] vfio-pci: Remove useless FDs reservation in vfio_pci_enable_intx() Date: Wed, 20 Mar 2019 14:20:45 +0800 Message-Id: <20190320062046.3895-3-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190320062046.3895-1-leo.yan@linaro.org> References: <20190320062046.3895-1-leo.yan@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since INTx only uses 2 FDs, it's not particularly useful to reserve FDs in function vfio_pci_enable_intx(); so this patch is to remove FDs reservation in this function. Signed-off-by: Leo Yan --- vfio/pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/vfio/pci.c b/vfio/pci.c index 5224fee..d025581 100644 --- a/vfio/pci.c +++ b/vfio/pci.c @@ -1025,8 +1025,6 @@ static int vfio_pci_enable_intx(struct kvm *kvm, struct vfio_device *vdev) .index = VFIO_PCI_INTX_IRQ_INDEX, }; - vfio_pci_reserve_irq_fds(2); - ret = ioctl(vdev->fd, VFIO_DEVICE_GET_IRQ_INFO, &irq_info); if (ret || irq_info.count == 0) { vfio_dev_err(vdev, "no INTx reported by VFIO");