A non-transitory computer-readable medium having instructions stored thereon that are capable of causing or configuring a microprocessor for mitigating side channel attacks, the microprocessor having a cache memory, at least one execution pipeline, and fill request generation logic configured to generate a request to fill the cache memory with a cache line implicated by a memory address that misses in the cache memory, wherein the microprocessor is configured by the instructions to perform operations comprising:
- wherein the processor is configured to perform speculative execution of instructions;
- wherein the processor is configured to execute instructions out of program order;
- and
- receiving, by the at least one execution pipeline, first and second load operations;
- detecting, by the at least one execution pipeline, a condition in which the first load operation generates a need for an architectural exception, the second load operation misses in the cache memory, and the second load operation is newer in program order than the first load operation;
- and
- preventing, by the at least one execution pipeline, state of the cache memory from being affected by the miss of the second load operation by inhibiting the fill request generation logic from generating a fill request for the second load operation or by canceling the fill request for the second load operation if the fill request generation logic has already generated the fill request for the second load operation.