Skip to contentSkip to conversation

More vNUMA patches

PATCH In review Wei Liu 2 participants 13 messages Sep 11, 2015

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

v4 cover More vNUMA patches

Wei Liu (3):
libxc: introduce xc_domain_getvnuma
xl/libxl: disallow saving a guest with vNUMA configured
xl: handle empty vnuma configuration

 docs/man/xl.cfg.pod.5         |  2 ++
 tools/libxc/include/xenctrl.h | 18 +++++++++++++++
 tools/libxc/xc_domain.c       | 53 +++++++++++++++++++++++++++++++++++++++++++
 tools/libxl/libxl_dom.c       | 16 +++++++++++++
 tools/libxl/xl_cmdimpl.c      |  3 +++
 5 files changed, 92 insertions(+)
Signature · 1 line
2.1.4
author
#1 lore raw

PATCH v4 1/3 libxc: introduce xc_domain_getvnuma

A simple wrapper for XENMEM_get_vnumainfo.

---
v4: rebase on top of staging

---
 tools/libxc/include/xenctrl.h | 18 +++++++++++++++
 tools/libxc/xc_domain.c       | 53 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)
tools/libxc/include/xenctrl.h +18 -0
index e019474..3482544 100644
@@ -1287,6 +1287,24 @@ int xc_domain_setvnuma(xc_interface *xch,
                         unsigned int *vdistance,
                         unsigned int *vcpu_to_vnode,
                         unsigned int *vnode_to_pnode);
+/*
+ * Retrieve vnuma configuration
+ * domid: IN, target domid
+ * nr_vnodes: IN/OUT, number of vnodes, not NULL
+ * nr_vmemranges: IN/OUT, number of vmemranges, not NULL
+ * nr_vcpus: IN/OUT, number of vcpus, not NULL
+ * vmemranges: OUT, an array which has length of nr_vmemranges
+ * vdistance: OUT, an array which has length of nr_vnodes * nr_vnodes
+ * vcpu_to_vnode: OUT, an array which has length of nr_vcpus
+ */
+int xc_domain_getvnuma(xc_interface *xch,
+                       uint32_t domid,
+                       uint32_t *nr_vnodes,
+                       uint32_t *nr_vmemranges,
+                       uint32_t *nr_vcpus,
+                       xen_vmemrange_t *vmemrange,
+                       unsigned int *vdistance,
+                       unsigned int *vcpu_to_vnode);
 
 int xc_domain_soft_reset(xc_interface *xch,
                          uint32_t domid);
tools/libxc/xc_domain.c +53 -0

59 lines not on this page · raw message

Signature · 1 line
2.1.4
author
#2 lore raw

Re: [PATCH for 4.6 v4 1/3] libxc: introduce xc_domain_getvnuma

Quoted 6 lines · Wei Liu

A simple wrapper for XENMEM_get_vnumainfo.

---
v4: rebase on top of staging

Note that this patch needs some trivial contextual adjustment when being applied to staging-4.6.

If you need a patch for staging-4.6 I can also provide one.

Wei.

author
#3 lore raw

PATCH v4 2/3 xl/libxl: disallow saving a guest with vNUMA configured

In reply to Wei Liu

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 preserve node information.

---
Cc: [email protected]

v4:
1. Don't differentiate "no vnuma" from "empty vnuma".

v3:
1. Update manpage, code comment and commit message.
2. *Don't* check if nomigrate is set.

---
 docs/man/xl.cfg.pod.5   |  2 ++
 tools/libxl/libxl_dom.c | 16 ++++++++++++++++
 2 files changed, 18 insertions(+)
