From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7BB428032 for ; Thu, 4 Dec 2014 14:12:34 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 04 Dec 2014 05:12:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,691,1406617200"; d="scan'208";a="493547061" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga003.jf.intel.com with ESMTP; 04 Dec 2014 05:09:11 -0800 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.244]) by IRSMSX110.ger.corp.intel.com ([169.254.15.55]) with mapi id 14.03.0195.001; Thu, 4 Dec 2014 13:12:31 +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:12:30 +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.182] 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:12:34 -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