mem-ruby: Fix fast-forward when using the backing store.
mem-ruby: Fix fast-forward when using the backing store.

While the up-to-date data may reside in any agent of Ruby's memory
hierarchy, there's an optional backing store in Ruby that provides
a 'correct' view of the physical memory. When it is enabled by the
user, every Ruby memory access will update this global memory view
as well upon finishing.

The issue is that Ruby's atomic access, used in fast-forward, does
not currently access the backing store, leading to data
incorrectness. More specifically, at the very beginning stage of the
simulation, a loader loads the program into the backing store using
functional accesses. Then the program starts execution with
fast-forward enabled, using atomic accesses for faster simulation. But
because atomic access only accesses the real memory hierarchy, the CPU
fetches incorrect instructions.

The fix is simple. Just make Ruby's atomic access update the backing
store as well as the real physical memory.

Change-Id: I2541d923e18ea488d383097ca7abd4124e47e59b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26343
Reviewed-by: Jason Lowe-Power <68c46a606457643eab92053c1c05574abb26f861@lowepower.com>
Reviewed-by: Onur Kayıran <163531c29e775eeb74dbc2c932aece5a0c7d50e9@amd.com>
Maintainer: Jason Lowe-Power <68c46a606457643eab92053c1c05574abb26f861@lowepower.com>
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>

gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5