diff mbox series

[v4,14/17] hw/ppc/pnv_core: Update hflags after setting msr

Message ID 20210315184615.1985590-15-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/pnv_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.25.1

Comments

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


Applied to ppc-for-6.0, thanks.

> ---

>  hw/ppc/pnv_core.c | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

> 

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

> index bd2bf2e044..8c2a15a0fb 100644

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

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

> @@ -29,6 +29,7 @@

>  #include "hw/ppc/pnv_xscom.h"

>  #include "hw/ppc/xics.h"

>  #include "hw/qdev-properties.h"

> +#include "helper_regs.h"

>  

>  static const char *pnv_core_cpu_typename(PnvCore *pc)

>  {

> @@ -55,8 +56,8 @@ static void pnv_core_cpu_reset(PnvCore *pc, PowerPCCPU *cpu)

>      env->gpr[3] = PNV_FDT_ADDR;

>      env->nip = 0x10;

>      env->msr |= MSR_HVB; /* Hypervisor mode */

> -

>      env->spr[SPR_HRMOR] = pc->hrmor;

> +    hreg_compute_hflags(env);

>  

>      pcc->intc_reset(pc->chip, cpu);

>  }


-- 
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/pnv_core.c b/hw/ppc/pnv_core.c
index bd2bf2e044..8c2a15a0fb 100644
--- a/hw/ppc/pnv_core.c
+++ b/hw/ppc/pnv_core.c
@@ -29,6 +29,7 @@ 
 #include "hw/ppc/pnv_xscom.h"
 #include "hw/ppc/xics.h"
 #include "hw/qdev-properties.h"
+#include "helper_regs.h"
 
 static const char *pnv_core_cpu_typename(PnvCore *pc)
 {
@@ -55,8 +56,8 @@  static void pnv_core_cpu_reset(PnvCore *pc, PowerPCCPU *cpu)
     env->gpr[3] = PNV_FDT_ADDR;
     env->nip = 0x10;
     env->msr |= MSR_HVB; /* Hypervisor mode */
-
     env->spr[SPR_HRMOR] = pc->hrmor;
+    hreg_compute_hflags(env);
 
     pcc->intc_reset(pc->chip, cpu);
 }