On 06/09/2014 04:25 AM, Hu Tao wrote:
> From: Wanlong Gao <gaowanl...@cn.fujitsu.com>
> 
> If the total number of the assigned numa nodes memory is not
> equal to the assigned ram size, it will write the wrong data
> to ACPI table, then the guest will ignore the wrong ACPI table
> and recognize all memory to one node. It's buggy, we should
> check it to ensure that we write the right data to ACPI table.
> 
> Signed-off-by: Wanlong Gao <gaowanl...@cn.fujitsu.com>
> Reviewed-by: Eduardo Habkost <ehabk...@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> Signed-off-by: Hu Tao <hu...@cn.fujitsu.com>
> ---
>  numa.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 

> +        if (numa_total != ram_size) {
> +            error_report("qemu: total memory size for NUMA nodes (%" PRIu64 
> ")"
> +                         " should equal to RAM size (" RAM_ADDR_FMT ")\n",

error_report() should not include trailing \n

> +                         numa_total, ram_size);
> +            exit(1);

Not your fault that this file is full of exit(1), but it would be nice
to have a cleanup patch someday that uses EXIT_FAILURE.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to