Re: [Qemu-devel] memory hotplug fails with mem-merge option

2015-07-17 Thread Marcel Apfelbaum

On 07/16/2015 03:24 PM, Igor Mammedov wrote:

On Thu, 16 Jul 2015 16:00:07 +0530
Bharata B Rao bhar...@linux.vnet.ibm.com wrote:


On Thu, Jul 16, 2015 at 10:25:09AM +0530, Bharata B Rao wrote:

Hi,

When I use -machine pc,mem-merge=off|on -m 1G,slots=4,maxmem=2G, adding
memory-backend-ram object fails like below. Same failure is seen with
-machine pseries,mem-merge=on|off.

(qemu) object_add memory-backend-ram,id=ram0,size=1G

qemu-system-x86_64: util/qemu-option.c:388: qemu_opt_get_bool_helper: Assertion `opt-desc 
 opt-desc-type == QEMU_OPT_BOOL' failed.


Same failure seen with -machine pseries,mem-merge=off when used together with
-object memory-backend-file on QEMU commandline in which case boot time
failure is observed.

Regards,
Bharata.


looks like related to

0a7cf217 util/qemu-config: fix regression of qmp_query_command_line_options
and
49d2e64 machine: remove qemu_machine_opts global list

CCing Marcel in hope he knows how to fix it right away.

Hi,

Can you please check that Eduardo's patch fixes this?
[PATCH] hostmem: Fix qemu_opt_get_bool() crash in host_memory_backend_init()
https://www.mail-archive.com/qemu-devel@nongnu.org/msg310915.html

Thanks,
Marcel








Re: [Qemu-devel] memory hotplug fails with mem-merge option

2015-07-17 Thread Bharata B Rao
On Fri, Jul 17, 2015 at 10:26:16AM +0300, Marcel Apfelbaum wrote:
 On 07/16/2015 03:24 PM, Igor Mammedov wrote:
 On Thu, 16 Jul 2015 16:00:07 +0530
 Bharata B Rao bhar...@linux.vnet.ibm.com wrote:
 
 On Thu, Jul 16, 2015 at 10:25:09AM +0530, Bharata B Rao wrote:
 Hi,
 
 When I use -machine pc,mem-merge=off|on -m 1G,slots=4,maxmem=2G, adding
 memory-backend-ram object fails like below. Same failure is seen with
 -machine pseries,mem-merge=on|off.
 
 (qemu) object_add memory-backend-ram,id=ram0,size=1G
 
 qemu-system-x86_64: util/qemu-option.c:388: qemu_opt_get_bool_helper: 
 Assertion `opt-desc  opt-desc-type == QEMU_OPT_BOOL' failed.
 
 Same failure seen with -machine pseries,mem-merge=off when used together 
 with
 -object memory-backend-file on QEMU commandline in which case boot time
 failure is observed.
 
 Regards,
 Bharata.
 
 looks like related to
 
 0a7cf217 util/qemu-config: fix regression of qmp_query_command_line_options
 and
 49d2e64 machine: remove qemu_machine_opts global list
 
 CCing Marcel in hope he knows how to fix it right away.
 Hi,
 
 Can you please check that Eduardo's patch fixes this?
 [PATCH] hostmem: Fix qemu_opt_get_bool() crash in 
 host_memory_backend_init()
 https://www.mail-archive.com/qemu-devel@nongnu.org/msg310915.html

Yes, this fixes the problem.

Regards,
Bharata.




Re: [Qemu-devel] memory hotplug fails with mem-merge option

2015-07-16 Thread Bharata B Rao
On Thu, Jul 16, 2015 at 10:25:09AM +0530, Bharata B Rao wrote:
 Hi,
 
 When I use -machine pc,mem-merge=off|on -m 1G,slots=4,maxmem=2G, adding
 memory-backend-ram object fails like below. Same failure is seen with
 -machine pseries,mem-merge=on|off.
 
 (qemu) object_add memory-backend-ram,id=ram0,size=1G
 
 qemu-system-x86_64: util/qemu-option.c:388: qemu_opt_get_bool_helper: 
 Assertion `opt-desc  opt-desc-type == QEMU_OPT_BOOL' failed.

Same failure seen with -machine pseries,mem-merge=off when used together with
-object memory-backend-file on QEMU commandline in which case boot time
failure is observed.

Regards,
Bharata.




Re: [Qemu-devel] memory hotplug fails with mem-merge option

2015-07-16 Thread Igor Mammedov
On Thu, 16 Jul 2015 16:00:07 +0530
Bharata B Rao bhar...@linux.vnet.ibm.com wrote:

 On Thu, Jul 16, 2015 at 10:25:09AM +0530, Bharata B Rao wrote:
  Hi,
  
  When I use -machine pc,mem-merge=off|on -m 1G,slots=4,maxmem=2G, adding
  memory-backend-ram object fails like below. Same failure is seen with
  -machine pseries,mem-merge=on|off.
  
  (qemu) object_add memory-backend-ram,id=ram0,size=1G
  
  qemu-system-x86_64: util/qemu-option.c:388: qemu_opt_get_bool_helper: 
  Assertion `opt-desc  opt-desc-type == QEMU_OPT_BOOL' failed.
 
 Same failure seen with -machine pseries,mem-merge=off when used together with
 -object memory-backend-file on QEMU commandline in which case boot time
 failure is observed.
 
 Regards,
 Bharata.

