From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 9363610BD for ; Mon, 30 Apr 2018 16:42:58 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id u18-v6so8281144wrg.3 for ; Mon, 30 Apr 2018 07:42:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HKlg+/RKbN0ZnXPVOHZhqZefJnD7elWhYbMi0mqZKGw=; b=H1ZR0MTPNn4F70riBU79od6juLAcFHA8gnbly9yOXQA5u+sVaoLpMAuXc6kvL9a3Xj 7nLqxuonoRejwimWxLL6dPJ6QJmaWAjXcB5ljSqsQC/q5dT800QK30PoFY/kTRwPoBLL Di2Y85DM06O8Qs7EdR4++9UHYYmbstL+VhYcoycv0/5tO5CCzKlr70Tx1/CR49F+H2Zs +zYPhGAhrlovoi0PXf2fJlUU8QN5fUJxwyJqIpCik4Vf/5lnFCQrLOwtJPcy5OcwaESH 9tZeST7VHEyqYH1efE0bPmDxVYqTHMkCeiFqBfL+TxloS5hN3IN0yIeOByNcRhjkuuhK 0tFA== 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=HKlg+/RKbN0ZnXPVOHZhqZefJnD7elWhYbMi0mqZKGw=; b=lOxS4ANH6vgZSdF6Tedh2exjUApbE/8OB4w8jO8wH/2XnaRnhUVbux5yj1zDQf1/tf 2GpphkLkMqKDoPi29UpDTBpV8w13gRU3UkXW9yqDZ/IQtig71JW8P46/3K7TXywOgwvE NplJCJ1frcqVKa07nFK9X8FCA2TRaTUgn9KVOtRE1mbqfZoJdTrV5cDPVBF1KF2NcZUy Qd+G7OSTQCX+dkIAaimvcTUjpjEICZShZpdiWtWz8YUKpj+cOhjAUuAQByIXGesbUOzt hYHiyftrvL4v6RBzRo8eTsToNk9b6MVhHkbT28oLiR/guf/tbRPM3+CIficZpmyj/Fmb +p7Q== X-Gm-Message-State: ALQs6tCbcIxjJUdQ1vWwdriDarB21w0BkKWQLQH4Urq8ks08aDaNhNn0 2dksd3bHC82tpULoYMDK69+40qhu6HA= X-Google-Smtp-Source: AB8JxZqrOVSftrjaWiPhPpUrJU6Km61ZMUt8Gxji8TuWG7pRB8/UcB00JV7ztfYr+5aqz8W+2WUAyQ== X-Received: by 2002:adf:8b85:: with SMTP id o5-v6mr2309572wra.169.1525099378286; Mon, 30 Apr 2018 07:42:58 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id n79sm13132444wmi.20.2018.04.30.07.42.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:42:57 -0700 (PDT) From: luca.boccassi@gmail.com To: Anatoly Burakov Cc: dpdk stable Date: Mon, 30 Apr 2018 15:40:36 +0100 Message-Id: <20180430144223.18657-21-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430144223.18657-1-luca.boccassi@gmail.com> References: <20180430140606.4615-80-luca.boccassi@gmail.com> <20180430144223.18657-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'vfio: fix device hotplug when several devices per group' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:42:58 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From bd2058932c118996a702f683238e492236f44793 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Tue, 10 Apr 2018 11:23:30 +0100 Subject: [PATCH] vfio: fix device hotplug when several devices per group [ upstream commit 08a20b3d37e4e648e1b57b6df2dd05558a987965 ] We only need to perform DMA mapping for first device in first group. At the time of mapping, we haven't yet added the device into the group, so the count is expected to be zero. Fixes: 810bfa64c673 ("vfio: fix index for tracking devices in a group") Fixes: a9c349e3a100 ("vfio: fix device unplug when several devices per group") Fixes: 94c0776b1bad ("vfio: support hotplug") Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_vfio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c index 2421d513b..9e593184c 100644 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c @@ -332,7 +332,8 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr, * functionality. */ if (internal_config.process_type == RTE_PROC_PRIMARY && - vfio_cfg.vfio_active_groups == 1) { + vfio_cfg.vfio_active_groups == 1 && + vfio_group_device_count(vfio_group_fd) == 0) { /* select an IOMMU type which we will be using */ const struct vfio_iommu_type *t = vfio_set_iommu_type(vfio_cfg.vfio_container_fd); -- 2.14.2