OSDN Git Service

KVM: PPC: Book3S HV P9: Avoid changing MSR[RI] in entry and exit
authorNicholas Piggin <npiggin@gmail.com>
Tue, 23 Nov 2021 09:52:25 +0000 (19:52 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Nov 2021 10:09:02 +0000 (21:09 +1100)
commitf08cbf5c7d1f86f12143a1dce23740411b03a807
tree88705818f19bf9a6081a0eb852a34059c663570b
parent241d1f19f0e5c257881a0661f201b51dc3e57f8c
KVM: PPC: Book3S HV P9: Avoid changing MSR[RI] in entry and exit

kvm_hstate.in_guest provides the equivalent of MSR[RI]=0 protection,
and it covers the existing MSR[RI]=0 section in late entry and early
exit, so clearing and setting MSR[RI] in those cases does not
actually do anything useful.

Remove the RI manipulation and replace it with comments. Make the
in_guest memory accesses a bit closer to a proper critical section
pattern. This speeds up guest entry/exit performance.

This also removes the MSR[RI] warnings which aren't very interesting
and would cause crashes if they hit due to causing an interrupt in
non-recoverable code.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211123095231.1036501-48-npiggin@gmail.com
arch/powerpc/kvm/book3s_hv_p9_entry.c