docs/man/xl.cfg.pod.5 +2 -0
index c6345b8..157c855 100644
@@ -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 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).
tools/libxl/libxl_dom.c +16 -0
index c2518a3..7227f35 100644
@@ -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)
 {
@@ -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,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);
+    if (rc != -1 || errno == XEN_ENOBUFS) {
+        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;
Signature · 1 line
2.1.4
#4 lore raw

Re: [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

tools/libxl/libxl_dom.c void libxl__domain_save(libxl__egc *egc, libxl__domain_suspend_state *dss) · line 1649

Quoted 9 lines · Wei Liu
tools/libxl/libxl_dom.c +9 -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);
+    if (rc != -1 || errno == XEN_ENOBUFS) {

This is not as we discussed, it is neither what I proposed nor what you (incorrectly IMHO) corrected it to be in the previous thread.

Ian

author
#5 lore raw

Re: [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

Quoted 11 lines · Ian Campbell

Review

Quoted 9 lines · Wei Liu
(quoted diff) +9 -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);
+    if (rc != -1 || errno == XEN_ENOBUFS) {
Quoted 3 lines

This is not as we discussed, it is neither what I proposed nor what you (incorrectly IMHO) corrected it to be in the previous thread.

To avoid spamming the list I attach the updated version here.

Tested with saving guests with / without vnuma configuration.

---8<---

Quoted 1 line

From 0c286535e998b62dbe0e35be4c9366fb8dc0934d Mon Sep 17 00:00:00 2001

From: Wei Liu <[email protected]>
Date: Wed, 9 Sep 2015 17:11:24 +0100
Subject: [PATCH] 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 preserve node information.

---
Cc: [email protected]

v4:
1. Don't differentiate "no vnuma" from "empty vnuma".

v3:
1. Update manpage, code comment and commit message.
2. *Don't* check if nomigrate is set.

---
 docs/man/xl.cfg.pod.5   |  2 ++
 tools/libxl/libxl_dom.c | 16 ++++++++++++++++
 2 files changed, 18 insertions(+)
docs/man/xl.cfg.pod.5 +2 -0
index c6345b8..157c855 100644
@@ -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 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).
tools/libxl/libxl_dom.c +16 -0
index c2518a3..72fce21 100644
@@ -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)
 {
@@ -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,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);
+    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;
Signature · 1 line
2.1.4
#6 lore raw

Re: [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

On Fri, 2015-09-11 at 15:14 +0100, Wei Liu wrote:
@@ -1636,6 +1638,20 @@ void libxl__domain_save(libxl__egc *egc,

tools/libxl/libxl_dom.c void libxl__domain_save(libxl__egc *egc, libxl__domain_suspend_state *dss) · line 1648

Quoted 12 lines

libxl__domain_suspend_state *dss)
| (debug ? XCFLAGS_DEBUG : 0)
| (dss->hvm ? XCFLAGS_HVM : 0);

tools/libxl/libxl_dom.c +8 -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.

Quoted 9 lines
tools/libxl/libxl_dom.c +6 -0
+    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;
author
#7 lore raw

Re: [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

Quoted 15 lines · Ian Campbell

On Fri, 2015-09-11 at 15:14 +0100, Wei Liu wrote:

(quoted diff) +0 -0
@@ -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);

Review

Quoted 9 lines
(quoted diff) +8 -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);
Quoted 3 lines

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.

My bad. Should have noticed that earlier.

Quoted 5 lines

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.

Add a new variable called ret to store return value from xc function call. Here is the patch.

---8<---

Quoted 1 line

From c2e9567fa0c5a00405d3759321c9eefb8ec049fc Mon Sep 17 00:00:00 2001

From: Wei Liu <[email protected]>
Date: Wed, 9 Sep 2015 17:11:24 +0100
Subject: [PATCH] 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.

---
Cc: [email protected]

v4:
1. Don't differentiate "no vnuma" from "empty vnuma".
2. Use ret to store xc function call return value.

v3:
1. Update manpage, code comment and commit message.
2. *Don't* check if nomigrate is set.

---
 docs/man/xl.cfg.pod.5   |  2 ++
 tools/libxl/libxl_dom.c | 18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)
docs/man/xl.cfg.pod.5 +2 -0
index c6345b8..157c855 100644
@@ -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 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).
tools/libxl/libxl_dom.c +17 -1
index c2518a3..905dc5a 100644
@@ -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,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".
+     */
+    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;
Signature · 1 line
2.1.4
Acked-by
#8 lore raw

