Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1478734

Re: [PATCH] powernv: Restore SPRs correctly upon wake up from hypervisor state loss

From "Shreyas B. Prabhu" <shreyasbp@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] powernv: Restore SPRs correctly upon wake up from hypervisor state loss
Date 2016-09-08 04:20 +0200
Message-ID <seX6x-8fF-1@gated-at.bofh.it> (permalink)
References <seDrb-3Tn-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Gautham,

Thanks for fixing this.

On Wed, Sep 7, 2016 at 1:16 AM, Gautham R. Shenoy
<ego@linux.vnet.ibm.com> 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")
>
> Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
> Cc: Michael Neuling <michael.neuling@au1.ibm.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Shreyas B. Prabhu <shreyasbp@gmail.com>
> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> ---

Reviewed-by: Shreyas B. Prabhu <shreyasbp@gmail.com>


Thanks,
Shreyas

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] powernv: Restore SPRs correctly upon wake up from hypervisor state loss "Gautham R. Shenoy" <ego@linux.vnet.ibm.com> - 2016-09-07 07:20 +0200
  Re: [PATCH] powernv: Restore SPRs correctly upon wake up from  hypervisor state loss "Shreyas B. Prabhu" <shreyasbp@gmail.com> - 2016-09-08 04:20 +0200

csiph-web