lkml.org 
[lkml]   [2020]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 06/24] kvm: arm64: Move hyp-init params to a per-CPU struct
On 2020-11-25 10:39, David Brazdil wrote:
> On Mon, Nov 23, 2020 at 02:20:07PM +0000, Marc Zyngier wrote:

[...]

>> > +
>> > + /*
>> > + * Flush the init params from the data cache because the struct will
>> > + * be read while the MMU is off.
>> > + */
>> > + __flush_dcache_area(params, sizeof(*params));
>>
>> nit: please use kvm_flush_dcache_to_poc(), as it clearly indicates to
>> which point we are flushing.
>
> Will change, but out of curiosity - how is it different? AFAICT, it is
> just
> an alias with a single use in __clean_dcache_guest_page:
>
> #define kvm_flush_dcache_to_poc(a,l) __flush_dcache_area((a), (l))

It is indeed the exact same thing, but it says clearly in the name that
we
are cleaning to the "Point Of Coherency", as opposed to any other
architectural level (Unification or Persistence).

It makes it clear that we are cleaning all the way to the point where it
can
be accessed reliably with an uncacheable mapping, and not leaving the
data
dangling at a shallower cache level.

Thanks,

M.
--
Jazz is not dead. It just smells funny...

\
 
 \ /
  Last update: 2020-11-25 11:51    [W:0.060 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site