looks like related to 

0a7cf217 util/qemu-config: fix regression of qmp_query_command_line_options
and
49d2e64 machine: remove qemu_machine_opts global list

CCing Marcel in hope he knows how to fix it right away.



[Qemu-devel] memory hotplug fails with mem-merge option

2015-07-15 Thread Bharata B Rao
Hi,

When I use -machine pc,mem-merge=off|on -m 1G,slots=4,maxmem=2G, adding
memory-backend-ram object fails like below. Same failure is seen with
-machine pseries,mem-merge=on|off.

(qemu) object_add memory-backend-ram,id=ram0,size=1G

qemu-system-x86_64: util/qemu-option.c:388: qemu_opt_get_bool_helper: Assertion 
`opt-desc  opt-desc-type == QEMU_OPT_BOOL' failed.

Program received signal SIGABRT, Aborted.
0x75b0b8d7 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x75b0b8d7 in raise () from /lib64/libc.so.6
#1  0x75b0d53a in abort () from /lib64/libc.so.6
#2  0x75b0447d in __assert_fail_base () from /lib64/libc.so.6
#3  0x75b04532 in __assert_fail () from /lib64/libc.so.6
#4  0x559a65f5 in qemu_opt_get_bool_helper (opts=0x562f8cf0, 
name=0x559dbb82 mem-merge, defval=true, del=false) at 
util/qemu-option.c:388
#5  0x559a6661 in qemu_opt_get_bool (opts=0x562f8cf0, 
name=0x559dbb82 mem-merge, defval=true) at util/qemu-option.c:398
#6  0x55764878 in host_memory_backend_init (obj=0x57101a90)
at backends/hostmem.c:226
#7  0x558b463c in object_init_with_type (obj=0x57101a90, 
ti=0x562b8b20)
at qom/object.c:314
#8  0x558b461e in object_init_with_type (obj=0x57101a90, 
ti=0x562b8d00)
at qom/object.c:310
#9  0x558b47e9 in object_initialize_with_type (data=0x57101a90, 
size=344, 
type=0x562b8d00) at qom/object.c:344
#10 0x558b4b50 in object_new_with_type (type=0x562b8d00) at 
qom/object.c:430
#11 0x558b4b8d in object_new (typename=0x570892c0 
memory-backend-ram)
at qom/object.c:440
#12 0x5574eea0 in object_add (type=0x570892c0 memory-backend-ram, 
id=0x577f7fc0 ram0, qdict=0x57884420, v=0x575b3d60, 
errp=0x7fffcab8)
at qmp.c:629
#13 0x55753ab8 in hmp_object_add (mon=0x5633fec0, 
qdict=0x57883400)
at hmp.c:1638
#14 0x55628223 in handle_hmp_command (mon=0x5633fec0, 
cmdline=0x5637513b memory-backend-ram,id=ram0,size=1G)
at /home/bharata/work/powerkvm/frobisher/qemu-mainline/qemu/monitor.c:4058
#15 0x5562a992 in monitor_command_cb (opaque=0x5633fec0, 
cmdline=0x56375130 object_add memory-backend-ram,id=ram0,size=1G, 
readline_opaque=0x0)
at /home/bharata/work/powerkvm/frobisher/qemu-mainline/qemu/monitor.c:5081
#16 0x559aa3ca in readline_handle_byte (rs=0x56375130, ch=13)
at util/readline.c:391
#17 0x5562a8ec in monitor_read (opaque=0x5633fec0, 
buf=0x7fffcc50 \r\314\377\377\377\177, size=1)
at /home/bharata/work/powerkvm/frobisher/qemu-mainline/qemu/monitor.c:5064
#18 0x557295d0 in qemu_chr_be_write (s=0x5630b690, 
buf=0x7fffcc50 \r\314\377\377\377\177, len=1) at qemu-char.c:306
#19 0x5572d9a9 in tcp_chr_read (chan=0x57699f80, cond=G_IO_IN, 
opaque=0x5630b690) at qemu-char.c:2870
#20 0x760e5aeb in g_main_context_dispatch () from 
/lib64/libglib-2.0.so.0
#21 0x558fe14a in glib_pollfds_poll () at main-loop.c:199
#22 0x558fe227 in os_host_main_loop_wait (timeout=1810450) at 
main-loop.c:244
#23 0x558fe2e6 in main_loop_wait (nonblocking=0) at main-loop.c:493
#24 0x557360d9 in main_loop () at vl.c:1902
#25 0x5573e0c6 in main (argc=20, argv=0x7fffe198, 
envp=0x7fffe240)
at vl.c:4653