On Thu, 2018-09-13 at 05:33:47 UTC, Michael Neuling wrote:
> When we come into the softpatch handler (0x1500), we use r11 to store
> the HSRR0 for later use by the denorm handler.
> 
> We also use the softpatch handler for the TM workarounds for
> POWER9. Unfortunately, in kvmppc_interrupt_hv we later store r11 out
> to the vcpu assuming it's still what we got from userspace.
> 
> This causes r11 to be corrupted in the VCPU and hence when we restore
> the guest, we get a corrupted r11. We've seen this when running TM
> tests inside guests on P9.
> 
> This fixes the problem by only touching r11 in the denorm case.
> 
> Fixes: 4bb3c7a020 ("KVM: PPC: Book3S HV: Work around transactional memory 
> bugs in POWER9")
> Cc: <sta...@vger.kernel.org> # 4.17+
> Test-by: Suraj Jitindar Singh <sjitindarsi...@gmail.com>
> Reviewed-by: Paul Mackerras <pau...@ozlabs.org>
> Signed-off-by: Michael Neuling <mi...@neuling.org>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/f14040bca89258b8a1c71e2112e430

cheers

Reply via email to