From patchwork Fri Jun 24 13:19:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 113443 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3966AA0032; Fri, 24 Jun 2022 15:20:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EEF0415D7; Fri, 24 Jun 2022 15:20:07 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2052.outbound.protection.outlook.com [40.107.96.52]) by mails.dpdk.org (Postfix) with ESMTP id BDFC440A8A for ; Fri, 24 Jun 2022 15:20:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V1NB6xPxXn/ujrUkEhIQGMu4uVbZSIOmjYstauzfT5yW7FSbmrXCSNHMTkGY7o5SAzpFqEMvirFT/ZZVcnMRRWEf1GDBVQmPnl5D4QDhuqw29ABKlAFPSc+rKELkkEJRP2/OXZ4EwwMkxMOh81qQ4/QxUKFFpnHxjinz8+fer6yc+wKddAEoMGUlqDje/44bBDD3bWWzd80B81cTQTSg5uOD2JVx8sJfbcDwlzu2h45P+APHLzBT7Yj9f2gmZHalVBfH+iyptbtHsSbW9g30OJ1bMh2273pKu1JBgFukXVv8mWXDHRuu2F884OoWsLvOOHTJenkRa43PnpJcPePAAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LLYc4IWbaD1fiFDjC7/PpQ++SpM8L5XUuShx0gIocrw=; b=enLhqkOHJh/HdJREpORNflo6y2qPomQ5qNdfBmyyWFtIUcF1eJ9OYB2PrMiSHaLoQ17JiVJK4uKsWI2JwIs92SEPRNRgZ/RM0++pEla9+UmZsw1MzY3jpoMCorjPirqds11ocBTwCWrXLTu8qhI338LCHtpUb0F8L4mc+GxcJlRdV6msbTWuxZqKXaik5717FFWjrnhwk925Y/bs5r0P3uE5GOinkbGuGYj87ivjHbkU9mi7Jnfy+YnEUlinK43idsVjvPgg1HK0D4eyog9m7z3XcfHYUb/CtWtW0fsj0x7GBPLa+5/rj0ggoguXDMB1aeLZw/xKo5jLoKmKjBCxFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LLYc4IWbaD1fiFDjC7/PpQ++SpM8L5XUuShx0gIocrw=; b=KAwTAYvCoEPyZKhep1fUYbm3p8KLpm/PTwruRqh/2wUDl0/UQmmkdiISS3Z1fzSqzFBfbQ9vHn++GyAZCbjolr1kHuCdP1vUw3Z6wBSlfpO7j2uj/yQrMk/ay7ZcUC9WEUvrxVZdEaU7Migy+RUjanfgeTGEiklJyKWHPGhkxG0wkIAaswKhPcLQdsw+cBoGd9ABKmxb973h9iMJfhUbmXMUnCu3pgsnOg/nZmdjkVwMsnbYTkriQO+ZR+PceUrJaSuIoieKWPNu3VYbpSno2p7DknBAxXSEiiBv2xXAuNm1kubgsE9Vg0wfAzzUKQp/A1FuGR/woXJquBCA4uVmsQ== Received: from DM6PR12CA0035.namprd12.prod.outlook.com (2603:10b6:5:1c0::48) by BYAPR12MB2903.namprd12.prod.outlook.com (2603:10b6:a03:139::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Fri, 24 Jun 2022 13:20:02 +0000 Received: from DM6NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1c0:cafe::28) by DM6PR12CA0035.outlook.office365.com (2603:10b6:5:1c0::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17 via Frontend Transport; Fri, 24 Jun 2022 13:20:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by DM6NAM11FT019.mail.protection.outlook.com (10.13.172.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 13:20:02 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 24 Jun 2022 13:20:01 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 24 Jun 2022 06:20:01 -0700 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 24 Jun 2022 06:20:00 -0700 From: Dmitry Kozlyuk To: CC: Bruce Richardson Subject: [PATCH v4 1/5] usertools: add option to select hugetlbfs directory Date: Fri, 24 Jun 2022 16:19:52 +0300 Message-ID: <20220624131956.75160-2-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220624131956.75160-1-dkozlyuk@nvidia.com> References: <20220624084817.63145-1-dkozlyuk@nvidia.com> <20220624131956.75160-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 795bd794-f2bd-4aa0-8a05-08da55e43ee8 X-MS-TrafficTypeDiagnostic: BYAPR12MB2903:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9Ud94Apyi80m+2F/R+jONnNaDehjewObWm1T6bsO/CbJfHE05Fdi1IJQPYnPQpEqV6AkfZofKv5XkVoq1Yygmo+GCIveIfEB6AXvGQ65n4Gd5ui/i4/2IUnz85kJ49FarFUSClW6S8qSiYW41DQOeUDyTyGOUki8fRZb2K1JJxZNaz71wm+ZK0tDlNg7Ke08cwCwLgYPpKSBUnImPuWYmm+ENWE/AyYAHnhqL++3IydvmThaPRkOUWR7DdtJ4ebpxEMlghU3mrpXUV5t5tKJyclDoEXAtCYHRJGBewTqI6iZRP71GwYkcScoNl0DjNKLZPZeRxifsXWgGxqwbpcnAypoNoI70Nj76swOTukzMg8Fr22gfg6QKfl2GDi2MGxf4XgBRB0Vf4RpELa0lSOG0cyX1LZ9P/0MAKAiGeYeczsY4tRAIUgyYr/l0diNDKsqWp0UN2rQjA/8DAFnZkAPGU+/aFQWrHj6agKTZZlQmHx/E2QIyhL3cLAyhmKy+OzZyZyEJjcuoGcN3z9Yhw6FOcx2hQxmf10yn00LJMiIcjUW4FC0fax+yuBAgkz3yo22rAq1lVkut6f8ME5rRMIYx3fbIifE8PF472AAoDhONIyYZehYf0RnoQ8sKHg2XfKyLZV9Kehw6LlJZHIs+Ueu/rqOXAminhmiFYXBM/ILGY+emcn1lwa918bZyzTQYFyT6Qru/WOLBrLrqKJX0Zop44G28nv5EUMWn50Ipw8a09sy1+a9/VgUtGM0ag1PrR+39cpYoSWIxBuWgU+9+K9o8JKiYlFrfvay7rmm1UaP2Klw5Adch4TDKoVhH9IY7oIJUaUW/9lYG1zL0LdoM0HXpg== X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(136003)(39860400002)(396003)(346002)(46966006)(40470700004)(36840700001)(336012)(186003)(26005)(478600001)(41300700001)(2616005)(82740400003)(47076005)(1076003)(36860700001)(426003)(316002)(356005)(83380400001)(6286002)(7696005)(6666004)(81166007)(36756003)(86362001)(4326008)(2906002)(40480700001)(70206006)(6916009)(70586007)(8936002)(82310400005)(55016003)(5660300002)(8676002)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2022 13:20:02.1428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 795bd794-f2bd-4aa0-8a05-08da55e43ee8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2903 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org dpdk-hugepages.py had /dev/hugepages hardcoded as the mount point. It may be desirable to setup hugepage directory at another path, for example, when using hugepages of multiple sizes in different directories or when granting different permissions to mount points. Add --directory/-d option to the script. Signed-off-by: Dmitry Kozlyuk Acked-by: Bruce Richardson --- usertools/dpdk-hugepages.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usertools/dpdk-hugepages.py b/usertools/dpdk-hugepages.py index 4fdb199744..8bab086a2f 100755 --- a/usertools/dpdk-hugepages.py +++ b/usertools/dpdk-hugepages.py @@ -228,6 +228,12 @@ def main(): '-u', action='store_true', help='unmount the system huge page directory') + parser.add_argument( + '--directory', + '-d', + metavar='DIR', + default=HUGE_MOUNT, + help='mount point') parser.add_argument( '--node', '-n', help='select numa node to reserve pages on') parser.add_argument( @@ -262,7 +268,7 @@ def main(): if args.clear: clear_pages() if args.unmount: - umount_huge(HUGE_MOUNT) + umount_huge(args.directory) if args.reserve: reserve_kb = get_memsize(args.reserve) @@ -273,7 +279,7 @@ def main(): reserve_pages( int(reserve_kb / pagesize_kb), pagesize_kb, node=args.node) if args.mount: - mount_huge(pagesize_kb, HUGE_MOUNT) + mount_huge(pagesize_kb, args.directory) if args.show: show_pages() print() From patchwork Fri Jun 24 13:19:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 113444 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 633C0A0032; Fri, 24 Jun 2022 15:20:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1415F42802; Fri, 24 Jun 2022 15:20:11 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2085.outbound.protection.outlook.com [40.107.94.85]) by mails.dpdk.org (Postfix) with ESMTP id E86A0400EF for ; Fri, 24 Jun 2022 15:20:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A5UDpPxKHmXCOU8FCK8Vh8kO3Wdy2LCTp6LtQgy7wK0rbZsfZxfWcIoYgg5sj8pjngHlY8vtWTAq2aVA35fo2y85L0XS7J1y4/3zKI5NbNZXrmqj73NsQJREEQiL1GedZZA7jxIPSNvjScZhWTkh/vNHW5Xzy8+pkY1mwEHtfKMwwEq2YTHvhADgxE8ODSp60995wv2JuLN34Qp7dswDyhNk+3hXQHrS+LtjgovqjbjXi12ZcBXJqioyOHrxT0VlEfkkniHnxYbuQoyOkV85cXo7O8zZtHxdRGLBY++Vqc7CiaisaRclD5wrm/AStV5mr80vqxW7Ky0tPfdJW0+zgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ESzomx/j21N405TFIsotT5TRyOLIxOMm8pFdZe8anKM=; b=PcQ0R8+wwXHoro6B9HL+Do8gYYqthhWZQfulFNXHNfgHd1c6SZZi895nJObZSN4lir2CvMfJERX3Ua8CBkt0QH70IwqxHq3EjZsYamUH5wgR/ys5vg937UfE1BUx0mqK1GUG6m10/h+qGQNcnUkSjZFJ+CcdanQVq7jXsNJRuOhWHISl6yBRwZpikeRSJl6gKYxpct51J+b/5mmBODZY5vxwvFiJYNlbuFXQ8Hu7c/HkNdTBjEUqYQ1XwB5iUhJliAldHXQ1v7/MDtnIqFi93KRETleFm2MhxgX0lcBTZx2vybjejuddWCe0ynS493E/TUmr/VmmDheAcdz59axnng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ESzomx/j21N405TFIsotT5TRyOLIxOMm8pFdZe8anKM=; b=ZlsgRzkzNKRTHWCa/QYKIfhjUXRYzc3dGcC9FVMacnLkO4NTmrs3QElgC2n/MlSoVadUSxMpNUotUmGqMz2x2ykUTNFJZyogQQ7jSmBcrCg92HvkcK+jjsPijnJ94LADVTbZMJEkJo48bUe3tV2jYQ7ZM6nwyVQvOIgg/L8FvfAvJL0qAm9du5W0lURWU9wAg5bhOHd+FYbZaQCDRpfd5k9jCyOhbPr4XfeN2Rh3UCcmI2BCkA80fmNkSxX7j6NbhGMlpVXkvLKlFb4xencEC0Co9d9R+XBJje32Dab6dPQDUSLkcLNZCY0/szdg55pRAkWF9cEFj7sxH4VuVcPSGg== Received: from MW4PR04CA0305.namprd04.prod.outlook.com (2603:10b6:303:82::10) by DM6PR12MB3675.namprd12.prod.outlook.com (2603:10b6:5:14a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.19; Fri, 24 Jun 2022 13:20:05 +0000 Received: from CO1NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:303:82:cafe::1d) by MW4PR04CA0305.outlook.office365.com (2603:10b6:303:82::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 13:20:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by CO1NAM11FT009.mail.protection.outlook.com (10.13.175.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 13:20:04 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 24 Jun 2022 13:20:03 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 24 Jun 2022 06:20:02 -0700 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 24 Jun 2022 06:20:01 -0700 From: Dmitry Kozlyuk To: CC: Bruce Richardson Subject: [PATCH v4 2/5] usertools: add options to change mount point owner Date: Fri, 24 Jun 2022 16:19:53 +0300 Message-ID: <20220624131956.75160-3-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220624131956.75160-1-dkozlyuk@nvidia.com> References: <20220624084817.63145-1-dkozlyuk@nvidia.com> <20220624131956.75160-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 233ea56e-7219-42f6-13e4-08da55e44088 X-MS-TrafficTypeDiagnostic: DM6PR12MB3675:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3psajw68v/sW/MX6cpUqNWMsLtZHU08mpHqIImBH49ayaweFzky3RfvXrC9pQbtoVsTyiEKDdm+F7FaEX7lFrS0BbRqtiDErRIFuNY7RGDCM9sd/33/LbgFhVwPeBXKiDmlfO2ZFC2Kx/PLSUqgagMpqE/B1oAVCvRJGvlP0nNVf7xU9ov0K1rDI8oWNanxGkDzUrl67+KcfVryq/cGiH1ekdaHGI1WvSHliEIKwh58Pm0zLVWR3rW9ILM0NJ3zCYTvbvi4ydcO17YICT270HdEfuzlB4mGW0fMOzIpmc3ODMmNWor1ihrv6eZmHSQqCy3vXWBDdmIqrKDwHpFwg8IH0fBIIQUgvcaQv8GS/8i2wWXPjlhgDUedAczqRLnqgdJUnAVkqXriVuXnJmok3V0TjP0d3eDqR9UBAU+nXJHGK8VIs7nDICYNrH9q9dn9SQfD1XDokf8CRUH+a5Mpw1Z8kLrBJ94YE1ZKcR/Z83I3qNw08YVpqjI6RxM7yMszh9V8hpkB9IwiRnR400qFJoHi46Kpnlx99aLiayzy6cgoTnjdXqINfuB24tag2gIErVtxzOJCdPAZHXaF3no6fkbilRu4/oYSaJm0MZXEMlo0VE5/UCVw29M7FZu+zHP2Ha0/sCr+dVs27XJFL8VAgUT88xFu32f1WzT15IKZ4nKOwF/lHdzp4zwjDkvBzI6yGVlOdaSs4VX/yd8rGjOj6yEB81pEsiyh53u7IeeJHbyTYM5+X07wDHTDA7/75D6Eay3IUIykC+AV6uYNiRIF8gXq+12w9TG25kfRIAXDH2mh5c6NXe20gEubjXnwsWX1NQInQIbyLZsU1rWWHqLWk6w== X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(396003)(39860400002)(376002)(346002)(46966006)(36840700001)(40470700004)(86362001)(316002)(40480700001)(2616005)(426003)(478600001)(36860700001)(83380400001)(41300700001)(82740400003)(6916009)(1076003)(26005)(5660300002)(70206006)(356005)(8676002)(70586007)(336012)(8936002)(186003)(7696005)(82310400005)(81166007)(2906002)(55016003)(40460700003)(4326008)(6286002)(6666004)(36756003)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2022 13:20:04.8817 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 233ea56e-7219-42f6-13e4-08da55e44088 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3675 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Per mount(8), the previous owner and mode of the mount point become invisible as long as this filesystem remains mounted. Because dpdk-hugepages.py must be run as root, the new owner would be root. This is undesirable if the hugepage directory is being set up by the administrator for an unprivileged user. HugeTLB filesystem has options to set the mount point owner. Add --user/-U and --group/-G options to apply this when mounting. The benefit of performing this in dpdk-hugepages.py is that the user does not need to care about this detail of mount command operation. Signed-off-by: Dmitry Kozlyuk Acked-by: Bruce Richardson --- Option --unmount/-u was already taken. usertools/dpdk-hugepages.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/usertools/dpdk-hugepages.py b/usertools/dpdk-hugepages.py index 8bab086a2f..a22d504d3a 100755 --- a/usertools/dpdk-hugepages.py +++ b/usertools/dpdk-hugepages.py @@ -170,7 +170,7 @@ def get_mountpoints(): return mounted -def mount_huge(pagesize, mountpoint): +def mount_huge(pagesize, mountpoint, user, group): '''Mount the huge TLB file system''' if mountpoint in get_mountpoints(): print(mountpoint, "already mounted") @@ -178,6 +178,10 @@ def mount_huge(pagesize, mountpoint): cmd = "mount -t hugetlbfs" if pagesize: cmd += ' -o pagesize={}'.format(pagesize * 1024) + if user: + cmd += ' -o uid=' + user + if group: + cmd += ' -o gid=' + group cmd += ' nodev ' + mountpoint os.system(cmd) @@ -234,6 +238,16 @@ def main(): metavar='DIR', default=HUGE_MOUNT, help='mount point') + parser.add_argument( + '--user', + '-U', + metavar='UID', + help='set the mounted directory owner user') + parser.add_argument( + '--group', + '-G', + metavar='GID', + help='set the mounted directory owner group') parser.add_argument( '--node', '-n', help='select numa node to reserve pages on') parser.add_argument( @@ -279,7 +293,7 @@ def main(): reserve_pages( int(reserve_kb / pagesize_kb), pagesize_kb, node=args.node) if args.mount: - mount_huge(pagesize_kb, args.directory) + mount_huge(pagesize_kb, args.directory, args.user, args.group) if args.show: show_pages() print() From patchwork Fri Jun 24 13:19:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 113445 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88BDDA0032; Fri, 24 Jun 2022 15:20:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E53364281A; Fri, 24 Jun 2022 15:20:11 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 751B3427FF; Fri, 24 Jun 2022 15:20:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S8ry3pkyG94axVbYg8u+du2iSCaWT/EYoWozGO3PkAv4cXOnbwQ20y1Ea/TN4sIXulyJmcnaGZBTDSHy8M1NhFRaHqPVkDkxHx3J6x+bFbbISFXLkJAXEEy74tm85c6jaY7LGi/G+3kYsuDzKfswvMxbyu6SB0HOrY7QwiCaGiev6jbyjDh5PWYNMXbKljnqCcKAqp++B61aWByXGV69SbHyHEJ4At+G3Wzg+FeJfITXk/7l2g7LMBhuR3mvGkXTfu8DkZvgQBgEqUZQXqcVJ4KmELr+FoluzUmGYYnmVVOrR0QTBg03SoJxnDYOk4ElsHJJ1p7rPiHgS7LvilVOFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U4msrMAQU92meE/sFeXI/O5QCaosiY3t88aWFdFbG6c=; b=MZblL+gQ8Ow4fPsUUdbs/zjJ2QOoIpzgTLTyw54+nBC4BkJvEJUbMUP1PSPQ4oPIX5Yz2+WLEd5BAVnn0ww10tVFKDFhq0C9+7GCItEUx9Qh8LTFzFHLehdquspsSOuCcdEr8O5XpujQ3o1IU4lFopF1qlqZIkaWXCHFB7/CckWIG0as+aBw20rpixG1kDLjrAHUtpEU8frP8gQwJxkAoiiPm5yrQm2q2OzX60Oq9uzLnZocDZjxwgteb6XZSFcU2EydPEu6FXtjEjqJQC/F1CjNKq2je9CkFwzQpalnA+fG90UOMbuoVHcfLHynH+QIe1jLkJPoyKfPoyvil/jEfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U4msrMAQU92meE/sFeXI/O5QCaosiY3t88aWFdFbG6c=; b=KY+rC6S0cZUBFiLsZt3wV4KeyNdhdFJyGQEchz71DcMEoXvj/rCygSJy9FFdv14eSSocQxpspmSATHU9LzzO1y88NNVP8NvVaZ3uWeW9XbrsFPt8iS8StGhJfmer411qGgPUn6tvsxtjYWi9CiXClyrbUDSl13htSYgvuf4E2nECopTUt4KRWCm+jEjtNhkwduJlyGgcyZV1YuE9rBhLxgA/SZEMkEYZyOnoeHHlwlQxnZB9c2djRCpIVkjb9eHGf/vy6eoKjdpgV6JgcLWetFPukflcD76nr30/Ab2y/efY3HmiYT+T9kp6v6ZJAAOrF9+202M4Ozaz9teB+i2KSQ== Received: from BN6PR19CA0061.namprd19.prod.outlook.com (2603:10b6:404:e3::23) by DM6PR12MB4811.namprd12.prod.outlook.com (2603:10b6:5:1fb::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.19; Fri, 24 Jun 2022 13:20:06 +0000 Received: from BN8NAM11FT048.eop-nam11.prod.protection.outlook.com (2603:10b6:404:e3:cafe::47) by BN6PR19CA0061.outlook.office365.com (2603:10b6:404:e3::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17 via Frontend Transport; Fri, 24 Jun 2022 13:20:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by BN8NAM11FT048.mail.protection.outlook.com (10.13.177.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 13:20:06 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 24 Jun 2022 13:20:04 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 24 Jun 2022 06:20:04 -0700 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 24 Jun 2022 06:20:03 -0700 From: Dmitry Kozlyuk To: CC: , Bruce Richardson , "Anatoly Burakov" Subject: [PATCH v4 3/5] doc: give specific instructions for running as non-root Date: Fri, 24 Jun 2022 16:19:54 +0300 Message-ID: <20220624131956.75160-4-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220624131956.75160-1-dkozlyuk@nvidia.com> References: <20220624084817.63145-1-dkozlyuk@nvidia.com> <20220624131956.75160-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 17599129-e2f5-478e-a897-08da55e44174 X-MS-TrafficTypeDiagnostic: DM6PR12MB4811:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GyfvHAn/ohSCi8VPMEse/DHxq+2RKlq9FtldjWWu+CkEAKi9zMwvU5N5zkcn/AZKCs0gOcTJUY8FVOR7h+7AoKreUyKd9EQDL/IushLh9tXpR5alpe8sfvdB9VfRvg6eRooKotbo9GcrJLbeydkExMhsjn04XnUN9UAedTMhP0IOPRy5ecBPnxdlk9IVy6gOI5vuZ51brGWbASwyWHn1sMTXuhug5JvVdu0J7QZi5DhtzyfNVHpp7RqfFTffWccj9I3wot85Z5bXH14wcf7F3lf9SWffvhoC7Q60+S+m6JAfmy8yusfr/ODNmEGNAXwNah2p3Nf0Q9vxJrVH6HoJT0Sf7scVG18wJraMAUSBu25a3RNuAuxFjp06WGlCM+rvW90HIoSh7G6eOVVsS+ErWbifbyd/rSLoq0Wlftk4aCqxxdyQzsTam/opLpambgpfXCMJpCPP2lEqQH6BxQY8y2Q+GxDpqkQqiEjyt/JMnEpB/Ze7qbUFDCS0qLCPyYVf9EdiHIjh0FV0BJVUfTPgFsIgiH3y0+794cUTZiDZUudSnBwWRvtg4L4hPKrjqTcdBptnlme89/LGZpfqWifqEYD8ynhYSi0eQMKmG8Ov58TKAdGKKosO8LufiT1iKuL8a56+eC6JrUi2XmFV4/t3eHw1qZEBhe7MFVIo3vj45nZp03Xidz2z1xHiw/RJij3MNsbdBR5/9Xu1tkmvG8PBjYpIUSaiyPzSAVaS15KbnOR203wtsnz/TQBeVwO3sjKVvC5+BcBBZ/AeF7f03vcZ3jsr5/VC3kYhPm+xuRnLcHHBI9v0kLu1WrEOTGiWKT+66WBuDDJi/PttLc+D6NhXVvZyYiRsllRanBWHD5l7keVnK58Reu+yvv6B4ZWeE4HPMZwq8qiDDqLPVCnCqN9FhK0qja/rB67ns2BDqst3G0u7cRuVcvehZdHrKA0JzOysKiMfrfzUHAw1zbxBDeTbGQ== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(396003)(376002)(136003)(39860400002)(40470700004)(36840700001)(46966006)(2906002)(54906003)(83380400001)(82740400003)(81166007)(478600001)(40480700001)(86362001)(8676002)(36860700001)(7696005)(5660300002)(356005)(55016003)(70206006)(70586007)(8936002)(2616005)(47076005)(426003)(6286002)(6666004)(40460700003)(36756003)(186003)(4326008)(1076003)(336012)(26005)(82310400005)(41300700001)(6916009)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2022 13:20:06.3696 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 17599129-e2f5-478e-a897-08da55e44174 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT048.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4811 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The guide to run DPDK applications as non-root in Linux did not provide specific instructions to configure the required access and did not explain why each bit is needed. The latter is important because running as non-root is one of the ways to tighten security and grant minimal permissions. Cc: stable@dpdk.org Signed-off-by: Dmitry Kozlyuk Acked-by: Bruce Richardson --- doc/guides/linux_gsg/enable_func.rst | 90 +++++++++++++------ .../prog_guide/env_abstraction_layer.rst | 2 + 2 files changed, 65 insertions(+), 27 deletions(-) diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst index 1df3ab0255..b15bfb2f9f 100644 --- a/doc/guides/linux_gsg/enable_func.rst +++ b/doc/guides/linux_gsg/enable_func.rst @@ -13,13 +13,64 @@ Enabling Additional Functionality Running DPDK Applications Without Root Privileges ------------------------------------------------- -In order to run DPDK as non-root, the following Linux filesystem objects' -permissions should be adjusted to ensure that the Linux account being used to -run the DPDK application has access to them: +The following sections describe generic requirements and configuration +for running DPDK applications as non-root. +There may be additional requirements documented for some drivers. -* All directories which serve as hugepage mount points, for example, ``/dev/hugepages`` +Hugepages +~~~~~~~~~ -* If the HPET is to be used, ``/dev/hpet`` +Hugepages must be reserved as root before running the application as non-root, +for example:: + + sudo dpdk-hugepages.py --reserve 1G + +If multi-process is not required, running with ``--in-memory`` +bypasses the need to access hugepage mount point and files within it. +Otherwise, hugepage directory must be made accessible +for writing to the unprivileged user. +A good way for managing multiple applications using hugepages +is to mount the filesystem with group permissions +and add a supplementary group to each application or container. + +One option is to use the script provided by this project:: + + export HUGEDIR=$HOME/huge-1G + mkdir -p $HUGEDIR + sudo dpdk-hugepages.py --mount --directory $HUGEDIR --user `id -u` --group `id -g` + +In production environment, the OS can manage mount points +(`systemd example `_). + +The ``hugetlb`` filesystem has additional options to guarantee or limit +the amount of memory that is possible to allocate using the mount point. +Refer to the `documentation `_. + +.. note:: + + Using ``vfio-pci`` kernel driver, if applicable, can eliminate the need + for physical addresses and therefore eliminate the permission requirements + described below. + +If the driver requires using physical addresses (PA), +the executable file must be granted additional capabilities: + +* ``SYS_ADMIN`` to read ``/proc/self/pagemaps`` +* ``IPC_LOCK`` to lock hugepages in memory + +.. code-block:: console + + setcap cap_ipc_lock,cap_sys_admin+ep + +If physical addresses are not accessible, +the following message will appear during EAL initialization:: + + EAL: rte_mem_virt2phy(): cannot open /proc/self/pagemap: Permission denied + +It is harmless in case PA are not needed. + +Resource Limits +~~~~~~~~~~~~~~~ When running as non-root user, there may be some additional resource limits that are imposed by the system. Specifically, the following resource limits may @@ -34,8 +85,13 @@ need to be adjusted in order to ensure normal DPDK operation: The above limits can usually be adjusted by editing ``/etc/security/limits.conf`` file, and rebooting. -Additionally, depending on which kernel driver is in use, the relevant -resources also should be accessible by the user running the DPDK application. +See `Hugepage Mapping `_ +section to learn how these limits affect EAL. + +Device Control +~~~~~~~~~~~~~~ + +If the HPET is to be used, ``/dev/hpet`` permissions must be adjusted. For ``vfio-pci`` kernel driver, the following Linux file system objects' permissions should be adjusted: @@ -45,26 +101,6 @@ permissions should be adjusted: * The directories under ``/dev/vfio`` that correspond to IOMMU group numbers of devices intended to be used by DPDK, for example, ``/dev/vfio/50`` -.. note:: - - The instructions below will allow running DPDK with ``igb_uio`` or - ``uio_pci_generic`` drivers as non-root with older Linux kernel versions. - However, since version 4.0, the kernel does not allow unprivileged processes - to read the physical address information from the pagemaps file, making it - impossible for those processes to be used by non-privileged users. In such - cases, using the VFIO driver is recommended. - -For ``igb_uio`` or ``uio_pci_generic`` kernel drivers, the following Linux file -system objects' permissions should be adjusted: - -* The userspace-io device files in ``/dev``, for example, ``/dev/uio0``, ``/dev/uio1``, and so on - -* The userspace-io sysfs config and resource files, for example for ``uio0``:: - - /sys/class/uio/uio0/device/config - /sys/class/uio/uio0/device/resource* - - Power Management and Power Saving Functionality ----------------------------------------------- diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst index 5f0748fba1..70fa099d30 100644 --- a/doc/guides/prog_guide/env_abstraction_layer.rst +++ b/doc/guides/prog_guide/env_abstraction_layer.rst @@ -228,6 +228,8 @@ Normally, these options do not need to be changed. can later be mapped into that preallocated VA space (if dynamic memory mode is enabled), and can optionally be mapped into it at startup. +.. _hugepage_mapping: + Hugepage Mapping ^^^^^^^^^^^^^^^^ From patchwork Fri Jun 24 13:19:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 113446 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8EEBCA0032; Fri, 24 Jun 2022 15:20:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9055442B6F; Fri, 24 Jun 2022 15:20:13 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2082.outbound.protection.outlook.com [40.107.223.82]) by mails.dpdk.org (Postfix) with ESMTP id 1D7E6427FF; Fri, 24 Jun 2022 15:20:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rwusw5A9LcNHszVXdwBoOpIBsIg/6WOT0f137QTGxx+OA728cL4SFa8fsyDRhA6lVtEU5flQ2A4iU6RMnslG6I4KBJTOfCZlCHYyut4xmF6mZskImDYfyE9kX97gqxCPHMt13okQ6bc1MPcsnJR7+SNRTqX1qYZQz2xWh/wCgdFDqYvSAdcFa/OdiPLcOCuaDrHmNifupXuekUWQf0fy/Tcc4DM6XAzueHy75tpAdaktWK6xktIPNTRMGKJqclSOVbE+IIbgh2SaDuv5T5r25oibQrAI9U5t76g7Wa3v3lpGPpLsZNVKazZpyp+rb4oFgXEKaOLSBdAIFn2j55+hrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3PZsvV8UxwsCCg8Cj9IG54/SfJSnJ2wFglvspkVHfQs=; b=XiQNb2HG5jPYTxN1KjRMDsoU52MRC7p3TANM0TVXJ2oZhC/2FEYiFJ4gopdWP25yOOHA70/HqgxZ6lf7DPKtdgfc88Dbu8x/F5f3LmbMi2oFm8wz2RHv9n+W9vZdTGQdoYLpOOZ7lnt4tOy6dJaBUZbogZHdPi8q7O0q/ocnLCgZUNi85I/e/Wsr+9/5voSje9YZNpfewncWSuOqtbsTHfs+jsA9xs7RGBlWRhdAXuZ/f9oJcL6NSey5ZedpdRJl3sRpmoGgCOaTgiiHlMNG7LZ38+S7zeuo/JpXP7wjERa03pxhneGEfUJgQ0ln/65DXbkQKOzdwOEswty2CsjYiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3PZsvV8UxwsCCg8Cj9IG54/SfJSnJ2wFglvspkVHfQs=; b=GVdG3qgF6ciSWFkEH51pDjcqsh99o+UFP6HjjujlY4rV+Qo/qGlKA7JCcCkhkO61VPxXpLMA4juvC1AUdJPaRDDO56Id++MXS2ZKpU48H7ctuCyG95qAwW0pZHCdTTMMdSu8Yz5Mwn29byWHCwd3mJlSUCLUrEbO2nJaFtMQbI5AZm0f/8tNumfBOaLLciunQeg4KSI4rwur4jpLolficVnHlpjy9yvH3H2T3f8qI+ZBDo23/bKGvY1j4xbfOZ6r4qr2HLTE8qtia9LvJPi1nLodUBfhL1hVV4Rc2U9PjbwcSXN+XO4TwPonxjywtFa8zTt5PSGU4VxW0HQzkoG++w== Received: from DS7PR05CA0096.namprd05.prod.outlook.com (2603:10b6:8:56::28) by MN2PR12MB3247.namprd12.prod.outlook.com (2603:10b6:208:ad::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.20; Fri, 24 Jun 2022 13:20:07 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:8:56:cafe::6c) by DS7PR05CA0096.outlook.office365.com (2603:10b6:8:56::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.6 via Frontend Transport; Fri, 24 Jun 2022 13:20:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 13:20:07 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 24 Jun 2022 13:20:06 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 24 Jun 2022 06:20:05 -0700 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 24 Jun 2022 06:20:05 -0700 From: Dmitry Kozlyuk To: CC: Subject: [PATCH v4 4/5] doc: update instructions for running as non-root for MLX5 Date: Fri, 24 Jun 2022 16:19:55 +0300 Message-ID: <20220624131956.75160-5-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220624131956.75160-1-dkozlyuk@nvidia.com> References: <20220624084817.63145-1-dkozlyuk@nvidia.com> <20220624131956.75160-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1634801-5665-4896-c8a7-08da55e441ef X-MS-TrafficTypeDiagnostic: MN2PR12MB3247:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nPcyHXJ1REhq6l5caX72DiRNBmupMkMuMKUDu/HF5jCvK41GO+m6Q47mhT0GJzqidGcA3qt6M5A3dlPgAbLpZf8lylw2STdGjJ4E/3o71pZ6WZfRxgk3eDAHENwHFIzF0Kg8LXyBOEYTS8NYsTB0xcEqMlgumvoewjRA742e6/iNcOd0P7zKhF+yrwzhVKKd2z6AGwBo0VUhIhW5a6WcZdYT8M7xzckdWzHjGWD2wBrZfm7NGIT6UF03fjGNKTuhMj0Frtyy9T3FQWEbVoGi//RvBu6Oho2OqjkKKwgjlnPbLivouR2Z6yLHBt1SOsg8BfttPyvyxC63ZSHwVp1ObLABsAWb6Np4JqY2GMSi9IeOPnXHOm5Bazo2siAyKEl6w/f3tv6cZlAU2pR/goqNlzCNVeGbp3nBIpo1EgLkVK5Ask+f539gsNbyMH6/285R/zi9gr/rDkqov0lxzOtXviQhucUHNC+kNpzxWvbCv/KIAK7PZWnGhvI5tMpRZo+zxwELskDi0E+jz62TQpJ+CaAV/Z8If5l4kv1MWxgvbjTK5egyLTUpu1RqxrHbNX3MgkwWVMUUCguH9U3mpj8sRCaNdjnTybfgEUHU/8u7AT3XK53ZGu2iFz81WnqGNTMoHp+vg2fvRtjPgeUkL47/kkJ0leMgY1QILuAxoeD9OKDVdeInNWSLbU7wGQF071zck2xUQtKd+ugaU7CJmqTd6zS0FgXTRrKbZNaUkoednsKVDov1sKiqSaTBl6rrbyuHQGweWc93/Uoeqx2XpCkBvSPhlFE+L+Ia/cVqJZ6/lx0z9PzTWwbdJaDXOjcO8dX1VhIDLg9JdMH7opw45QmjYg== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(136003)(39860400002)(376002)(396003)(40470700004)(36840700001)(46966006)(6666004)(2616005)(186003)(2906002)(26005)(7696005)(426003)(47076005)(82310400005)(316002)(6916009)(36756003)(86362001)(55016003)(41300700001)(1076003)(8676002)(8936002)(336012)(83380400001)(70206006)(81166007)(6286002)(40480700001)(478600001)(36860700001)(450100002)(356005)(4326008)(5660300002)(70586007)(82740400003)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2022 13:20:07.2390 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1634801-5665-4896-c8a7-08da55e441ef X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3247 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Reference the common guide for generic setup. Remove excessive capabilities from the recommended list. Cc: stable@dpdk.org Signed-off-by: Dmitry Kozlyuk --- doc/guides/platform/mlx5.rst | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/doc/guides/platform/mlx5.rst b/doc/guides/platform/mlx5.rst index 64a4c5e76e..18d38f3488 100644 --- a/doc/guides/platform/mlx5.rst +++ b/doc/guides/platform/mlx5.rst @@ -404,25 +404,30 @@ The device can be bound again at this point. Run as Non-Root ^^^^^^^^^^^^^^^ -In order to run as a non-root user, -some capabilities must be granted to the application:: +Hugepage and resource limit setup are documented +in the :ref:`common Linux guide `. +This PMD can operate without access to physical addresses, +therefore it does not require ``SYS_ADMIN`` to access ``/proc/self/pagemaps``. +Note that this requirement may still come from other drivers. - setcap cap_sys_admin,cap_net_admin,cap_net_raw,cap_ipc_lock+ep +Below are additional capabilities that must be granted to the application +with the reasons for the need of each capability: -Below are the reasons for the need of each capability: +``NET_RAW`` + For raw Ethernet queue allocation through the kernel driver. -``cap_sys_admin`` - When using physical addresses (PA mode), with Linux >= 4.0, - for access to ``/proc/self/pagemap``. +``NET_ADMIN`` + For device configuration, like setting link status or MTU. -``cap_net_admin`` - For device configuration. +``SYS_RAWIO`` + For using group 1 and above (software steering) in Flow API. -``cap_net_raw`` - For raw ethernet queue allocation through kernel driver. +They can be manually granted for a specific executable file:: -``cap_ipc_lock`` - For DMA memory pinning. + setcap cap_net_raw,cap_net_admin,cap_sys_rawio+ep + +Alternatively, a service manager or a container runtime +may configure the capabilities for a process. Windows Environment From patchwork Fri Jun 24 13:19:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 113447 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3317A0032; Fri, 24 Jun 2022 15:20:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4A1C4280E; Fri, 24 Jun 2022 15:20:18 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2076.outbound.protection.outlook.com [40.107.102.76]) by mails.dpdk.org (Postfix) with ESMTP id 689E942802 for ; Fri, 24 Jun 2022 15:20:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KAC0iUgmzVa+gGLv7tBCCFjllvTURrBdDYvVmAruf6sIWIhBUxsNthWbAfIpgNIzPPBSo8G1Wcw8Vi5nYQXnoT52Vr/TGhpLf7hhCF66WO4JKDMQ0cFttbz8Gou+WGbLGoqSXzJN7S8OX/IgOwTx/NCEClMl3C5a9BgxiWXzxnqAJbgtEwn8FSihpiIUUXL5ZCLS65k3sJ5j+Kj2V6y+bNotoPuDrguulWJUfCdVHPEncbTKPdFO77Cnk7HsHDhrcDYXuvFRgm5zFHWWafevKXZh1XEsflXV27Wm9XXafPwnrELIcp9kgQVOe1IzeMcmKOdqpiF+J/I/JoSM/uQItg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UKUaZu/6DvXj+MF5F6xW6lqoDOBA8isfd67QBw8Ef9E=; b=OMWhjVtPv/yeqtc6AGa6MsOeScEFa9HZDUY0O+HmIaSqQjmTXw7ABMIlY9qsLMeToGeOZ0zfXx/qqXYc5wT934TqaF5OAITplKLlA5mTaK63qJuaa8rGOQ2k39BEXz9GsE3z8HP/r7T4yqeP2lG15o2Ww4W2CuqyTD6waUanks+ZSTz2v0pOJYsjIuxGOhYCTM4ZyPXOakAZSMI9XwUduT4rqHF6TyfMs3OdSwSMIVW/YxwApx6rijoSdSHIx+RDtrUP0fUitfdkj++ZeynZtPdYnZe5uw4cYL9OaisCGtzVCP5l2102L5khH05W8LBzbYvJr/nSNXoxylVAQq0LfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UKUaZu/6DvXj+MF5F6xW6lqoDOBA8isfd67QBw8Ef9E=; b=LSDPI4E+Sjeg1nk4n+yrn62PsjNjDjQH3vp/4c9sustXN9y8dAbAtYRQr2ft7ECBA8vaaP4a0WzlSa2IDJweqfAYYTSPONIEZK+DL/xZBu31p5njz0hmmO/S+GMv3LFFakxgV5o3mgyUCwGDQd0nhiTbK3HdocjcedY0wbGm4PnNUoF81x1pV5tS8fQr3wBhMUe9FvMgy9qnaaJG+/c8YKysyMimHkusMVgbxXdHrnfUebSy62YVay6vJgsqkzu6hEdiwCIIg20pOtBR9K6TARuj8nI/H0J+qQFar+U3/SIUTDS8jV/iJBLi76MGI+MMD0Ue43zupq7nK4o9ss4jjA== Received: from BN9PR03CA0677.namprd03.prod.outlook.com (2603:10b6:408:10e::22) by MN2PR12MB4989.namprd12.prod.outlook.com (2603:10b6:208:38::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18; Fri, 24 Jun 2022 13:20:09 +0000 Received: from BN8NAM11FT004.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10e:cafe::ab) by BN9PR03CA0677.outlook.office365.com (2603:10b6:408:10e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 13:20:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT004.mail.protection.outlook.com (10.13.176.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 13:20:08 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 24 Jun 2022 13:20:08 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 24 Jun 2022 06:20:07 -0700 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 24 Jun 2022 06:20:06 -0700 From: Dmitry Kozlyuk To: CC: Maxime Coquelin , Chenbo Xia Subject: [PATCH v4 5/5] doc: add note about running virtio-legacy as non-root Date: Fri, 24 Jun 2022 16:19:56 +0300 Message-ID: <20220624131956.75160-6-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220624131956.75160-1-dkozlyuk@nvidia.com> References: <20220624084817.63145-1-dkozlyuk@nvidia.com> <20220624131956.75160-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b413735a-3d99-478f-40fa-08da55e442c5 X-MS-TrafficTypeDiagnostic: MN2PR12MB4989:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TRNIe/Xlqe8msiH6N6zsk3pFiY/UWG1QTAhiBSLOVTXwT40XJ1BcfkQLJ3hRSZe04yAUiaDfmi9iiq9s8Q2QoDiu2cDalnuCTKQ5DKl42bhNsEoTDZsTwgsNcIT6sw4lNRuQqC8x/kOBSfwH4XqmuYpDsjO4OYPE33k/JuvmxwJ8Y4yMyuS9qlDgEe26eOly0U5MubG97fokgsgyGXd/6rZRlTT7ZwyZ9Gd3UQQ4Csheims7zyXQJsiwIm/vcfX+issCEiEx2074IeCg+e0WHcmQJ8vcK6wShFnLzVHrq7HYcAdjegY764HqTrBLjTrshTjH+hoH4lldcNo7Mc3sKodKm4Rx5d8lU0WNYOEPoYa+T3i5EJb9TjPS/nO6E9AainI33bzHInyZzajRXOqUvnsNFXwIj3zospVtX9r7vnv/e19Ew8tMROTiSQVGzDPe5suu1TG10M9O0LYfhfVM1odcgC4BpZECpr08ogg4Irvtx9QUYWJUzMmCnKi/Xk8tmVSxKkpDUuovlrhjzD4de/Mj8KQp0EsyxjL/1dOV3fF/PxR4wbZgAW7eT9z+T+BVSiOTCHauaAy+Kn9s5jDwKDu3PGEOEg5tt2UgilsJs1lsngVJM7yXU2qi6o+FVlo0jxZWVAvg/73iuGOArymAKHt1Fr5s0Y0UDJ9bRS8gHKNW4hEb7VaNnzjQ8W78Mx3V6yjlDJEQ3xcmW6flYBoRNyeYv4XbgiXruC3XZU+RE0f296Tkr59Sl9V0q8Cr6crXhVO6wfPnsVmIXW1kkAUazBphuiBDFw9Tb+NmVwtoY7huOW8hfGfDFtbC2AtKEnIwED9c77asiAypc6P1XbUZtw== X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(346002)(39860400002)(376002)(136003)(40470700004)(36840700001)(46966006)(36860700001)(86362001)(8676002)(2906002)(40460700003)(82740400003)(70586007)(5660300002)(70206006)(41300700001)(82310400005)(4326008)(4744005)(6286002)(54906003)(7696005)(356005)(26005)(6916009)(1076003)(316002)(186003)(426003)(2616005)(336012)(83380400001)(40480700001)(6666004)(81166007)(55016003)(47076005)(36756003)(478600001)(8936002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2022 13:20:08.5912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b413735a-3d99-478f-40fa-08da55e442c5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT004.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4989 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The requirement of SYS_ADMIN capability in legacy virtio mode was missing. Add it to the driver-specific page. Signed-off-by: Dmitry Kozlyuk --- doc/guides/nics/virtio.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index 7c0ae2b3af..0e552b2701 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics/virtio.rst @@ -86,6 +86,9 @@ The following prerequisites apply: * Linux kernel with KVM module; vhost module loaded and ioeventfd supported. Qemu standard backend without vhost support isn't tested, and probably isn't supported. +* When using legacy interface, ``SYS_RAWIO`` capability is required + for ``iopl()`` call to enable access to PCI IO ports. + Virtio with kni vhost Back End ------------------------------