From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alejandro Lucero Subject: Re: [PATCH dpdk 4/5] vfio: Do try setting IOMMU type if already set Date: Wed, 26 Apr 2017 11:24:22 +0100 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Alexey Kardashevskiy , Andrew Rybchenko , "dev@dpdk.org" , "JPF@zurich.ibm.com" , Gowrishankar Muthukrishnan To: "Burakov, Anatoly" 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) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > >