From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f45.google.com (mail-vk0-f45.google.com [209.85.213.45]) by dpdk.org (Postfix) with ESMTP id ED2A42C01 for ; Wed, 26 Apr 2017 12:24:24 +0200 (CEST) Received: by mail-vk0-f45.google.com with SMTP id 198so47660936vkk.2 for ; Wed, 26 Apr 2017 03:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FDIkAtgVMqo4LkQkk83BAFweeaqephiw4FdyPNFUME0=; b=vDGmviz5cFewFKkk48YI0UOJ4gSikFexpL1GnYqf1uHgkUE0zzwGY/rFC4kVWFNKEm y0C8qPjX/j1yLJQW0kgJTqejBXKKzlHiRWERjw1gN1ZET2PMpVdkUhBuc5Lv1k44V6Dh 7ZFunG9iKoprzsxOTg6bdNecM18BPq8StWgjQo1jBciY0FKe6vt4Bu6GrgWMB2aaHgJC K1x247tPdMXDi/Tt9IKyO0oAGa+Mnn3b1iFig0DWHeaPC8p/9DeUwJlFnijw5KJ7Q189 gCtcmMwzh5c1I+/opW2zTxcgZ+PPHh3fEmTv1/EPDsGX7LAPLG8IHjfk04zZUWaFFBcb mhoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FDIkAtgVMqo4LkQkk83BAFweeaqephiw4FdyPNFUME0=; b=TZGW4GmtKBC4GzIL3qo9G10QvwdRCV5vlIzUqrCW7h7GNb2JbiR9fJEZQfRf9tIRZi 7crIlF0SAOdpFfFD/kGJjp0+PfBCRKDYqkJPfXiSJRrv/Ba00W721zEXGFus4NGWjb2i FfMZk5Wyw4maL3piL2D4IS09GDow/1yrt7iqDJ+yTxmT6AN01grs1+F2wx9jKb6FSheg bzKoJHjekztSf2ARCsgsVOQSRFma0bEMg7IQa72/GIpjsZWYgoQ9QDtYBNPz54UJtdRC EO2F+b5x/xb847E7ZTDZwtVpUm7zLedX1/Dl5NfQGeUXEVC0IPYHPGbHNWgQOxSqn4dp NqZQ== X-Gm-Message-State: AN3rC/62GYXeaXNO8BRaUosCagCOm4DaQM/UwYmzRW6qfm/0riQJuCuR tpS365Xq9JuXEozT4o9yQe33PqF6Aj0y X-Received: by 10.31.248.69 with SMTP id w66mr2212621vkh.70.1493202263571; Wed, 26 Apr 2017 03:24:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.14.69 with HTTP; Wed, 26 Apr 2017 03:24:22 -0700 (PDT) In-Reply-To: References: <20170420072402.38106-1-aik@ozlabs.ru> <20170420072402.38106-5-aik@ozlabs.ru> <5b5fe4e4-af39-4c27-fb3c-aff0c601b938@solarflare.com> <9808fd9e-17e5-b873-592a-2309579097dc@ozlabs.ru> From: Alejandro Lucero Date: Wed, 26 Apr 2017 11:24:22 +0100 Message-ID: To: "Burakov, Anatoly" Cc: Alexey Kardashevskiy , Andrew Rybchenko , "dev@dpdk.org" , "JPF@zurich.ibm.com" , Gowrishankar Muthukrishnan Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH dpdk 4/5] vfio: Do try setting IOMMU type if already set X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2017 10:24:25 -0000 On Wed, Apr 26, 2017 at 9:58 AM, Burakov, Anatoly wrote: > Hi Alejandro, > > > I was counting on first submitted patch being accepted. > > OK, that's on me then. > > > There is another thing to solve which is to unplug ports when there are > more than one (already plugged) in an IOMMU group. I have a patch for this > but I can not test it for that scenario, just for the "normal" one with one > port/device per IOMMU group. > I'm working on having a way for testing the > first case. > > Have you tried older kernel versions yet? Those seem to work for me. > > I'm trying that one but run in some problems. Likely that is the quickest way although I'm thinking on adding some option to the kernel for people with such a hardware being able to test that option. > > The only problem is after that, none else device hotplug can happen. I > know that is not a good thing because it requires to restart the app, but > better than breaking the app with a crash. > > Presumably, you're only talking about VFIO hotplug, and not hotplug in > general? Is there anything that can be done to fix this issue in the long > run? > > Yes, just talking about VFIO. I think that patch I have should solve the issue. It is just a matter of tracking how many devices are in use on a vfio group, so just adding a new field to struct vfio_group and checking number of devices when unplugging should be enough. Just when is the only device plugged should close the vfio group. > Thanks, > Anatoly > >