Re: [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

Quoted 43 lines · Wei Liu
Quoted 18 lines · Ian Campbell

On Fri, 2015-09-11 at 15:14 +0100, Wei Liu wrote:

(quoted diff) +0 -0
@@ -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);
Quoted 10 lines

+ /* Disallow saving a guest with vNUMA configured because
migration

tools/libxl/libxl_dom.c +3 -0
+     * stream does not preserve node information.
+     *
+     * Do not differentiate "no vnuma configuration" from "empty

vnuma

tools/libxl/libxl_dom.c +3 -0
+     * configuration".
+     */
+    rc = xc_domain_getvnuma(CTX->xch, domid, &nr_vnodes,
Quoted 2 lines

&nr_vmemranges,
+ &nr_vcpus, NULL, NULL, NULL);

Quoted 4 lines

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.

My bad. Should have noticed that earlier.

Quoted 7 lines

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.

Add a new variable called ret to store return value from xc function call. Here is the patch.

---8<---
From c2e9567fa0c5a00405d3759321c9eefb8ec049fc Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Wed, 9 Sep 2015 17:11:24 +0100
Subject: [PATCH] xl/libxl: disallow saving a guest with vNUMA configured

Quoted 6 lines

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.

Quoted 20 lines

---
Cc: [email protected]

v4:
1. Don't differentiate "no vnuma" from "empty vnuma".
2. Use ret to store xc function call return value.

v3:
1. Update manpage, code comment and commit message.
2. *Don't* check if nomigrate is set.

---
 docs/man/xl.cfg.pod.5   |  2 ++
 tools/libxl/libxl_dom.c | 18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)
docs/man/xl.cfg.pod.5 +0 -0
index c6345b8..157c855 100644

docs/man/xl.cfg.pod.5 virtual node. · line 266

Quoted 4 lines
docs/man/xl.cfg.pod.5 +1 -0
@@ -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

I _think_ (but am not 100% sure) that in the sense you mean it is "Furthermore". I don't think "Further more," actually means anything.

I can fix as I commit.

@@ -1636,6 +1638,20 @@ void libxl__domain_save(libxl__egc *egc,

docs/man/xl.cfg.pod.5 virtual node.

Quoted 9 lines
docs/man/xl.cfg.pod.5 +5 -0
 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".

Actually, we do differentiate, since we are checking for one explicitly. What we are not differentiating is "vnuma enabled and configured" vs "numa enabled but not configured", or something.

How about:

* Reject any domain which has vnuma enabled, even if the configuration is
* empty. Only domains which have no vnuma configuration at all are
* supported.
*/

as the second paragraph of the comment?

I can do that on commit too.

Ian.

author
#9 lore raw

Re: [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

Quoted 74 lines · Ian Campbell
Quoted 43 lines · Wei Liu
Quoted 18 lines · Ian Campbell

On Fri, 2015-09-11 at 15:14 +0100, Wei Liu wrote:

(quoted diff) +0 -0
@@ -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);
Quoted 10 lines

+ /* Disallow saving a guest with vNUMA configured because
migration

tools/libxl/libxl_dom.c +3 -0
+     * stream does not preserve node information.
+     *
+     * Do not differentiate "no vnuma configuration" from "empty

vnuma

tools/libxl/libxl_dom.c +3 -0
+     * configuration".
+     */
+    rc = xc_domain_getvnuma(CTX->xch, domid, &nr_vnodes,
Quoted 2 lines

&nr_vmemranges,
+ &nr_vcpus, NULL, NULL, NULL);

Quoted 4 lines

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.

My bad. Should have noticed that earlier.

Quoted 7 lines

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.

Add a new variable called ret to store return value from xc function call. Here is the patch.

---8<---
From c2e9567fa0c5a00405d3759321c9eefb8ec049fc Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Wed, 9 Sep 2015 17:11:24 +0100
Subject: [PATCH] xl/libxl: disallow saving a guest with vNUMA configured

Quoted 6 lines

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.

Quoted 21 lines

---
Cc: [email protected]

v4:
1. Don't differentiate "no vnuma" from "empty vnuma".
2. Use ret to store xc function call return value.

v3:
1. Update manpage, code comment and commit message.
2. *Don't* check if nomigrate is set.

---
 docs/man/xl.cfg.pod.5   |  2 ++
 tools/libxl/libxl_dom.c | 18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)
