changeset e49bf4884c59 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=e49bf4884c59
description:
x86: Delay X86 table walk on receiving walker response
This patch fixes a minor issue in the X86 page table walker where it
ended up sending new request packets to the crossbar before the
response processing was finished (recvTimingResp is directly calling
sendTimingReq). Under certain conditions this caused the crossbar to
see illegal combinations of request/response overlap, in turn causing
problems with a slightly modified crossbar implementation.
diffstat:
src/arch/x86/pagetable_walker.cc | 6 ++++--
src/arch/x86/pagetable_walker.hh | 8 +++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r e3fc6bc7f97e -r e49bf4884c59 src/arch/x86/pagetable_walker.cc
--- a/src/arch/x86/pagetable_walker.cc Thu Jan 22 05:00:53 2015 -0500
+++ b/src/arch/x86/pagetable_walker.cc Thu Jan 22 05:00:54 2015 -0500
@@ -124,8 +124,10 @@
delete senderWalk;
// Since we block requests when another is outstanding, we
// need to check if there is a waiting request to be serviced
- if (currStates.size())
- startWalkWrapper();
+ if (currStates.size() && !startWalkWrapperEvent.scheduled())
+ // delay sending any new requests until we are finished
+ // with the responses
+ schedule(startWalkWrapperEvent, clockEdge());
}
return true;
}
diff -r e3fc6bc7f97e -r e49bf4884c59 src/arch/x86/pagetable_walker.hh
--- a/src/arch/x86/pagetable_walker.hh Thu Jan 22 05:00:53 2015 -0500
+++ b/src/arch/x86/pagetable_walker.hh Thu Jan 22 05:00:54 2015 -0500
@@ -183,6 +183,11 @@
// Wrapper for checking for squashes before starting a translation.
void startWalkWrapper();
+ /**
+ * Event used to call startWalkWrapper.
+ **/
+ EventWrapper<Walker, &Walker::startWalkWrapper> startWalkWrapperEvent;
+
// Functions for dealing with packets.
bool recvTimingResp(PacketPtr pkt);
void recvRetry();
@@ -207,7 +212,8 @@
MemObject(params), port(name() + ".port", this),
funcState(this, NULL, NULL, true), tlb(NULL), sys(params->system),
masterId(sys->getMasterId(name())),
- numSquashable(params->num_squash_per_cycle)
+ numSquashable(params->num_squash_per_cycle),
+ startWalkWrapperEvent(this)
{
}
};
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev