From: Timothy Hayes Date: Wed, 23 Sep 2020 11:10:37 +0000 (+0100) Subject: cpu: Allow storing an invalid HTM checkpoint X-Git-Tag: v20.1.0.0~13 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c83d8f74c8c24df931d05c2e32cb57687056d27;p=gem5.git cpu: Allow storing an invalid HTM checkpoint Commits 02745afd and f9b4e32 introduced a mechanism for creating checkpoint objects for hardware transactional memory (HTM) and Arm TME. Because the checkpoint object also contains the local UID of a transaction, it is needed before any architectural checkpointing takes places. This caused segfaults when running HTM codes. This commit allows ISAs to allocate a checkpoint once at the beginning of simulation. In order to do that we need to remove the validity check assertion; the cpt will become valid only after a first successfull transaction start Change-Id: I233d01805f8ab655131ed8cd6404950a2bf6fbc7 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35015 Reviewed-by: Jason Lowe-Power Maintainer: Giacomo Travaglini Tested-by: kokoro --- diff --git a/src/cpu/o3/thread_context_impl.hh b/src/cpu/o3/thread_context_impl.hh index 005aa5716..bea4dc784 100644 --- a/src/cpu/o3/thread_context_impl.hh +++ b/src/cpu/o3/thread_context_impl.hh @@ -347,7 +347,6 @@ template void O3ThreadContext::setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) { - assert(!thread->htmCheckpoint->valid()); thread->htmCheckpoint = std::move(new_cpt); } diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc index 28a1c8069..b9b69d89e 100644 --- a/src/cpu/simple_thread.cc +++ b/src/cpu/simple_thread.cc @@ -196,6 +196,5 @@ SimpleThread::getHtmCheckpointPtr() void SimpleThread::setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) { - assert(!_htmCheckpoint->valid()); _htmCheckpoint = std::move(new_cpt); }