qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for pr


From: Eric Blake
Subject: Re: [Qemu-ppc] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping
Date: Wed, 3 May 2017 11:39:10 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 05/03/2017 11:35 AM, Eduardo Habkost wrote:

>> +
>> +        memset(&cpu, 0, sizeof(cpu));
>> +        cpu.has_node_id = object->u.cpu.has_node_id;
>> +        cpu.node_id = object->u.cpu.node_id;
>> +        cpu.has_socket_id = object->u.cpu.has_socket_id;
>> +        cpu.socket_id = object->u.cpu.socket_id;
>> +        cpu.has_core_id = object->u.cpu.has_core_id;
>> +        cpu.core_id = object->u.cpu.core_id;
>> +        cpu.has_thread_id = object->u.cpu.has_thread_id;
>> +        cpu.thread_id = object->u.cpu.thread_id;
> 
> We don't have a way to avoid copying each field individually?
> Some visitor trick, maybe?
> 
> Eric, Markus, Michael, do you have any suggestions?

Markus just added QAPI_CLONE_MEMBERS(), which sounds like what you want:

https://lists.gnu.org/archive/html/qemu-devel/2017-04/msg04867.html

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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