[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH 2/3] libxl: Probe QEMU for -run-with chroot=dir and use it


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Tue, 27 Aug 2024 18:20:42 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vates.tech smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=X62I4IbYL6Xjki2tP3l2iI9fd3dxz3v7Xh0Coq5tGaQ=; b=WJPsP6b9sd767y63DOUh9Ryr71UPTOPu4gUAXtEGMK5Rcugr9+uSYw/uQcS/n7P5qcMkvLQaRxxsA0WqtaDETW99ACJf7R53o9Fbn+m4SBeSTv8hhVWTiH9e8+AFn81DxrY1JLFUz9wRyEqpIsWcFfCli+XfRpeJdq6N5YzI88RdeXZ+4frxuwxyfvOI8XTSoYeR0Ry40AVucAZZVn2db2bKEePyG/SHGiISmeEs29wK2WgHoJTuHXePtWX7Z53MjXbSvKz9CPAfcrNJlee3+cAN2wJEhvyyOHL516bDBwWNKB+F4DTlD135LcHzjBM5g3jfOePity4+i+9FFMsH8Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bpEXVivbMrgr1xopV2w6im3nHla5p84FMX+ITUkIR/0W+dkMU0vsJVxUiTOhQCbLZOBkifYFGpJHDejr2uKfUkRThu1LLrLgnYUI/c8weHJMz1csGmWGh746auyHZkI92kvclp4otB+/i5k3W+dvJgweRt5FcEzOdhXvmyj+FQnIyF1eN+gQETNk/Q//9AF7DTNYr6Y9otpQ3QDX0wRsbB6j0+m8kIscVPbsuYUW9QhtztLdwIrmiqsuxZTI7uRtE4tysk+S3+WdTb+xyIWKurUhX66pFf58zfZLFNOHhjonnz/jR1j9vacBTmOmoMIildVOJfSPOktxrl/VLik00Q==
  • Cc: Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Tue, 27 Aug 2024 23:30:06 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2024-08-27 06:03, Anthony PERARD wrote:
QEMU 9.0 have removed "-chroot" command line option, which have been
deprecated since QEMU 8.1 in favor of "-run-with chroot=dir".

Look into the result of the QMP command "query-command-line-options"
to find out if "-run-with chroot=dir" is available. Then use it in
place of "-chroot".

Resolves: xen-project/xen#187
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

though one suggestion below.

---
  tools/libs/light/libxl_dm.c       | 78 +++++++++++++++++++++++++------
  tools/libs/light/libxl_internal.h |  5 ++
  2 files changed, 69 insertions(+), 14 deletions(-)

diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c
index 46babfed0b..298fbb84fe 100644
--- a/tools/libs/light/libxl_dm.c
+++ b/tools/libs/light/libxl_dm.c
@@ -1183,11 +1183,12 @@ static int libxl__pre_open_qmp_socket(libxl__gc *gc, 
libxl_domid domid,
  }
static int libxl__build_device_model_args_new(libxl__gc *gc,
-                                        const char *dm, int guest_domid,
-                                        const libxl_domain_config 
*guest_config,
-                                        char ***args, char ***envs,
-                                        const libxl__domain_build_state *state,
-                                        int *dm_state_fd)
+    const char *dm, int guest_domid,
+    const libxl_domain_config *guest_config,
+    char ***args, char ***envs,
+    const libxl__domain_build_state *state,
+    const libxl__qemu_available_cmd_line *qemu_cmdline,

cmd_line/cmdline makes me think of command line strings. qemu_opts/qemu_cli_opts is a little more generic, to me at least. But not a big deal if you want to keep it as is.

Thanks,
Jason

+    int *dm_state_fd)
  {
      const libxl_domain_create_info *c_info = &guest_config->c_info;
      const libxl_domain_build_info *b_info = &guest_config->b_info;



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.