From 3747e178ed11ef0d73a50443bc9dc5498a91b1c9 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 6 Nov 2015 03:26:09 -0500 Subject: [PATCH] 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. --- src/mem/coherent_xbar.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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); } -- 2.30.2