All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Durrant, Paul" <pdurrant@amazon.co.uk>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>, "Wei Liu" <wl@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH] libxl: fix assertion failure in stub domain creation
Date: Wed, 5 Feb 2020 10:50:46 +0000	[thread overview]
Message-ID: <822309f6c7ef4109b731d37efbad5793@EX13D32EUC003.ant.amazon.com> (raw)
In-Reply-To: <20200205104716.GA85066@perard.uk.xensource.com>

> -----Original Message-----
> From: Anthony PERARD <anthony.perard@citrix.com>
> Sent: 05 February 2020 10:47
> To: Durrant, Paul <pdurrant@amazon.co.uk>
> Cc: xen-devel@lists.xenproject.org; Ian Jackson
> <ian.jackson@eu.citrix.com>; Wei Liu <wl@xen.org>; Roger Pau Monné
> <roger.pau@citrix.com>
> Subject: Re: [PATCH] libxl: fix assertion failure in stub domain creation
> 
> On Wed, Feb 05, 2020 at 09:37:24AM +0000, Paul Durrant wrote:
> > An assertion in libxl__domain_make():
> >
> > 'soft_reset || *domid == INVALID_DOMID'
> >
> > does not hold true for stub domain creation, where soft_reset is false
> > but the passed in domid == 0. This is easily fixed by changing the
> > initializer in libxl__spawn_stub_dm().
> >
> > Fixes: 75259239d85d ("libxl_create: make 'soft reset' explicit")
> > Signed-off-by: Paul Durrant <pdurrant@amazon.com>
> > ---
> >  tools/libxl/libxl_dm.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> > index f758daf3b6..3b1da90167 100644
> > --- a/tools/libxl/libxl_dm.c
> > +++ b/tools/libxl/libxl_dm.c
> > @@ -2127,7 +2127,7 @@ void libxl__spawn_stub_dm(libxl__egc *egc,
> libxl__stub_dm_spawn_state *sdss)
> >          goto out;
> >      }
> >
> > -    sdss->pvqemu.guest_domid = 0;
> > +    sdss->pvqemu.guest_domid = INVALID_DOMID;
> 
> How this works? INVALID_DOMID seems to be directly feed to
> xc_domain_create(), which is using XEN_DOMCTL_createdomain.
> But a comment in domctl.h for XEN_DOMCTL_createdomain read:
>     NB. xen_domctl.domain is an IN/OUT parameter for this operation.
>     If it is specified as zero, an id is auto-allocated and returned.
> So, is xc_domain_create going to create a new domain with
> domid==INVALID_DOMID?
> 

As it happens, no. That comment is wrong. It should read "If it is not set to a valid value, an id is auto-allocated and returned".

  Paul


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

  reply	other threads:[~2020-02-05 10:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05  9:37 [Xen-devel] [PATCH] libxl: fix assertion failure in stub domain creation Paul Durrant
2020-02-05 10:47 ` Anthony PERARD
2020-02-05 10:50   ` Durrant, Paul [this message]
2020-02-05 11:23     ` Anthony PERARD

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=822309f6c7ef4109b731d37efbad5793@EX13D32EUC003.ant.amazon.com \
    --to=pdurrant@amazon.co.uk \
    --cc=anthony.perard@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=roger.pau@citrix.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 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.