81caa93 fixes topology enumeration on both Intel and AMD (tested on QEMU), so that we can now actually get hwthread, physical core, and socket IDs for a Nautilus CPU. AMD is still not fully functional, but it should work on <= latest Opteron systems.
32eb02e adds a convenience API on top of this information. One can now easily get hwthread/core/socket ID of a given CPU or thread, and map functions to siblings within those units. Two tests within the shell now demonstrate this, cputopotest and threadtopotest.
The newer EPYC systems are going to require some rethought of this due to their divergence from Intel on package organization.
This pull request has two components:
The newer EPYC systems are going to require some rethought of this due to their divergence from Intel on package organization.