All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: xen-devel@lists.xenproject.org, Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [PATCH v3 04/17] libxl: Allow running qemu-xen in stubdomain
Date: Thu, 21 Feb 2019 17:58:57 +0000	[thread overview]
Message-ID: <20190221175857.baxaoppa5f62nuar@zion.uk.xensource.com> (raw)
In-Reply-To: <20190221170631.GT21228@mail-itl>

On Thu, Feb 21, 2019 at 06:06:31PM +0100, Marek Marczykowski-Górecki wrote:
> On Thu, Feb 21, 2019 at 04:01:59PM +0000, Wei Liu wrote:
> > On Mon, Jan 28, 2019 at 10:30:21PM +0100, Marek Marczykowski-Górecki wrote:
> > > Do not prohibit anymore using stubdomain with qemu-xen.
> > > To help distingushing MiniOS and Linux stubdomain, add helper inline
> > > functions libxl__stubdomain_is_linux() and
> > > libxl__stubdomain_is_linux_running(). Those should be used where really
> > > the difference is about MiniOS/Linux, not qemu-xen/qemu-xen-traditional.
> > > 
> > > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> > > 
> > > ---
> > > Changes in v3:
> > >  - new patch, instead of "libxl: Add "stubdomain_version" to
> > >  domain_build_info"
> > >  - helper functions as suggested by Ian Jackson
> > > ---
> > >  tools/libxl/libxl_create.c   |  9 ---------
> > >  tools/libxl/libxl_internal.h | 17 +++++++++++++++++
> > >  2 files changed, 17 insertions(+), 9 deletions(-)
> > > 
> (...)
> > > diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> > > index 459f9bf..b8c698a 100644
> > > --- a/tools/libxl/libxl_internal.h
> > > +++ b/tools/libxl/libxl_internal.h
> > > @@ -2195,6 +2195,23 @@ _hidden int libxl__device_model_version_running(libxl__gc *gc, uint32_t domid);
> > >    /* Return the system-wide default device model */
> > >  _hidden libxl_device_model_version libxl__default_device_model(libxl__gc *gc);
> > >  
> > > +static inline
> > > +bool libxl__stubdomain_is_linux_running(libxl__gc *gc, uint32_t domid)
> > > +{
> > > +    /* same logic as in libxl__stubdomain_is_linux */
> > > +    return libxl__device_model_version_running(gc, domid)
> > > +        == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
> > 
> > I don't think the logic is accurate. You're precluding running
> > qemu-xen in a unikernel as stubdom.
> > 
> > I think putting an extra key in xenstore with the underlying platform is
> > more desirable.
> > 
> > > +}
> > > +
> > > +static inline
> > > +bool libxl__stubdomain_is_linux(libxl_domain_build_info *b_info)
> > > +{
> > > +    /* right now qemu-tranditional implies MiniOS stubdomain and qemu-xen
> > > +     * implies Linux stubdomain */
> > > +    return libxl_defbool_val(b_info->device_model_stubdomain) &&
> > > +        b_info->device_model_version == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
> > 
> > Subsequently you will need a new field in b_info.
> > 
> > What do you think?
> 
> This is _exactly_ what was in v2 of this patch and Ian suggested to
> change it:
> https://lists.xenproject.org/archives/html/xen-devel/2018-10/msg01317.html

Alright. Ian thought unikernel qemu-xen stubdomain was not coming along
any time soon. I don't disagree. You can keep the patch as-is.

I think in the future if it does come along, we can still easily
distinguish it from the rest.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-02-21 18:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 21:30 [PATCH v3 00/17] Add support for qemu-xen runnning in a Linux-based stubdomain Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 01/17] Document ioemu MiniOS stubdomain protocol Marek Marczykowski-Górecki
2019-02-12 10:52   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 02/17] Document ioemu Linux " Marek Marczykowski-Górecki
2019-02-21 15:39   ` Wei Liu
2019-02-21 17:08     ` Marek Marczykowski-Górecki
2019-02-21 17:31       ` Wei Liu
2019-02-21 18:17         ` Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 03/17] libxl: fix qemu-trad cmdline for no sdl/vnc case Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 04/17] libxl: Allow running qemu-xen in stubdomain Marek Marczykowski-Górecki
2019-02-21 16:01   ` Wei Liu
2019-02-21 17:06     ` Marek Marczykowski-Górecki
2019-02-21 17:58       ` Wei Liu [this message]
2019-01-28 21:30 ` [PATCH v3 05/17] libxl: Handle Linux stubdomain specific QEMU options Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 06/17] libxl: write qemu arguments into separate xenstore keys Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 07/17] libxl: create vkb device only for guests with graphics output Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 08/17] xl: add stubdomain related options to xl config parser Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 09/17] tools/libvchan: notify server when client is connected Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 10/17] libxl: typo fix in comment Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 11/17] libxl: move xswait declaration up in libxl_internal.h Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 12/17] libxl: use vchan for QMP access with Linux stubdomain, libxl__ev_qmp_* version Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 13/17] libxl: use vchan for QMP access with Linux stubdomain, non-async version Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 14/17] libxl: add save/restore support for qemu-xen in stubdomain Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 15/17] tools: add missing libxenvchan cflags Marek Marczykowski-Górecki
2019-02-21 16:05   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 16/17] libxl: add locking for libvchan QMP connection Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 17/17] libxl: require qemu in dom0 even if stubdomain is in use 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=20190221175857.baxaoppa5f62nuar@zion.uk.xensource.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=marmarek@invisiblethingslab.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.