hostmem: fix QEMU crash by 'info memdev'
commit1454d33f0507cb54d62ed80f494884157c9e7130
authorXiao Guangrong <guangrong.xiao@linux.intel.com>
Wed, 13 Jul 2016 04:18:05 +0000 (13 12:18 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Jul 2016 11:30:04 +0000 (13 13:30 +0200)
tree92d9d3c6bc0b64f46af8ac68124c1b8aa7366448
parentaa5cb7f5e8bf2e6737d0cb36c118332ca26e7797
hostmem: fix QEMU crash by 'info memdev'

'info memdev' crashes QEMU:
   (qemu) info memdev
   Unexpected error in parse_str() at qapi/string-input-visitor.c:111:
   Parameter 'null' expects an int64 value or range
It is caused by null uint16List is returned if 'host-nodes' is the default
value

Return MAX_NODES under this case to fix this bug

Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
backends/hostmem.c