mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-07 17:24:09 +00:00
This patch extracts information on CPU topology and capability and put them under the `/acrn-config/processors` node in the board XML. The added information can be divided into two categories. 1. The topology of CPUs like the following. Each thread (which is a leaf node in the topology) contains its addresses (i.e. CPU ID, APIC ID, x2APIC ID) and model identifiers (i.e. family, model, stepping IDs, core types and native model ID). <die id="0"> <core id="0x0"> <thread id="0x0"> <cpu_id>0</cpu_id> <apic_id>0x0</apic_id> <x2apic_id>0x0</x2apic_id> <family_id>0x6</family_id> <model_id>0x9e</model_id> <stepping_id>0x9</stepping_id> <core_type></core_type> <native_model_id></native_model_id> </thread> <thread id="0x1"> ... </thread> </core> <core id="0x1"> <thread id="0x2"> ... </thread> <thread id="0x3"> ... </thread> </core> <core id="0x2"> <thread id="0x4"> ... </thread> <thread id="0x5"> ... </thread> </core> <core id="0x3"> <thread id="0x6"> ... </thread> <thread id="0x7"> ... </thread> </core> </die> 2. The CPU models identified by the quadruple (family_id, model_id, core_type, native_model_id). Each model is described by its brandstring and capabilities, both of which are fetched from CPUID leaves. <model description="Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz"> <family_id>0x6</family_id> <model_id>0x9e</model_id> <core_type></core_type> <native_model_id></native_model_id> <capability id="sse3"/> <capability id="pclmulqdq"/> <capability id="dtes64"/> <capability id="monitor"/> ... </model> Tracked-On: #5922 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
board_parser.py will collect all board related info and then generate a board info file for acrn-config host tool usage. usage: python3 run.py <board_name> [--out board_info_file] board_name : the name of board that run ACRN hypervisor, like apl-up2/nuc7i7dnb. It will be used as name of the board configurations folder which created by acrn-config host tool. board_info_file : (optional) the name of board info file. if it is not specified, a name of <board_name>.xml will be generated under the current working directory by default. Please run this script under native Linux environment with root privilege. OS requirement: Release: Ubuntu 18.04+ or ClearLinux 30210+ Tools: cpuid, rdmsr, lspci, dmidecode kernel cmdline: "idle=nomwait intel_idle.max_cstate=0 intel_pstate=disable"