mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-04-01 23:07:03 +00:00
i386: Add die-level cpu topology to x86CPU on PCMachine
The die-level as the first PC-specific cpu topology is added to the leagcy cpu topology model, which has one die per package implicitly and only the numbers of sockets/cores/threads are configurable. In the new model with die-level support, the total number of logical processors (including offline) on board will be calculated as: \#cpus = #sockets * #dies * #cores * #threads and considering compatibility, the default value for #dies would be initialized to one in x86_cpu_initfn() and pc_machine_initfn(). Backports commit c26ae610811e8d52f4fc73e3ae0a8bc4a24d6763 from qemu
This commit is contained in:
parent
1f4c3d6bcc
commit
efd887b992
|
@ -4803,6 +4803,7 @@ static void x86_cpu_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
|||
X86CPUClass *xcc = X86_CPU_GET_CLASS(uc, obj);
|
||||
CPUX86State *env = &cpu->env;
|
||||
|
||||
env->nr_dies = 1;
|
||||
cpu_set_cpustate_pointers(cpu);
|
||||
cpu_exec_init(cs, &error_abort, opaque);
|
||||
|
||||
|
|
|
@ -1298,6 +1298,8 @@ typedef struct CPUX86State {
|
|||
|
||||
TPRAccess tpr_access_type;
|
||||
|
||||
unsigned nr_dies;
|
||||
|
||||
// Unicorn engine
|
||||
struct uc_struct *uc;
|
||||
} CPUX86State;
|
||||
|
|
Loading…
Reference in a new issue