We now explicitly check in both the cache and the MSHRs if writes are masked or not before promoting to a whole-line write. Failure to do this previously was resulting in data loss when dirty data was present in lower level caches and a coincidentally aligned and cache-line-sized masked write occured. Change-Id: I9434590d8b22e4d993167d789eb9d15a2e866bf1 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64340 Maintainer: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>