On Thu Jun 15, 2023 at 2:51 PM AEST, Harsh Prateek Bora wrote: > > > On 6/14/23 17:26, Nicholas Piggin wrote: > >>> @@ -1766,34 +1872,8 @@ void spapr_exit_nested(PowerPCCPU *cpu, int excp) > >>> address_space_unmap(CPU(cpu)->as, regs, len, len, true); > >>> > >>> out_restore_l1: > >>> - memcpy(env->gpr, spapr_cpu->nested_host_state->gpr, > >>> sizeof(env->gpr)); > >>> - env->lr = spapr_cpu->nested_host_state->lr; > >>> - env->ctr = spapr_cpu->nested_host_state->ctr; > >>> - memcpy(env->crf, spapr_cpu->nested_host_state->crf, > >>> sizeof(env->crf)); > >>> - env->cfar = spapr_cpu->nested_host_state->cfar; > >>> - env->xer = spapr_cpu->nested_host_state->xer; > >>> - env->so = spapr_cpu->nested_host_state->so; > >>> - env->ca = spapr_cpu->nested_host_state->ca; > >>> - env->ov = spapr_cpu->nested_host_state->ov; > >>> - env->ov32 = spapr_cpu->nested_host_state->ov32; > >>> - env->ca32 = spapr_cpu->nested_host_state->ca32; > >> > >> Above fields so, ca, ov, ov32, ca32 are not taken care in > >> nested_load_state, ca being introduced in previous patch. > > > > They should be, by cpu_write_xer. > > > I see. In that case, do we really need the previous 1/4 patch?
Good question. This supersedes it, but it's good practice to do a minimal fixes for bugs. Not just to make for easier backporting, but it helps to understand bugs in the commit history. > > Reviewed-by: Harsh Prateek Bora <hars...@linux.ibm.com> Thanks, Nick