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 2790F58D3 for ; Tue, 17 Jun 2014 10:58:28 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 17 Jun 2014 01:58:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,492,1400050800"; d="scan'208";a="549088603" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga001.fm.intel.com with ESMTP; 17 Jun 2014 01:56:04 -0700 Received: from irsmsx105.ger.corp.intel.com (163.33.3.28) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 17 Jun 2014 09:56:03 +0100 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.245]) by IRSMSX105.ger.corp.intel.com ([169.254.7.239]) with mapi id 14.03.0123.003; Tue, 17 Jun 2014 09:56:03 +0100 From: "Burakov, Anatoly" To: "Richardson, Bruce" , "dev@dpdk.org" Thread-Topic: [PATCH] vfio: make container open error non-fatal Thread-Index: AQHPibK/3fbIS4BKkkShRtHPQ1BE5Jt0/ZeAgAACKUA= Date: Tue, 17 Jun 2014 08:56:02 +0000 Message-ID: References: <1402957745-31967-1-git-send-email-bruce.richardson@intel.com> <59AF69C657FD0841A61C55336867B5B01AA36B94@IRSMSX103.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] vfio: make container open error non-fatal X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 08:58:29 -0000 Hi Bruce, > Hi Bruce, >=20 > > The below patch is the quickest fix I found to make my applications > > work again, but I'm not sure it's the best solution. Can anyone else > > offer other suggestions to improve this? >=20 > Are you running things as root? If not, I suggest to try and use the setu= p.sh > script to correct permissions on the VFIO container and see if it works. >=20 > The inability of opening a container is likely a problem with permissions= on > the container, and thus should be considered fatal as far as VFIO is > concerned. However, given that we try to use VFIO unconditionally, I thin= k > your suggestion is a good solution to the problem, however I would also > close the group fd's that were already opened before returning 1. On a second thought, I think this may be better solved by checking access()= on the container. Right now I think PCI init checks for access on /dev/vfi= o (the VFIO dir) but not /dev/vfio/vfio (the container). I will prepare a p= atch shortly, so I would appreciate if you self-NAKed yours :-) Best regards, Anatoly Burakov DPDK SW Engineer