From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: "Shreyas B. Prabhu" <shreyasbp@gmail.com>,
"Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
Michael Neuling <michael.neuling@au1.ibm.com>
Subject: Re: powernv: Restore SPRs correctly upon wake up from hypervisor state loss
Date: Tue, 13 Sep 2016 08:09:00 +1000 (AEST) [thread overview]
Message-ID: <3sY25S6bdKz9sdn@ozlabs.org> (raw)
In-Reply-To: <1473225390-4281-1-git-send-email-ego@linux.vnet.ibm.com>
On Wed, 2016-07-09 at 05:16:30 UTC, "Gautham R. Shenoy" wrote:
> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
>
> pnv_wakeup_tb_loss function currently expects the cr4 to be "eq" if
> the CPU is waking up from a complete hypervisor state loss. Hence, it
> currently restores the SPR contents only if cr4 is "eq".
>
> However, after the commit bcef83a00dc4 ("powerpc/powernv: Add platform
> support for stop instruction"), on ISA_V300 CPUs, the function
> pnv_restore_hyp_resource sets cr4 to contain the result of the
> comparison between state the CPU has woken up and the first deepest
> stop state before calling pnv_wakeup_tb_loss.
>
> Thus if the CPU woke up from a state that is deeper than the first
> deepest stop state, cr4 have "gt" set and hence, pnv_wakeup_tb_loss
> will fail to restore the SPRs on waking up from such a state.
>
> Fix the code in pnv_wakeup_tb_loss to restore the SPR states when cr4 is
> "eq" or "gt".
>
> Fixes: Commit bcef83a00dc4 ("powerpc/powernv: Add platform support for stop instruction")
> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Reviewed-by: Shreyas B. Prabhu <shreyasbp@gmail.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/bd00a240dc52e28706fbbe3ace
cheers
prev parent reply other threads:[~2016-09-12 22:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 5:16 [PATCH] " Gautham R. Shenoy
2016-09-08 2:10 ` Shreyas B. Prabhu
2016-09-12 22:09 ` Michael Ellerman [this message]
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=3sY25S6bdKz9sdn@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=ego@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michael.neuling@au1.ibm.com \
--cc=shreyasbp@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
all inboxes | Powered by JetHome®