Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/35837?usp=email )

Change subject: arch-x86: Assign thread context id to APIC id
......................................................................

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...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/x86/interrupts.cc
1 file changed, 18 insertions(+), 1 deletion(-)

Approvals:
  kokoro: Regressions pass
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved




diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc
index 74df9ab..bfea600 100644
--- a/src/arch/x86/interrupts.cc
+++ b/src/arch/x86/interrupts.cc
@@ -317,7 +317,8 @@

     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);
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/35837?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I3e7034b358623577c5ad4be3e51f08e48291ce49
Gerrit-Change-Number: 35837
Gerrit-PatchSet: 10
Gerrit-Owner: Ayaz Akram <yazak...@ucdavis.edu>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org

Reply via email to