Comment by repiret
6 hours ago
No, the problem really is the prefetch itself when there are undesirable side-effects if the bus sees that memory read.
6 hours ago
No, the problem really is the prefetch itself when there are undesirable side-effects if the bus sees that memory read.
Well yes. That is why the "prefetch" is a problem.
But the original question was asking why disabling data prefetching to a memory region didn't automatically disable instruction prefetching at the same time.
And the answer is that speculative execution is a completely different mechanism that I'm not even sure can be disabled, at least not per memory region.
Why do you say this? The post is quite clear that marking the memory region as NX fix the issue caused by speculative execution.