Thread (11 messages) flat view 11 messages, 5 authors, 2017-08-14

Re: [PATCH] powerpc/mm: Invalidate partition table cache on host proc tbl base update

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-08-04 03:33:12

Suraj Jitindar Singh [off-list ref] writes:
On Thu, 2017-08-03 at 17:35 +1000, Benjamin Herrenschmidt wrote:
quoted
On Thu, 2017-08-03 at 16:30 +1000, Michael Ellerman wrote:
quoted
Suraj Jitindar Singh [off-list ref] writes:
=20
quoted
The host process table base is stored in the partition table by
calling
the function native_register_process_table(). Currently this just
sets
the entry in memory and is missing a proceeding cache
invalidation
instruction. Any update to the partition table should be followed
by a
cache invalidation instruction specifying invalidation of the
caching of
any partition table entries (RIC =3D 2, PRS =3D 0).
=20
We already have a function to update the partition table with the
required cache invalidation instructions -
mmu_partition_table_set_entry().
Update the native_register_process_table() function to call
mmu_partition_table_set_entry(), this ensures all appropriate
invalidation will be performed.
=20
Without this patch the kernel will:
=C2=A0[ ] work normally
=C2=A0[ ] randomly crash
=C2=A0[ ] catch fire
=20
I think we get lucky because OPAL added a "flush the whole world" to
opal_reinit_cpus() but this patch seems to improve general code
"correctness".
I guess there's the possibility of:
[x] randomly crash
But you haven't actually see any right?
This is required to run a powernv kernel as a guest because we need to
know when it's updated its process table location.
Which doesn't currently work for other reasons :)

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help