inorder/dtb: make sure DTB translate correct address
Review Request #743 - Created June 8, 2011 and submitted
| Information | |
|---|---|
| Korey Sewell | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
| ali, gblack, nate, stever | |
inorder/dtb: make sure DTB translate correct address The DTB expects the correct PC in the ThreadContext but how if the memory accesses are speculative? Shouldn't we send along the requestor's PC to the translate functions?
Posted (June 9, 2011, 4:17 a.m.)
This isn't a review, just a thought on the question you're asking. If the access is speculative, is it ok to use a misspeculated pc since the instruction will be thrown out anyway?
Posted (June 10, 2011, 3:54 p.m.)
-
src/arch/alpha/tlb.cc (Diff revision 2) -
The Request object has a PC in it which is used by the translateInst() function. Assuming that the PC object is always set correctly in Request, then translateData() can also use the Request to get the current PC value rather than the last committed state from ThreadContext.
Posted (June 11, 2011, 2:56 a.m.)
Shouldn't you get rid of the cache_unit.cc changes now? I thought that was the point. This is still a hack, in my opinion; note that the comment on the _pc field in mem/request.hh says "for tracing/debugging", i.e., it's not intended to be architectural. Also, it isn't always set (e.g., for device accesses), though for CPU accesses it should be. So I'd say (1) it should work and (2) it's a much less ugly hack than what you had before, so assuming you do get rid of the cache_unit.cc changes I'd say it's fine. I still think having a ProxyThreadContext wrapped around a DynInst is the "right" way to do it, but I can see where that also looks like a lot of mostly unnecessary overhead.
