mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
ppc: Add has_smt_siblings property to CPUPPCState
The decision to branch out to a slower SMT path in instruction emulation will become a bit more complicated with the way that "big-core" topology that will be implemented in subsequent changes. Hide these details from the wider CPU emulation code with a bool has_smt_siblings flag that can be set by machine initialisation. Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
This commit is contained in:
parent
50d8cfb949
commit
59c921f229
3 changed files with 14 additions and 4 deletions
|
@ -288,6 +288,9 @@ static void pnv_core_realize(DeviceState *dev, Error **errp)
|
|||
cpu = POWERPC_CPU(obj);
|
||||
|
||||
pc->threads[i] = POWERPC_CPU(obj);
|
||||
if (cc->nr_threads > 1) {
|
||||
cpu->env.has_smt_siblings = true;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "thread[%d]", i);
|
||||
object_property_add_child(OBJECT(pc), name, obj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue