From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7D6D61B7AE; Fri, 13 Oct 2017 22:54:58 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2017 13:54:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,372,1503385200"; d="scan'208";a="909758554" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.224.248]) ([10.241.224.248]) by FMSMGA003.fm.intel.com with ESMTP; 13 Oct 2017 13:54:57 -0700 To: Jingjing Wu , jianfeng.tan@intel.com, shijith.thotton@caviumnetworks.com, gregory@weka.io, beilei.xing@intel.com Cc: dev@dpdk.org, stable@dpdk.org References: <1507581083-33667-1-git-send-email-jingjing.wu@intel.com> <1507581083-33667-2-git-send-email-jingjing.wu@intel.com> From: Ferruh Yigit Message-ID: <95051c86-9088-19a7-99f8-27eb1d8b525c@intel.com> Date: Fri, 13 Oct 2017 21:54:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1507581083-33667-2-git-send-email-jingjing.wu@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 2/2] igb_uio: fix interrupt enablement after FLR in VM 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: Fri, 13 Oct 2017 20:54:59 -0000 On 10/9/2017 9:31 PM, Jingjing Wu wrote: > If pass-through a VF by vfio-pci to a Qemu VM, after FLR > in VM, the interrupt setting is not recoverd correctly > to host as below: > in VM guest: > Capabilities: [70] MSI-X: Enable+ Count=5 Masked- > in Host: > Capabilities: [70] MSI-X: Enable+ Count=5 Masked- > > That was because in pci_reset_function, it first reads the > PCI configure and set FLR reset, and then writes PCI configure > as restoration. But not all the writing are successful to Host. > Becuase vfio-pci driver doesn't allow directly write PCI MSI-X > Cap. > > To fix this issue, we need to move the interrupt enablement from > igb_uio probe to open device file. While is also the similar as > the behaviour in vfio_pci kernel module code. So I guess this also explains why pci_reset in open() cause the problem, when this is called for VF, interrupts stays disable for both VF and PF? > > Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file") > > Cc: stable@dpdk.org > > Signed-off-by: Jingjing Wu > Signed-off-by: Jianfeng Tan Acked-by: Ferruh Yigit We have two options, getting this patch or revert the original patch, Thomas already has a patch for reverting. The original patch is to make igb_uio safer. To not leave device in unwanted stated. Problem related to this has been reported a few times, I believe it is good to fix this problem. And since we already have some movement towards fix, I say lets continue instead of revert. Only problem is the scope of the patch is wide, and in previous release it already break some uses cases, this is a little scary, please support on testing this more. I suggest getting this fix for rc1 and let it to be tested properly, and if we hit some problem, we can always revert and work on problem for next release. Thanks, ferruh