On Fri, May 04, 2018 at 10:37:48AM +0200, Igor Mammedov wrote:
> Command is allowed to run only in preconfig stage and
> will allow to configure numa mapping for CPUs depending
> on possible CPUs layout (query-hotpluggable-cpus) for
> given machine instance.
>
> Example of configuration session:
> $QEMU -smp 2 --preconfig ...
>
> QMP:
> -> {'execute': 'query-hotpluggable-cpus' }
> <- {'return': [
> {'props': {'core-id': 0, 'thread-id': 0, 'socket-id': 1}, ... },
> {'props': {'core-id': 0, 'thread-id': 0, 'socket-id': 0}, ... }
> ]}
>
> -> {'execute': 'set-numa-node', 'arguments': { 'type': 'node', 'nodeid': 0 } }
> <- {'return': {}}
> -> {'execute': 'set-numa-node', 'arguments': { 'type': 'cpu',
> 'node-id': 0, 'core-id': 0, 'thread-id': 0, 'socket-id': 1, }
> }
> <- {'return': {}}
>
> -> {'execute': 'set-numa-node', 'arguments': { 'type': 'node', 'nodeid': 1 } }
> -> {'execute': 'set-numa-node', 'arguments': { 'type': 'cpu',
> 'node-id': 1, 'core-id': 0, 'thread-id': 0, 'socket-id': 0 }
> }
> <- {'return': {}}
>
> -> {'execute': 'query-hotpluggable-cpus' }
> <- {'return': [
> {'props': {'core-id': 0, 'thread-id': 0, 'node-id': 0, 'socket-id':
> 1}, ... },
> {'props': {'core-id': 0, 'thread-id': 0, 'node-id': 1, 'socket-id':
> 0}, ... }
> ]}
>
> Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
I suggest sending a test case as a follow-up patch.
--
Eduardo