From: Andreas Sandberg Date: Fri, 6 Nov 2015 08:26:09 +0000 (-0500) Subject: mem: Check the XBar's port queues on functional snoops X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3747e178ed11ef0d73a50443bc9dc5498a91b1c9;p=gem5.git mem: Check the XBar's port queues on functional snoops The CoherentXBar currently doesn't check its queued slave ports when receiving a functional snoop. This caused data corruption in cases when a modified cache lines is forwarded between two caches. Add the required functional calls into the queued slave ports. --- diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc index cf438bc95..6a0136ea8 100644 --- a/src/mem/coherent_xbar.cc +++ b/src/mem/coherent_xbar.cc @@ -832,6 +832,14 @@ CoherentXBar::recvFunctionalSnoop(PacketPtr pkt, PortID master_port_id) pkt->cmdString()); } + for (const auto& p : slavePorts) { + if (p->checkFunctional(pkt)) { + if (pkt->needsResponse()) + pkt->makeResponse(); + return; + } + } + // forward to all snoopers forwardFunctional(pkt, InvalidPortID); }