Re: [PATCH v2 06/24] kvm: arm64: Move hyp-init params to a per-CPU struct

From
Marc Zyngier <maz@kernel.org>
Date
2020-11-25 10:49:39
Also in
kvmarm, lkml
Reply to
David Brazdil, 2020-11-25
On 2020-11-25 10:39, David Brazdil wrote:
On Mon, Nov 23, 2020 at 02:20:07PM +0000, Marc Zyngier wrote:
[...]
quoted
quoted
+
+	/*
+	 * 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...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (45 messages) 45 messages, 2 authors, last reply 2020-11-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help