From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Neuling <mikey@neuling.org>
Cc: mikey@neuling.org, linuxppc-dev@lists.ozlabs.org,
sjitindarsingh@gmail.com, kvm-ppc@vger.kernel.org
Subject: Re: KVM: PPC: Book3S HV: Fix guest r11 corruption with POWER9 TM workarounds
Date: Fri, 21 Sep 2018 21:59:38 +1000 (AEST) [thread overview]
Message-ID: <42GsbH0bvyz9sCc@ozlabs.org> (raw)
In-Reply-To: <20180913053347.11389-1-mikey@neuling.org>
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: <stable@vger.kernel.org> # 4.17+
> Test-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
> Reviewed-by: Paul Mackerras <paulus@ozlabs.org>
> Signed-off-by: Michael Neuling <mikey@neuling.org>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/f14040bca89258b8a1c71e2112e430
cheers
next prev parent reply other threads:[~2018-09-21 11:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 5:33 [PATCH] KVM: PPC: Book3S HV: Fix guest r11 corruption with POWER9 TM workarounds Michael Neuling
2018-09-21 11:59 ` Michael Ellerman [this message]
[not found] <20180914165657.GB6306@MiWiFi-R3L-srv>
2018-09-14 17:04 ` sathnaga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42GsbH0bvyz9sCc@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=kvm-ppc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=sjitindarsingh@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).