Re: [PATCH v6 5/6] Optionally flush L1D on context switch

From: Thomas Gleixner
Date: Thu May 14 2020 - 07:33:20 EST


Balbir,

"Singh, Balbir" <sblbir@xxxxxxxxxx> writes:
> On Wed, 2020-05-13 at 18:16 +0200, Thomas Gleixner wrote:
>> Balbir Singh <sblbir@xxxxxxxxxx> writes:
>> But looking at this deeper (yes I should have noticed earlier):
>>
>> Why do we need yet another PRCTL?
>>
>> We already have PR_SET_SPECULATION_CTRL/PR_GET_SPECULATION_CTRL. That
>> L1D flush thingy fits into this category, right?
>
> It does, I thought about it for a while when I was changing the code and
> left it aside because, looking at the definition
>
> 1 PR_SPEC_ENABLE The speculation feature is enabled,
> mitigation is disabled.
> 2 PR_SPEC_DISABLE The speculation feature is disabled,
> mitigation is enabled.
>
> With L1D flush, there is no overriding of the feature as such (as in
> enable when the mitigation is disabled and vice-versa). I am happy to
> reconsider my initial thought though.

L1D is always enabled as L1D will be a source of trouble forever :)

Thanks,

tglx