Visible to Intel only — GUID: few1685984315747
Ixiasoft
Visible to Intel only — GUID: few1685984315747
Ixiasoft
3.4.5. 1314123: Incorrect ordering after change in cacheability
Description
If the memory type of an address region is changed from Cacheable to Non-cacheable, and then back again, and rare microarchitectural conditions occur, then stale data might be observed in a cache.
Conditions
- An address region of memory is marked in the translation tables as Write-Back Cacheable memory.
- The hardware prefetcher starts a data prefetch to an address within this region. This must generate a StashOnce CHI transaction from the core to the DSU, and in some cases the DSU might pass the StashOnce on to the interconnect if the DSU is configured with a CHI master.
- The translation tables are updated to change the memory type to Non-cacheable or Device memory. This would involve a break-before-make sequence.
- A sequence of cache clean and invalidate instructions are executed to ensure that any Cacheable data in the memory region does not remain in the caches.
- The StashOnce transaction and the clean and invalidate transaction to the same address get reordered within the DSU or externally if the StashOnce was sent to the interconnect. This means that the StashOnce transaction can cause the line to be allocated into the cache after the cache maintenance has completed.
- A core or other master in the system writes to the region that is now marked Non-cacheable or Device.
- The translation tables are changed a second time, to mark the memory as Write-Back Cacheable again.
- A load instruction is executed. The load might observe the stale data that was prefetched into the cache, rather than the Non-cacheable data that was written.
Impact
The above sequence is very specific and would typically take a very long time to execute. It requires that the StashOnce transaction is started before the translation table modification, yet does not complete until after both the translation table modification and the cache maintenance. Additionally, the StashOnce and cache maintenance transactions must be reordered by the DSU or interconnect, and this is an unlikely event, especially if they are not started at a similar time. Therefore the combination of these conditions is going to be extremely rare. Furthermore, the change in memory type implies a change of use of the memory, and many such changes of use will not require preservation of the data between uses.
Workaround
No workaround is necessary.
Category
Category C