From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF2D2A328D for ; Wed, 23 Oct 2019 07:00:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C76CF1BF60; Wed, 23 Oct 2019 07:00:04 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 52E461BF60 for ; Wed, 23 Oct 2019 07:00:02 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 22:00:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,219,1569308400"; d="scan'208";a="209841809" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.74]) by fmsmga001.fm.intel.com with ESMTP; 22 Oct 2019 22:00:00 -0700 Date: Wed, 23 Oct 2019 12:56:54 +0800 From: Tiwei Bie To: David Marchand Cc: dev@dpdk.org, maxime.coquelin@redhat.com, Zhihong Wang Message-ID: <20191023045653.GA24135@___> References: <1571313388-32142-1-git-send-email-david.marchand@redhat.com> <1571732503-30424-1-git-send-email-david.marchand@redhat.com> <1571732503-30424-3-git-send-email-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1571732503-30424-3-git-send-email-david.marchand@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v3 2/2] net/virtio: do not require IO permissions 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Oct 22, 2019 at 10:21:43AM +0200, David Marchand wrote: > On x86, iopl permissions are only available to root user (or users that > have the CAP_SYS_RAWIO capability). > But those permissions are only needed when the virtio devices accesses > are done with inb/outb instructions, which is when the device is bound > to a UIO kernel module. > > So far, the virtio driver was refusing to register based on the check > on IO permissions. > This check does not make sense when binding the device to vfio. > > Now that the check on IO permissions has been abstracted in the ioport > API, we can remove it on virtio side. > > We still need to call rte_eal_iopl_init() in the virtio constructor so > that the interrupt thread inherits this permission in the case it could > be used with UIO later. > > Signed-off-by: David Marchand > Reviewed-by: Maxime Coquelin > --- Acked-by: Tiwei Bie Thanks, Tiwei