qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 0/4] fixes for pci tree


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH RFC 0/4] fixes for pci tree
Date: Sun, 15 Jun 2014 13:00:56 +0300

On Sat, Jun 14, 2014 at 12:48:55PM +0800, Hu Tao wrote:
> Michael,
> 
> This is fixes for your pci tree.
> 
> patch 1 remove signed range as requested.

This also fixes make check failures so I applied this.

Others don't look like regressions to me -
this is error handling in new functionality, correct?
Thus I'll wait for comments on these to be resolved,
and hopefully for some acks.

> 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



reply via email to

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