[libvirt] [PATCH 3/4] parallels: prevent domain define only if NUMA is really specified

Maxim Nestratov mnestratov at parallels.com
Tue Mar 10 20:12:21 UTC 2015


Signed-off-by: Maxim Nestratov <mnestratov at parallels.com>
---
 src/parallels/parallels_sdk.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
index 5a3969e..4ec9161 100644
--- a/src/parallels/parallels_sdk.c
+++ b/src/parallels/parallels_sdk.c
@@ -1816,7 +1816,15 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def)
         return -1;
     }
 
-    if (def->numa) {
+
+    /*
+     * Though we don't support NUMA configuration at the moment
+     * virDomainDefPtr always contain non zero NUMA configuration
+     * So, just make sure this configuration does't differ from auto generated.
+     */
+    if ((virDomainNumatuneGetMode(def->numa, -1) !=
+         VIR_DOMAIN_NUMATUNE_MEM_STRICT) ||
+         virDomainNumatuneHasPerNodeBinding(def->numa)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                         _("numa parameters are not supported "
                           "by parallels driver"));
-- 
1.7.1




More information about the libvir-list mailing list