Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/46624 )
Change subject: cpu: Implement basic HTM capabilities in the CheckerCPU
......................................................................
cpu: Implement basic HTM capabilities in the CheckerCPU
The O3CPU, which supports transactional memory (HTM), is using
the inHtmTransactionalState and getHtmCheckpointPtr methods
to check if we are in the middle of a transaction and return
false or a nullptr if that's not the case.
We need to avoid aborting simulation (panic) when those methods are
called in the O3CPU + Checker simulation.
This patch is providing the minimal support to re-enable O3 + Checker
runs and it is not providing HTM support in the CheckerCPU (meaning, we
won't be able to use the Checker in a transactional simulation)
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Change-Id: I7f71d5290c53b0402763d69f137ecaa1208253fb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46624
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Reviewed-by: Richard Cooper <richard.coo...@arm.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/cpu/checker/cpu.hh
M src/cpu/checker/thread_context.hh
2 files changed, 5 insertions(+), 6 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Richard Cooper: Looks good to me, but someone else must approve
kokoro: Regressions pass
diff --git a/src/cpu/checker/cpu.hh b/src/cpu/checker/cpu.hh
index 6d19174..b6c3747 100644
--- a/src/cpu/checker/cpu.hh
+++ b/src/cpu/checker/cpu.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2016-2018, 2020 ARM Limited
+ * Copyright (c) 2011, 2016-2018, 2020-2021 Arm Limited
* Copyright (c) 2013 Advanced Micro Devices, Inc.
* All rights reserved
*
@@ -380,15 +380,14 @@
bool
inHtmTransactionalState() const override
{
- panic("not yet supported!");
- return false;
+ return (getHtmTransactionalDepth() > 0);
}
uint64_t
getHtmTransactionalDepth() const override
{
- panic("not yet supported!");
- return 0;
+ assert(thread->htmTransactionStarts >=
thread->htmTransactionStops);
+ return (thread->htmTransactionStarts -
thread->htmTransactionStops);
}
TheISA::PCState pcState() const override { return thread->pcState(); }
diff --git a/src/cpu/checker/thread_context.hh
b/src/cpu/checker/thread_context.hh
index 1e961c5..9a00488 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -497,7 +497,7 @@
BaseHTMCheckpointPtr&
getHtmCheckpointPtr() override
{
- panic("function not implemented");
+ return actualTC->getHtmCheckpointPtr();
}
void
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46624
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: I7f71d5290c53b0402763d69f137ecaa1208253fb
Gerrit-Change-Number: 46624
Gerrit-PatchSet: 3
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Richard Cooper <richard.coo...@arm.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
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s