[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH for 4.6 2/2] xl/libxl: disallow restoring guest with vNUMA configured



This is due to restoring a guest uses another path different from the
creation path and migration v2 frame record doesn't contain node
information.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
Cc: andrew.cooper3@xxxxxxxxxx

I don't think this is specific to migration v2. Legacy migration suffers
from the same issue but it's already gone.

Embedding node information in frame record seems easy but at this point
of release I don't want to rush to a solution.
---
 docs/man/xl.cfg.pod.5      |  2 ++
 tools/libxl/libxl_create.c | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index 80e51bb..3b924c7 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 restored or migrated
+because node information of guest frames is not preserved.
 
 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_create.c b/tools/libxl/libxl_create.c
index 29c2641..69c3168 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -870,6 +870,16 @@ static void initiate_domain_create(libxl__egc *egc,
         goto error_out;
     }
 
+    /* Disallow restoring a guest with vNUMA because migration v2
+     * record doesn't preserve node information for a particular guest
+     * frame.
+     */
+    if (d_config->b_info.num_vnuma_nodes && restore_fd >= 0) {
+        ret = ERROR_INVAL;
+        LOG(ERROR, "Cannot restore a guest with vNUMA configured");
+        goto error_out;
+    }
+
     ret = libxl__domain_create_info_setdefault(gc, &d_config->c_info);
     if (ret) {
         LOG(ERROR, "Unable to set domain create info defaults");
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.