docs/man/xl.cfg.pod.5 +0 -0
index c6345b8..157c855 100644
@@ -263,6 +263,8 @@ virtual node.
 
Quoted 9 lines

docs/man/xl.cfg.pod.5 virtual node. · line 266

Quoted 3 lines
docs/man/xl.cfg.pod.5 +1 -0
 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

I _think_ (but am not 100% sure) that in the sense you mean it is "Furthermore". I don't think "Further more," actually means anything.

I can fix as I commit.

Yes please.

Quoted 15 lines
(quoted diff) +0 -0
@@ -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);

docs/man/xl.cfg.pod.5 virtual node.

Quoted 6 lines
docs/man/xl.cfg.pod.5 +5 -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".

Actually, we do differentiate, since we are checking for one explicitly. What we are not differentiating is "vnuma enabled and configured" vs "numa enabled but not configured", or something.

Quoted 9 lines

How about:

* Reject any domain which has vnuma enabled, even if the configuration is
* empty. Only domains which have no vnuma configuration at all are
* supported.
*/

as the second paragraph of the comment?

OK.

Quoted 2 lines

I can do that on commit too.

That would be good.

Wei.

Quoted 1 line

Ian.

#10 lore raw

Re: [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

Quoted 11 lines · Wei Liu
Quoted 9 lines
Quoted 3 lines

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

I _think_ (but am not 100% sure) that in the sense you mean it is "Furthermore". I don't think "Further more," actually means anything.

I can fix as I commit.

Yes please.

I went with:
+Furthermore, guests with virtual NUMA cannot be saved or migrated +because the migration stream does not preserve node information.

I've applied all three patches in this series to staging and 4.6. The conflict you mentioned elsewhere (patch #1) was just the presence of
xc_domain_soft_reset in staging but not staging-4.6. I resolved it, I
don't think I can have gotten it wrong, but do check ;-)

Ian.

author
#11 lore raw

Re: [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

Quoted 18 lines · Ian Campbell
Quoted 11 lines · Wei Liu
Quoted 9 lines
Quoted 3 lines

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

I _think_ (but am not 100% sure) that in the sense you mean it is "Furthermore". I don't think "Further more," actually means anything.

I can fix as I commit.

Yes please.

I went with:

(quoted diff) +2 -0
+Furthermore, guests with virtual NUMA cannot be saved or migrated
+because the migration stream does not preserve node information.
Quoted 5 lines

I've applied all three patches in this series to staging and 4.6. The conflict you mentioned elsewhere (patch #1) was just the presence of
xc_domain_soft_reset in staging but not staging-4.6. I resolved it, I
don't think I can have gotten it wrong, but do check ;-)

The backported patch looks correct. Thanks.

Quoted 1 line

Ian.

author
#12 lore raw

PATCH v4 3/3 xl: handle empty vnuma configuration

In reply to Wei Liu

When user specifies vnuma = [], we need to skip the whole parser function, otherwise the parser sets b_info->max_memkb to garbage value.

---
 tools/libxl/xl_cmdimpl.c | 3 +++
 1 file changed, 3 insertions(+)
tools/libxl/xl_cmdimpl.c +3 -0
index c9bd839..bfbd421 100644
@@ -1093,6 +1093,9 @@ static void parse_vnuma_config(const XLU_Config *config,
     if (xlu_cfg_get_list(config, "vnuma", &vnuma, &num_vnuma, 1))
         return;
 
+    if (!num_vnuma)
+        return;
+
     b_info->num_vnuma_nodes = num_vnuma;
     b_info->vnuma_nodes = xcalloc(num_vnuma, sizeof(libxl_vnode_info));
     vcpu_parsed = xcalloc(num_vnuma, sizeof(libxl_bitmap));
Signature · 1 line
2.1.4