diff mbox series

[v4,15/17] hw/ppc/spapr_rtas: Update hflags after setting msr

Message ID 20210315184615.1985590-16-richard.henderson@linaro.org
State Superseded
Headers show
Series target/ppc: Fix truncation of env->hflags | expand

Commit Message

Richard Henderson March 15, 2021, 6:46 p.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 hw/ppc/spapr_rtas.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.25.1

Comments

David Gibson March 22, 2021, 4:27 a.m. UTC | #1
On Mon, Mar 15, 2021 at 12:46:13PM -0600, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Applied to ppc-for-6.0, thanks.

> ---

>  hw/ppc/spapr_rtas.c | 2 ++

>  1 file changed, 2 insertions(+)

> 

> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c

> index 8a79f9c628..6ec3e71757 100644

> --- a/hw/ppc/spapr_rtas.c

> +++ b/hw/ppc/spapr_rtas.c

> @@ -51,6 +51,7 @@

>  #include "target/ppc/mmu-hash64.h"

>  #include "target/ppc/mmu-book3s-v3.h"

>  #include "migration/blocker.h"

> +#include "helper_regs.h"

>  

>  static void rtas_display_character(PowerPCCPU *cpu, SpaprMachineState *spapr,

>                                     uint32_t token, uint32_t nargs,

> @@ -163,6 +164,7 @@ static void rtas_start_cpu(PowerPCCPU *callcpu, SpaprMachineState *spapr,

>      cpu_synchronize_state(CPU(newcpu));

>  

>      env->msr = (1ULL << MSR_SF) | (1ULL << MSR_ME);

> +    hreg_compute_hflags(env);

>  

>      /* Enable Power-saving mode Exit Cause exceptions for the new CPU */

>      lpcr = env->spr[SPR_LPCR];


-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
diff mbox series

Patch

diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index 8a79f9c628..6ec3e71757 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -51,6 +51,7 @@ 
 #include "target/ppc/mmu-hash64.h"
 #include "target/ppc/mmu-book3s-v3.h"
 #include "migration/blocker.h"
+#include "helper_regs.h"
 
 static void rtas_display_character(PowerPCCPU *cpu, SpaprMachineState *spapr,
                                    uint32_t token, uint32_t nargs,
@@ -163,6 +164,7 @@  static void rtas_start_cpu(PowerPCCPU *callcpu, SpaprMachineState *spapr,
     cpu_synchronize_state(CPU(newcpu));
 
     env->msr = (1ULL << MSR_SF) | (1ULL << MSR_ME);
+    hreg_compute_hflags(env);
 
     /* Enable Power-saving mode Exit Cause exceptions for the new CPU */
     lpcr = env->spr[SPR_LPCR];