This is very similar to the previous commit, but fixes the case
where there are no CGroups (or are disabled by admin) and thus
libvirt calls mbind() before exec()-ing QEMU.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_process.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 6b85b7cee7..0fafda0beb 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3106,10 +3106,8 @@ struct qemuProcessHookData {
static int qemuProcessHook(void *data)
{
struct qemuProcessHookData *h = data;
- qemuDomainObjPrivate *priv = h->vm->privateData;
int ret = -1;
int fd;
- virBitmap *nodeset = NULL;
virDomainNumatuneMemMode mode;
/* This method cannot use any mutexes, which are not
@@ -3154,8 +3152,9 @@ static int qemuProcessHook(void *data)
* and enabled in the config) rather than virNuma*. */
VIR_DEBUG("Relying on CGroups for memory binding");
} else {
- nodeset = virDomainNumatuneGetNodeset(h->vm->def->numa,
- priv->autoNodeset, -1);
+ g_autoptr(virBitmap) nodeset = NULL;
+
+ qemuDomainNumatuneMaybeFormatNodesetUnion(h->vm, &nodeset, NULL);
if (virNumaSetupMemoryPolicy(mode, nodeset) < 0)
goto cleanup;
--
2.39.3