From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v10 03/19] bus/pci: enable vfio unmap resource for secondary Date: Mon, 9 Jul 2018 15:37:37 +0100 Message-ID: <87395ae9-7ebe-3cf3-8042-6360ad428097@intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180709033706.27858-1-qi.z.zhang@intel.com> <20180709033706.27858-4-qi.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, benjamin.h.shelton@intel.com, narender.vangati@intel.com To: Qi Zhang , thomas@monjalon.net Return-path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 03EA81B3A3 for ; Mon, 9 Jul 2018 16:37:43 +0200 (CEST) In-Reply-To: <20180709033706.27858-4-qi.z.zhang@intel.com> Content-Language: en-US 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 09-Jul-18 4:36 AM, Qi Zhang wrote: > Subroutine to unmap VFIO resource is shared by secondary and > primary, and it does not work on the secondary process. > The patch adds a dedicate function to handle the situation > when a device is unmapped on a secondary process. > > Signed-off-by: Qi Zhang > --- Hi Qi, Please correct me if i'm wrong here, but it seems like the unmapping code is shared between primary and secondary, and the difference comes from interrupts, bus mastering, and removing the device from tailq. Can we separate out the common code somehow? -- Thanks, Anatoly