diff options
author | Greg Kurz <groug@kaod.org> | 2016-07-19 10:28:35 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-08-02 12:03:58 +0200 |
commit | 0b21757124d200ff86100a3bc7bb5f81521b42c4 (patch) | |
tree | c47cb4c96bf7ff50caf07f44f2ec89c2c9c43dd7 /backends/hostmem.c | |
parent | 34506b30e4210b417aa38d1518aa2c53fb7cf39b (diff) | |
download | qemu-0b21757124d200ff86100a3bc7bb5f81521b42c4.zip qemu-0b21757124d200ff86100a3bc7bb5f81521b42c4.tar.gz qemu-0b21757124d200ff86100a3bc7bb5f81521b42c4.tar.bz2 |
numa: set the memory backend "is_mapped" field
Commit 2aece63 "hostmem: detect host backend memory is being used properly"
added a way to know if a memory backend is busy or available for use. It
caused a slight regression if we pass the same backend to a NUMA node and
to a pc-dimm device:
-m 1G,slots=2,maxmem=2G \
-object memory-backend-ram,size=1G,id=mem-mem1 \
-device pc-dimm,id=dimm-mem1,memdev=mem-mem1 \
-numa node,nodeid=0,memdev=mem-mem1
Before commit 2aece63, this would cause QEMU to print an error message and
to exit gracefully:
qemu-system-ppc64: -device pc-dimm,id=dimm-mem1,memdev=mem-mem1:
can't use already busy memdev: mem-mem1
Since commit 2aece63, QEMU hits an assertion in the memory code:
qemu-system-ppc64: memory.c:1934: memory_region_add_subregion_common:
Assertion `!subregion->container' failed.
Aborted
This happens because pc-dimm devices don't use memory_region_is_mapped()
anymore and cannot guess the backend is already used by a NUMA node.
Let's revert to the previous behavior by turning the NUMA code to also
call host_memory_backend_set_mapped() when it uses a backend.
Fixes: 2aece63c8a9d2c3a8ff41d2febc4cdeff2633331
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <146891691503.15642.9817215371777203794.stgit@bahia.lan>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'backends/hostmem.c')
0 files changed, 0 insertions, 0 deletions