From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5C1688032 for ; Thu, 4 Dec 2014 14:13:29 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 04 Dec 2014 05:12:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,515,1413270000"; d="scan'208";a="618554618" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by orsmga001.jf.intel.com with ESMTP; 04 Dec 2014 05:13:27 -0800 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.244]) by IRSMSX107.ger.corp.intel.com ([163.33.3.99]) with mapi id 14.03.0195.001; Thu, 4 Dec 2014 13:13:26 +0000 From: "Burakov, Anatoly" To: Michael Qiu , "dev@dpdk.org" Thread-Topic: [PATCH] VFIO: Avoid to enable vfio while the module not loaded Thread-Index: AQHQD8G6joBiQX7ljU2i8wFFmoFrF5x/ZKcw Date: Thu, 4 Dec 2014 13:13:26 +0000 Message-ID: References: <1417664219-19679-1-git-send-email-michael.qiu@intel.com> In-Reply-To: <1417664219-19679-1-git-send-email-michael.qiu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] VFIO: Avoid to enable vfio while the module not loaded 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: Thu, 04 Dec 2014 13:13:29 -0000 Hi Michael > When vfio module is not loaded when kernel support vfio feature, the > routine still try to open the container to get file description. >=20 > This action is not safe, and of cause got error messages: >=20 > EAL: Detected 40 lcore(s) > EAL: unsupported IOMMU type! > EAL: VFIO support could not be initialized > EAL: Setting up memory... >=20 > This may make user confuse, this patch make it reasonable and much more > soomth to user. Not sure I agree with the premise of this patch. First of all, if VFIO driver is not enabled, the container file would not b= e present and you would get a different error (namely, "cannot open VFIO co= ntainer", in pci_vfio_get_container_fd()). If you have a container file, t= hat means VFIO driver is loaded, so I'm not sure why you get the "unsupport= ed IOMMU type" error. I suppose it could happen when vfio is loaded but vfi= o_iommu_type1 isn't? And even then, this error is harmless and doesn't do anything, so I'm not s= ure what this patch is supposed to fix. The error messages tells the user e= xactly what happens. =20 Thanks, Anatoly=20