[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.6] xl/libxl: disallow saving a guest with vNUMA configured
commit ed9926ecf015b7693955d0d587c491d23bd0e676 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Wed Sep 9 17:11:24 2015 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Fri Sep 11 16:36:56 2015 +0100 xl/libxl: disallow saving a guest with vNUMA configured This is because the migration stream does not preserve node information. Note this is not a regression for migration v2 vs legacy migration because neither of them preserves node information. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> [ ijc -- some grammar fixes to the doc and fixed a comment ] (cherry picked from commit fa6b5490be0bf2c0d1c17197e9c30af22e0a24e9) --- docs/man/xl.cfg.pod.5 | 2 ++ tools/libxl/libxl_dom.c | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 index 80e51bb..d422924 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. +Furthermore, guests with virtual NUMA cannot be saved or migrated +because the migration stream does not preserve node information. Each B<VNODE_SPEC> 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..b514377 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -24,6 +24,7 @@ #include <xen/hvm/hvm_info_table.h> #include <xen/hvm/hvm_xs_strings.h> #include <xen/hvm/e820.h> +#include <xen/errno.h> libxl_domain_type libxl__domain_type(libxl__gc *gc, uint32_t domid) { @@ -1602,7 +1603,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_suspend_state *dss) { STATE_AO_GC(dss->ao); int port; - int rc; + int rc, ret; /* Convenience aliases */ const uint32_t domid = dss->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,21 @@ 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. + * + * Reject any domain which has vnuma enabled, even if the + * configuration is empty. Only domains which have no vnuma + * configuration at all are supported. + */ + ret = xc_domain_getvnuma(CTX->xch, domid, &nr_vnodes, &nr_vmemranges, + &nr_vcpus, NULL, NULL, NULL); + if (ret != -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; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.6 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |