arch-x86: Assign thread context id to APIC id
This change tries to enable a unique APIC id for a single thread to enable smt support for x86 Change-Id: I3e7034b358623577c5ad4be3e51f08e48291ce49 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35837 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -317,7 +317,8 @@ X86ISA::Interrupts::setThreadContext(ThreadContext *_tc)
|
||||
|
||||
BaseInterrupts::setThreadContext(_tc);
|
||||
|
||||
initialApicId = tc->cpuId();
|
||||
// Update APIC ID to consider SMT threads
|
||||
initialApicId = tc->contextId();
|
||||
regs[APIC_ID] = (initialApicId << 24);
|
||||
pioAddr = x86LocalAPICAddress(initialApicId, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user