Michael, This is fixes for your pci tree.
patch 1 remove signed range as requested. There are 3 problems in current pci tree, as follows: 1. pc-dimm specified on command line but only -m size (aka not -m size,maxmem,slots) ./x86_64-softmmu/qemu-system-x86_64 -hda /home/data/libvirt-images/f18.img -smp 2 -object memory-backend-ram,size=512M,id=ram-node0,prealloc=y,policy=bind,host-nodes=0 -device pc-dimm,id=d0,memdev=ram-node0 -m 640M -qmp unix:/tmp/m,server,nowait -monitor stdio -enable-kvm result: qemu/hw/mem/pc-dimm.c:110: pc_dimm_get_free_addr: Assertion `address_space_end > address_space_size' failed. Aborted (core dumped) patch 2 fixes this. 2. using qemu monitor command object-add to add a memory-backend-ram object whose's size is too big ./x86_64-softmmu/qemu-system-x86_64 -hda /home/data/libvirt-images/f18.img -smp 2 -m 512M -qmp unix:/tmp/m,server,nowait -monitor stdio -enable-kvm in monitor: (qemu)object_add memory-backend-ram,size=40960G,id=mem0 result: qemu just exits with message: Cannot set up guest memory 'mem0': Cannot allocate memory patch 3 fixes this. 3. specifying a non-existing directory for memory-backend-file ./x86_64-softmmu/qemu-system-x86_64 -hda /home/data/libvirt-images/f18.img -smp 2 -m 512M,maxmem=1000G,slots=100 -qmp unix:/tmp/m,server,nowait -monitor stdio -enable-kvm -object memory-backend-file,size=512M,id=mem0,mem-path=/nonexistingdir -device pc-dimm,id=d0,memdev=mem0 result: /nonexistingdir: No such file or directory Bad ram offset fffffffffffff000 Aborted (core dumped) patch 4 fixes this. please review. Thanks! Hu Tao (4): get rid of signed range check if we have space left for hotplugged memory exec: don't exit unconditionally if failed to allocate memory memory-backend-file: error out if failed to allocate memory backends/hostmem-file.c | 3 + backends/hostmem-ram.c | 3 + exec.c | 6 +- hw/mem/pc-dimm.c | 7 +- include/qemu/range.h | 144 ++++++++++++------------------------- qapi/string-input-visitor.c | 116 +++++++++++++++++------------- qapi/string-output-visitor.c | 97 +++++++++++++------------ tests/test-string-input-visitor.c | 4 +- tests/test-string-output-visitor.c | 8 +-- 9 files changed, 182 insertions(+), 206 deletions(-) -- 1.9.3