From 21df40497c89fba6a0c9d7138930c46937ef5fea Mon Sep 17 00:00:00 2001 From: Jason Lowe-Power Date: Thu, 3 Sep 2020 08:21:14 -0700 Subject: [PATCH] cpu: Set ContextId on request from trace CPU Adds a contextId to the trace CPU in one more case that was missing. Without this a panic is triggered in the cache. Change-Id: I78bd70ad1e3657c9a6a1d56c234c007c2e2b586c Signed-off-by: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34035 Reviewed-by: Bobby R. Bruce Maintainer: Bobby R. Bruce Tested-by: kokoro --- src/cpu/trace/trace_cpu.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpu/trace/trace_cpu.cc b/src/cpu/trace/trace_cpu.cc index dd9125737..13f194c84 100644 --- a/src/cpu/trace/trace_cpu.cc +++ b/src/cpu/trace/trace_cpu.cc @@ -653,6 +653,9 @@ TraceCPU::ElasticDataGen::executeMemReq(GraphNode* node_ptr) node_ptr->physAddr, node_ptr->size, node_ptr->flags, masterID); req->setReqInstSeqNum(node_ptr->seqNum); + // If this is not done it triggers assert in L1 cache for invalid contextId + req->setContext(ContextID(0)); + req->setPC(node_ptr->pc); // If virtual address is valid, set the virtual address field // of the request. -- 2.30.2