x86: Force strict ordering for memory mapped m5ops
authorMichael LeBeane <michael.lebeane@amd.com>
Wed, 14 Sep 2016 03:18:34 +0000 (23:18 -0400)
committerMichael LeBeane <michael.lebeane@amd.com>
Wed, 14 Sep 2016 03:18:34 +0000 (23:18 -0400)
Normal MMAPPED_IPR requests are allowed to execute speculatively under the
assumption that they have no side effects.  The special case of m5ops that are
treated like MMAPPED_IPR should not be allowed to execute speculatively, since
they can have side-effects.  Adding the STRICT_ORDER flag to these requests
blocks execution until the associated instruction hits the ROB head.

src/arch/x86/tlb.cc

index be43cb06e44e0feccde81e552e151bd9290e6e30..0e0878669a8e63fb2726e8403c7f226d3d32e5dd 100644 (file)
@@ -235,7 +235,8 @@ TLB::finalizePhysical(RequestPtr req, ThreadContext *tc, Mode mode) const
 
     if (m5opRange.contains(paddr)) {
         if (m5opRange.contains(paddr)) {
-            req->setFlags(Request::MMAPPED_IPR | Request::GENERIC_IPR);
+            req->setFlags(Request::MMAPPED_IPR | Request::GENERIC_IPR |
+                          Request::STRICT_ORDER);
             req->setPaddr(GenericISA::iprAddressPseudoInst(
                             (paddr >> 8) & 0xFF,
                             paddr & 0xFF));