From patchwork Tue May 24 14:45:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 9133795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E7FB06075E for ; Tue, 24 May 2016 14:48:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAF632823B for ; Tue, 24 May 2016 14:48:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF6342828B; Tue, 24 May 2016 14:48:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4A7302823B for ; Tue, 24 May 2016 14:48:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5DbL-00030S-UX; Tue, 24 May 2016 14:46:31 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5DbL-00030K-Es for xen-devel@lists.xen.org; Tue, 24 May 2016 14:46:31 +0000 Received: from [193.109.254.147] by server-10.bemta-14.messagelabs.com id D9/1C-11757-64964475; Tue, 24 May 2016 14:46:30 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGLMWRWlGSWpSXmKPExsXitHRDpK5bpku 4wdr7vBZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8ad98fZCi6IVryY1MDawNgs1MXIySEh4C+x ceFMdhCbTcBAYsX0q4wgtoiArMTqrjlAcQ4OZoFyiaPHdEFMYYEgiVO7JUEqWARUJb5/n8YGY vMKeEj8nL+MBaREQkBO4sq/BJCwkICaxI2FIGGQEkGJkzOfgNnMAhISB1+8YIY4gFvi9umpzB MYeWYhKZuFpGwBI9MqRo3i1KKy1CJdQyO9pKLM9IyS3MTMHF1DQxO93NTi4sT01JzEpGK95Pz cTYzA8GAAgh2MZ6c5H2KU5GBSEuUtSHIJF+JLyk+pzEgszogvKs1JLT7EKMPBoSTBW5EBlBMs Sk1PrUjLzAEGKkxagoNHSYS3GyTNW1yQmFucmQ6ROsWoKCXOawiSEABJZJTmwbXBouMSo6yUM C8j0CFCPAWpRbmZJajyrxjFORiVhHnngEzhycwrgZv+CmgxE9Bi/y/OIItLEhFSUg2Mu71MTi t/2Hyy7aDMofeCyfdra+z3sS7unzEjdd+Ps4b708LCxJb7rju6MmWOA7eek1dyrpHIs76r3fV 22/rTeo3z5l6e9DZp8fX9+yfGzniqfSI3/It9oPXKaqZpE0o6f20SW8zRKdUZsPdWpEjz3ReC X1d2HRaaM3Hj+vd3ePzdmwKPHd2XqsRSnJFoqMVcVJwIALfBhxaJAgAA X-Env-Sender: prvs=945ef7921=anthony.perard@citrix.com X-Msg-Ref: server-6.tower-27.messagelabs.com!1464101188!43640866!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 7848 invoked from network); 24 May 2016 14:46:29 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-6.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 24 May 2016 14:46:29 -0000 X-IronPort-AV: E=Sophos;i="5.26,360,1459814400"; d="scan'208";a="356300330" From: Anthony PERARD To: Date: Tue, 24 May 2016 15:45:36 +0100 Message-ID: <1464101136-4767-1-git-send-email-anthony.perard@citrix.com> X-Mailer: git-send-email 2.8.2 MIME-Version: 1.0 X-DLP: MIA2 Cc: Anthony PERARD , Wei Liu , Ian Jackson Subject: [Xen-devel] [PATCH v2] libxl: Avoid advertising about device_model_user config option X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Running QEMU as non-root user is not ready yet, so replace the warning with a debug message and remove the option from the man page. Also improve the doc to include more potential issue with running QEMU as non-root. Signed-off-by: Anthony PERARD Acked-by: Wei Liu Acked-by: Ian Jackson --- Changes in V2: - remove option from the man page - add a comment in the IDL. --- docs/man/xl.cfg.pod.5 | 7 ------- docs/misc/qemu-deprivilege.txt | 5 +++-- tools/libxl/libxl_dm.c | 2 +- tools/libxl/libxl_types.idl | 1 + 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 index a4cc1b3..4a8bf51 100644 --- a/docs/man/xl.cfg.pod.5 +++ b/docs/man/xl.cfg.pod.5 @@ -1949,13 +1949,6 @@ Pass additional arbitrary options on the device-model command line for an HVM device model only. Each element in the list is passed as an option to the device-model. -=item B - -Run the device model as user "username", instead of -xen-qemudepriv-domid$domid or xen-qemudepriv-shared or root. -Please note that running QEMU as non-root causes migration and PCI -passthrough not to work properly. - =back =head2 Keymaps diff --git a/docs/misc/qemu-deprivilege.txt b/docs/misc/qemu-deprivilege.txt index 879a98e..58b86a3 100644 --- a/docs/misc/qemu-deprivilege.txt +++ b/docs/misc/qemu-deprivilege.txt @@ -31,5 +31,6 @@ adduser --no-create-home --system xen-qemuuser-shared As a last resort, libxl will start QEMU as root. -Please note that running QEMU as non-root causes migration and PCI -passthrough not to work properly. +Please note that running QEMU as non-root causes several features like +migration and PCI passthrough to not work properly and may prevent the guest +from booting. diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 65dceee..6bbc7c3 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -1482,7 +1482,7 @@ static int libxl__build_device_model_args_new(libxl__gc *gc, } user = NULL; - LOG(WARN, "Could not find user %s, starting QEMU as root", + LOG(DEBUG, "Could not find user %s, starting QEMU as root", LIBXL_QEMU_USER_SHARED); end_search: diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 9840f3b..ef614be 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -468,6 +468,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("device_model", string), ("device_model_ssidref", uint32), ("device_model_ssid_label", string), + # device_model_user is not ready for use yet ("device_model_user", string), # extra parameters pass directly to qemu, NULL terminated