From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH for 4.6 v2 3/3] xl/libxl: disallow saving a guest with vNUMA configured Date: Wed, 09 Sep 2015 13:17:40 -0400 Message-ID: <55F069B4.3040206@oracle.com> References: <1441818218-5414-1-git-send-email-wei.liu2@citrix.com> <1441818218-5414-4-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZZj1U-000344-5g for xen-devel@lists.xenproject.org; Wed, 09 Sep 2015 17:19:04 +0000 In-Reply-To: <1441818218-5414-4-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu , Xen-devel Cc: andrew.cooper3@citrix.com, Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 09/09/2015 01:03 PM, Wei Liu wrote: > This is due to migration v2 frame record doesn't contain node > information. > > Signed-off-by: Wei Liu > --- > Cc: andrew.cooper3@citrix.com > --- > docs/man/xl.cfg.pod.5 | 2 ++ > tools/libxl/libxl_dom.c | 14 ++++++++++++++ > 2 files changed, 16 insertions(+) > > diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 > index 80e51bb..dbd0700 100644 > --- a/docs/man/xl.cfg.pod.5 > +++ b/docs/man/xl.cfg.pod.5 > @@ -263,6 +263,8 @@ virtual node. > > Note that virtual NUMA for PV guest is not yet supported, because > there is an issue with cpuid handling that affects PV virtual NUMA. > +Further more, guest with virtual NUMA cannot be saved or migrated > +because node information of guest frames is not preserved. Should we also issue a warning during startup if nomigrate is not set? -boris > > Each B is a list, which has a form of > "[VNODE_CONFIG_OPTION,VNODE_CONFIG_OPTION, ... ]" (without quotes). > diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c > index c2518a3..5dc4d3a 100644 > --- a/tools/libxl/libxl_dom.c > +++ b/tools/libxl/libxl_dom.c > @@ -24,6 +24,7 @@ > #include > #include > #include > +#include > > libxl_domain_type libxl__domain_type(libxl__gc *gc, uint32_t domid) > { > @@ -1612,6 +1613,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_suspend_state *dss) > const libxl_domain_remus_info *const r_info = dss->remus; > libxl__srm_save_autogen_callbacks *const callbacks = > &dss->sws.shs.callbacks.save.a; > + unsigned int nr_vnodes = 0, nr_vmemranges = 0, nr_vcpus = 0; > > dss->rc = 0; > logdirty_init(&dss->logdirty); > @@ -1636,6 +1638,18 @@ 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 > + * v2 record doesn't contain node information for guest frame. > + */ > + rc = xc_domain_getvnuma(CTX->xch, domid, &nr_vnodes, &nr_vmemranges, > + &nr_vcpus, NULL, NULL, NULL); > + assert(rc == -1 && (errno == XEN_ENOBUFS || errno == XEN_EOPNOTSUPP)); > + if (errno == XEN_ENOBUFS && nr_vnodes) { > + 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;