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

Re: [PATCH v6 09/18] libxl: add save/restore support for qemu-xen in stubdomain


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Date: Mon, 18 May 2020 15:24:34 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 18 May 2020 14:24:52 +0000
  • Ironport-sdr: wzFvJ0cZeqwqiNab3YVcZR2JPAzp5A/NTFcMfCFqHZ5V5eqO/7msNgRTOgTlzJE3DPhC4tGaeM kue2Bmr84iE5xPmhSAnGlwiLRmeaSd4cIE14TD8UuPNbPclEEKdWve5b2eu/+QLyijmM2w8fFD pteljN0YRQj0n/b6gM2OmdptFf8tqt4MpvOavbBv1GcssoiUL/qrEa2mz7bBxRh38UalE6ZABJ 70WOlynCZ4T9WWZ+kcN5ug55GGozFxvp0YAwqoH/gnMelZgujSVJx90IXaMp9joGCOmf5qHATg jPA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Jason Andryuk writes ("[PATCH v6 09/18] libxl: add save/restore support for 
qemu-xen in stubdomain"):
> From: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
...
>      if (state->saved_state) {
> -        /* This file descriptor is meant to be used by QEMU */
> -        *dm_state_fd = open(state->saved_state, O_RDONLY);
> -        flexarray_append(dm_args, "-incoming");
> -        flexarray_append(dm_args, GCSPRINTF("fd:%d",*dm_state_fd));
> +        if (is_stubdom) {
> +            /* Linux stubdomain must replace $STUBDOM_RESTORE_INCOMING_ARG
> +             * with the approriate fd:$num argument for the
> +             * STUBDOM_CONSOLE_RESTORE console 2.
> +             */
> +            flexarray_append(dm_args, "-incoming");
> +            flexarray_append(dm_args, "$STUBDOM_RESTORE_INCOMING_ARG");
> +        } else {
> +            /* This file descriptor is meant to be used by QEMU */
> +            *dm_state_fd = open(state->saved_state, O_RDONLY);
> +            flexarray_append(dm_args, "-incoming");
> +            flexarray_append(dm_args, GCSPRINTF("fd:%d",*dm_state_fd));

Hrk.  The stubdom script is expected to spot this particular value in
the dm_args array and seddery it.  OK.  This is, at leasst, sound.
I'm happy with the code and the protocol.

I think this needs a change to this doc:

  Subject: [PATCH v6 01/18] Document ioemu MiniOS stubdomain protocol

  +Toolstack to MiniOS ioemu stubdomain protocol
  +---------------------------------------------

Provided that you update the docs commit and take my ack off that,
please add my ack to this code :-).

Or you can fold the docs change into this commit, if you prefer, in
which case I'll review this patch again.

Thanks,
Ian.



 


Rackspace

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