From: Wei Liu Subject: [PATCH for 4.6 2/2] xl/libxl: disallow restoring guest with vNUMA configured Date: Tue, 8 Sep 2015 14:56:37 +0100 Message-ID: <1441720597-10920-3-git-send-email-wei.liu2@citrix.com> References: <1441720597-10920-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZZJO7-0001T4-76 for xen-devel@lists.xenproject.org; Tue, 08 Sep 2015 13:56:43 +0000 In-Reply-To: <1441720597-10920-1-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: Xen-devel Cc: Wei Liu , Ian Jackson , Ian Campbell , andrew.cooper3@citrix.com List-Id: xen-devel@lists.xenproject.org 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 --- Cc: andrew.cooper3@citrix.com 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 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