lkml.org 
[lkml]   [2019]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH, x86]: Disable CPA cache flush for selfsnoop targets
On Thu, Jul 11, 2019 at 4:39 PM Andy Lutomirski <luto@kernel.org> wrote:
>
> On Thu, Jul 11, 2019 at 1:13 AM Uros Bizjak <ubizjak@gmail.com> wrote:
> >
> > Recent patch [1] disabled a self-snoop feature on a list of processor
> > models with a known errata, so we are confident that the feature
> > should work on remaining models also for other purposes than to speed
> > up MTRR programming.
> >
> > I would like to resurrect an old patch [2] that avoids calling clflush
> > and wbinvd
> > to invalidate caches when CPU supports selfsnoop.
>
> The big question here is: what are all the reasons that we might need
> to flush? Certainly, for stuff like SEV and MKTME, we need to flush
> regardless of any self-snoop capability.

No AMD target defines self-snoop capability, and set_memory_encrypted
forces cache clearing in __set_memory_enc_dec:

/*
* Before changing the encryption attribute, we need to flush caches.
*/
cpa_flush(&cpa, 1);

Uros.

\
 
 \ /
  Last update: 2019-07-11 21:01    [W:0.160 / U:1.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site