[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



On Tue, Aug 27, 2024 at 06:20:42PM -0400, Jason Andryuk wrote:
> 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.

Yes, "opts" sounds better than "cmdline" in this context.

I'll rename "libxl__qemu_available_cmd_line" to
"libxl__qemu_available_opts".

And "qemu_cmdline" to "qemu_opts", both in the struct
libxl__dm_spawn_state and as argument of functions.

Thanks,

-- 

Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech



 


Rackspace

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