From: Jason Andryuk <jandryuk@gmail.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [Xen-devel] [PATCH v4 12/16] libxl: use vchan for QMP access with Linux stubdomain
Date: Fri, 24 Jan 2020 09:05:09 -0500 [thread overview]
Message-ID: <CAKf6xpvzz39_OH6sEEq4QpumnyO12V23KHTGhBp7sx3GFoLJmQ@mail.gmail.com> (raw)
In-Reply-To: <20200121234611.GV1314@mail-itl>
On Tue, Jan 21, 2020 at 6:46 PM Marek Marczykowski-Górecki
<marmarek@invisiblethingslab.com> wrote:
<snip>
> > > +static void spawn_qmp_proxy(libxl__egc *egc,
> > > + libxl__stub_dm_spawn_state *sdss)
> > > +{
> > > + STATE_AO_GC(sdss->qmp_proxy_spawn.ao);
> > > + const uint32_t guest_domid = sdss->dm.guest_domid;
> > > + const uint32_t dm_domid = sdss->pvqemu.guest_domid;
> > > + const char *dom_path = libxl__xs_get_dompath(gc, dm_domid);
> > > + char **args;
> > > + int nr = 0;
> > > + int rc, logfile_w, null;
> > > +
> > > + if (access(STUBDOM_QMP_PROXY_PATH, X_OK) < 0) {
> > > + LOGED(ERROR, guest_domid, "qmp proxy %s is not executable", STUBDOM_QMP_PROXY_PATH);
> > > + rc = ERROR_FAIL;
> > > + goto out;
> > > + }
> > > +
> > > + sdss->qmp_proxy_spawn.what = GCSPRINTF("domain %d device model qmp proxy", guest_domid);
> > > + sdss->qmp_proxy_spawn.pidpath = GCSPRINTF("%s/image/qmp-proxy-pid", dom_path);
> > > + sdss->qmp_proxy_spawn.xspath = GCSPRINTF("%s/image/qmp-proxy-state", dom_path);
> >
> > Since this is the vchan-socket-proxy in dom0, should it write to
> > "device-model/%u/qmp-proxy-state" underneath dom0?
>
> Yes, that would be more consistent. But pid should stay where it is
> (it's also where dom0 qemu pid is being written).
Hmm, that split between pids and device-model info is a little weird.
But it is specified in docs misc/xenstore-paths.pandoc
> > > +
> > > + sdss->qmp_proxy_spawn.timeout_ms = LIBXL_DEVICE_MODEL_START_TIMEOUT * 1000;
> > > + sdss->qmp_proxy_spawn.midproc_cb = libxl__spawn_record_pid;
> > > + sdss->qmp_proxy_spawn.confirm_cb = qmp_proxy_confirm;
> > > + sdss->qmp_proxy_spawn.failure_cb = qmp_proxy_startup_failed;
> > > + sdss->qmp_proxy_spawn.detached_cb = qmp_proxy_detached;
> > > +
> > > + const int arraysize = 6;
> > > + GCNEW_ARRAY(args, arraysize);
> > > + args[nr++] = STUBDOM_QMP_PROXY_PATH;
> > > + args[nr++] = GCSPRINTF("--state-path=%s", sdss->qmp_proxy_spawn.xspath);
> > > + args[nr++] = GCSPRINTF("%u", dm_domid);
> > > + args[nr++] = GCSPRINTF("%s/device-model/%u/qmp-vchan", dom_path, guest_domid);
> >
> > Thinking of OpenXT"s qmp-helper, this path isn't useful. But it is
> > for vchan-socket-proxy, so qmp-helper could just change to ignore it.
>
> For vchan we could use also a port number (and then it will encode it
> into a xenstore path). This is in fact how we use libvchan in Qubes. I
> opted for explicit path only because of lack of idea for some meaningful
> port number ;) But I'm open for suggestions.
> I guess that would be useful for Argo version then.
The argo version hard codes the port number, so it's not a command
line argument. The port number would need to get passed to the
stubdom or it would need to be standardized.
I think the arguments for vchan-socket-proxy make sense. Since it's
the one that's submitted upstream, it makes sense to use them.
Put another way, do we want this to support alternate implementations
for a qmp proxy? Should the arguments be generic for that case?
Since the existing arguments have enough information for either proxy,
I think it's fine to leave it as is. While you could have a wrapper
generate all the above from just the domid & stub_domid, that's kinda
hacky.
Thanks,
Jason
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-01-24 14:05 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 2:39 [Xen-devel] [PATCH v4 00/16] Add support for qemu-xen runnning in a Linux-based stubdomain Marek Marczykowski-Górecki
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 01/16] Document ioemu MiniOS stubdomain protocol Marek Marczykowski-Górecki
2020-01-20 18:30 ` Jason Andryuk
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 02/16] Document ioemu Linux " Marek Marczykowski-Górecki
2020-01-20 18:54 ` Jason Andryuk
2020-01-21 21:08 ` Marek Marczykowski-Górecki
2020-01-22 14:04 ` Jason Andryuk
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 03/16] libxl: fix qemu-trad cmdline for no sdl/vnc case Marek Marczykowski-Górecki
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 04/16] libxl: Allow running qemu-xen in stubdomain Marek Marczykowski-Górecki
2020-01-20 18:56 ` Jason Andryuk
2020-01-21 21:12 ` Marek Marczykowski-Górecki
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 05/16] libxl: Handle Linux stubdomain specific QEMU options Marek Marczykowski-Górecki
2020-01-20 19:24 ` Jason Andryuk
2020-01-21 21:18 ` Marek Marczykowski-Górecki
2020-01-22 14:25 ` Jason Andryuk
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 06/16] libxl: write qemu arguments into separate xenstore keys Marek Marczykowski-Górecki
2020-01-20 19:36 ` Jason Andryuk
2020-01-21 21:19 ` Marek Marczykowski-Górecki
2020-01-22 14:39 ` Jason Andryuk
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 07/16] xl: add stubdomain related options to xl config parser Marek Marczykowski-Górecki
2020-01-20 19:41 ` Jason Andryuk
2020-01-21 21:22 ` Marek Marczykowski-Górecki
2020-01-22 14:39 ` Jason Andryuk
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 08/16] tools/libvchan: notify server when client is connected Marek Marczykowski-Górecki
2020-01-20 19:44 ` Jason Andryuk
2020-01-21 21:28 ` Marek Marczykowski-Górecki
2020-01-22 14:43 ` Jason Andryuk
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 09/16] libxl: add save/restore support for qemu-xen in stubdomain Marek Marczykowski-Górecki
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 10/16] tools: add missing libxenvchan cflags Marek Marczykowski-Górecki
2020-01-20 19:58 ` Jason Andryuk
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 11/16] tools: add simple vchan-socket-proxy Marek Marczykowski-Górecki
2020-01-15 11:02 ` Jan Beulich
2020-01-16 17:11 ` Marek Marczykowski-Górecki
2020-01-17 8:13 ` Jan Beulich
2020-01-17 18:44 ` Rich Persaud
2020-01-17 18:56 ` Marek Marczykowski-Górecki
2020-01-21 19:43 ` Jason Andryuk
2020-01-21 23:09 ` Marek Marczykowski-Górecki
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 12/16] libxl: use vchan for QMP access with Linux stubdomain Marek Marczykowski-Górecki
2020-01-21 20:17 ` Jason Andryuk
2020-01-21 23:46 ` Marek Marczykowski-Górecki
2020-01-24 14:05 ` Jason Andryuk [this message]
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 13/16] Regenerate autotools files Marek Marczykowski-Górecki
2020-01-15 21:57 ` Rich Persaud
2020-01-21 20:56 ` Marek Marczykowski-Górecki
2020-01-21 21:28 ` Rich Persaud
2020-01-22 8:57 ` Lars Kurth
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 14/16] libxl: require qemu in dom0 even if stubdomain is in use Marek Marczykowski-Górecki
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 15/16] libxl: ignore emulated IDE disks beyond the first 4 Marek Marczykowski-Górecki
2020-01-21 20:24 ` Jason Andryuk
2020-01-15 2:39 ` [Xen-devel] [PATCH v4 16/16] libxl: consider also qemu in stubdomain in libxl__dm_active check Marek Marczykowski-Górecki
2020-01-21 20:25 ` Jason Andryuk
2020-01-22 16:50 ` [Xen-devel] [PATCH v4 00/16] Add support for qemu-xen runnning in a Linux-based stubdomain Jason Andryuk
2020-01-24 19:58 [Xen-devel] [PATCH v4 12/16] libxl: use vchan for QMP access with Linux stubdomain Rich Persaud
2020-01-24 20:22 ` Marek Marczykowski-Górecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKf6xpvzz39_OH6sEEq4QpumnyO12V23KHTGhBp7sx3GFoLJmQ@mail.gmail.com \
--to=jandryuk@gmail.com \
--cc=anthony.perard@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=marmarek@invisiblethingslab.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).