xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	andrew.cooper3@citrix.com
Subject: Re: [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured
Date: Fri, 11 Sep 2015 15:24:21 +0100	[thread overview]
Message-ID: <1441981461.3549.54.camel@citrix.com> (raw)
In-Reply-To: <20150911141415.GN1695@zion.uk.xensource.com>

On Fri, 2015-09-11 at 15:14 +0100, Wei Liu wrote:
@@ -1636,6 +1638,20 @@ void libxl__domain_save(libxl__egc *egc,
> libxl__domain_suspend_state *dss)
>            | (debug ? XCFLAGS_DEBUG : 0)
>            | (dss->hvm ? XCFLAGS_HVM : 0);
>  
> +    /* Disallow saving a guest with vNUMA configured because migration
> +     * stream does not preserve node information.
> +     *
> +     * Do not differentiate "no vnuma configuration" from "empty vnuma
> +     * configuration".
> +     */
> +    rc = xc_domain_getvnuma(CTX->xch, domid, &nr_vnodes, &nr_vmemranges,
> +                            &nr_vcpus, NULL, NULL, NULL);

Sorry for not noticing this before but this is putting a non-libxl error
code in a variable named rc, which is verboten in coding style.

Not least because I think it is now possible to get through this function
successfully without changing it from the rc == -1 which might be assigned
here (in the case where xs_suspend_evtchn_port returns < 0).

Ian.

> +    if (rc != -1 || errno != XEN_EOPNOTSUPP) {
> +        LOG(ERROR, "Cannot save a guest with vNUMA configured");
> +        rc = ERROR_FAIL;
> +        goto out;
> +    }
> +
>      dss->guest_evtchn.port = -1;
>      dss->guest_evtchn_lockfd = -1;
>      dss->guest_responded = 0;

  reply	other threads:[~2015-09-11 14:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11 13:50 [PATCH for 4.6 v4 0/3] More vNUMA patches Wei Liu
2015-09-11 13:50 ` [PATCH for 4.6 v4 1/3] libxc: introduce xc_domain_getvnuma Wei Liu
2015-09-11 13:53   ` Wei Liu
2015-09-11 13:50 ` [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured Wei Liu
2015-09-11 14:00   ` Ian Campbell
2015-09-11 14:14     ` Wei Liu
2015-09-11 14:24       ` Ian Campbell [this message]
2015-09-11 14:31         ` Wei Liu
2015-09-11 15:05           ` Ian Campbell
2015-09-11 15:09             ` Wei Liu
2015-09-11 15:53               ` Ian Campbell
2015-09-11 15:56                 ` Wei Liu
2015-09-11 13:50 ` [PATCH for 4.6 v4 3/3] xl: handle empty vnuma configuration Wei Liu

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=1441981461.3549.54.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wei.liu2@citrix.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 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).