qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 70b6d5: hostmem: don't use mbind() if host-no


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 70b6d5: hostmem: don't use mbind() if host-nodes is empty
Date: Tue, 02 Jun 2020 05:30:28 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 70b6d525dfb51d5e523d568d1139fc051bc223c5
      
https://github.com/qemu/qemu/commit/70b6d525dfb51d5e523d568d1139fc051bc223c5
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2020-05-12 (Tue, 12 May 2020)

  Changed paths:
    M backends/hostmem.c

  Log Message:
  -----------
  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>


  Commit: cccdd8c7971896c339d59c9c5d4647d4ffd9568a
      
https://github.com/qemu/qemu/commit/cccdd8c7971896c339d59c9c5d4647d4ffd9568a
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-06-02 (Tue, 02 Jun 2020)

  Changed paths:
    M backends/hostmem.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/ehabkost/tags/machine-next-pull-request' into staging

machine queue, 2020-05-13

Bug fixes:
* hostmem: don't use mbind() if host-nodes is empty (Igor Mammedov)

# gpg: Signature made Wed 13 May 2020 15:00:25 BST
# gpg:                using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
# gpg:                issuer "ehabkost@redhat.com"
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full]
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/machine-next-pull-request:
  hostmem: don't use mbind() if host-nodes is empty

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/853a60b87024...cccdd8c79718



reply via email to

[Prev in Thread] Current Thread [Next in Thread]