From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 0BE2DA3201
	for <public@inbox.dpdk.org>; Sun, 20 Oct 2019 14:30:28 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id A12784CA7;
	Sun, 20 Oct 2019 14:30:22 +0200 (CEST)
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
 [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 1A43A4CA7
 for <dev@dpdk.org>; Sun, 20 Oct 2019 14:30:21 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1571574620;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=1N3JmCbOE4E54MZNvrKH6tj80dBz665RJf3oiCDazjI=;
 b=fqVGmyMj1qjeAAwlUKYrfv03egAmN1GLJrFHEsZu2jSTdpcstO/dYxFJ68NRQT/I6KF8wj
 urFlloJpN54AK7g1ex0hmVymPAdmK/EzTFDCR6jYEjh3G4TpVHdRckVRXS1XQb+yqLY9Ne
 NlZs2dsyncJ//ZR/BlKVYkCU/ZdgL/k=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-282-Mt1Mg_E3MK6JASt6PYNfSA-1; Sun, 20 Oct 2019 08:30:12 -0400
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com
 [10.5.11.14])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C5FC9800D49
 for <dev@dpdk.org>; Sun, 20 Oct 2019 12:30:11 +0000 (UTC)
Received: from dmarchan.remote.csb (ovpn-204-16.brq.redhat.com [10.40.204.16])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 2B5035D9C9
 for <dev@dpdk.org>; Sun, 20 Oct 2019 12:30:10 +0000 (UTC)
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Date: Sun, 20 Oct 2019 14:29:57 +0200
Message-Id: <1571574599-25022-1-git-send-email-david.marchand@redhat.com>
In-Reply-To: <1571313388-32142-1-git-send-email-david.marchand@redhat.com>
References: <1571313388-32142-1-git-send-email-david.marchand@redhat.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
X-MC-Unique: Mt1Mg_E3MK6JASt6PYNfSA-1
X-Mimecast-Spam-Score: 0
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
Subject: [dpdk-dev] [PATCH v2 0/2] Using virtio ethdev ports as non-root
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Here are two little changes to be able to run testpmd as non-root with
virtio ports in a guest.
This requires a functional vIOMMU (the main pain parts being writing a
Q35 machine configuration in qemu for x86 guests).

No major change since the RFC, I just did not find the time to describe
the full setup (Q35 x86 machine config + permissions on /dev/hugepages
and /dev/vfio in the guest + ulimit -l unlimited).

--=20
David Marchand

David Marchand (2):
  bus/pci: check IO permissions for UIO only
  net/virtio: do not require IO permissions

 drivers/bus/pci/bsd/pci.c          |  5 +++++
 drivers/bus/pci/linux/pci.c        | 10 ++++++++++
 drivers/net/virtio/virtio_ethdev.c |  5 -----
 3 files changed, 15 insertions(+), 5 deletions(-)

--=20
1.8.3.1