diff options
author | Igor Mammedov <imammedo@redhat.com> | 2020-04-30 11:46:06 -0400 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2020-06-09 21:25:14 -0500 |
commit | 34c78a4100c967cc385fcfd4c2295b2b0ebd8786 (patch) | |
tree | 89169dc78a803a5b58100d41b1ee87c508b69c5a /qapi/qobject-output-visitor.c | |
parent | 8d127b4be723837a8e33fbc9173bc5cd95b4242f (diff) | |
download | qemu-34c78a4100c967cc385fcfd4c2295b2b0ebd8786.zip qemu-34c78a4100c967cc385fcfd4c2295b2b0ebd8786.tar.gz qemu-34c78a4100c967cc385fcfd4c2295b2b0ebd8786.tar.bz2 |
hostmem: don't use mbind() if host-nodes is empty
Since 5.0 QEMU uses hostmem backend for allocating main guest RAM.
The backend however calls mbind() which is typically NOP
in case of default policy/absent host-nodes bitmap.
However when runing in container with black-listed mbind()
syscall, QEMU fails to start with error
"cannot bind memory to host NUMA nodes: Operation not permitted"
even when user hasn't provided host-nodes to pin to explictly
(which is the case with -m option)
To fix issue, call mbind() only in case when user has provided
host-nodes explicitly (i.e. host_nodes bitmap is not empty).
That should allow to run QEMU in containers with black-listed
mbind() without memory pinning. If QEMU provided memory-pinning
is required user still has to white-list mbind() in container
configuration.
Reported-by: Manuel Hohmann <mhohmann@physnet.uni-hamburg.de>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200430154606.6421-1-imammedo@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
(cherry picked from commit 70b6d525dfb51d5e523d568d1139fc051bc223c5)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qapi/qobject-output-visitor.c')
0 files changed, 0 insertions, 0 deletions