Daniel P. Berrangé 7b79ee2f78 hostcpu: add support for reporting die_id in NUMA topology
Update the host CPU code to report the die_id in the NUMA topology
capabilities. On systems with multiple dies, this fixes the bug
where CPU cores can't be distinguished:

 <cpus num='12'>
   <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
   <cpu id='1' socket_id='0' core_id='1' siblings='1'/>
   <cpu id='2' socket_id='0' core_id='0' siblings='2'/>
   <cpu id='3' socket_id='0' core_id='1' siblings='3'/>
 </cpus>

Notice how core_id is repeated within the scope of the same socket_id.

It now reports

 <cpus num='12'>
   <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
   <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
   <cpu id='2' socket_id='0' die_id='1' core_id='0' siblings='2'/>
   <cpu id='3' socket_id='0' die_id='1' core_id='1' siblings='3'/>
 </cpus>

So core_id is now unique within a (socket_id, die_id) pair.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-16 15:11:55 +00:00
..
2016-11-21 13:15:12 +01:00
2019-11-05 12:12:14 +01:00
2019-06-20 17:01:44 +02:00
2019-08-29 12:46:33 +01:00
2017-10-16 10:22:34 +01:00
2019-12-20 12:25:42 -05:00
2019-12-20 12:25:42 -05:00
2019-04-09 16:59:49 +02:00
2019-12-23 10:08:05 +00:00
2019-08-28 13:39:26 +02:00
2019-12-20 12:25:42 -05:00
2018-12-17 17:52:46 +01:00
2019-12-04 15:48:28 +00:00
2017-08-02 15:00:28 -04:00
2019-07-09 10:42:39 -05:00