On 19/12/14 16:35, Peter Maydell wrote: > On 19 December 2014 at 16:15, Mark Cave-Ayland > <mark.cave-ayl...@ilande.co.uk> wrote: >> It looks like after restoring the CPU state with loadvm env->htab_base >> is still at 0x0 rather than its pre-migration value of 0x7e000000. > > Odd -- there is code that is at least trying to do that: > machine.c calls ppc_store_sdr1() which should set htab_base/mask > according to the migrated value of the register...
Stepping through ppc_store_sdr1() I see the problem is the if() statement: if (env->spr[SPR_SDR1] != value) { .... } It looks like env->spr[SPR_SDR1] has already been set to 0x7e000000 before the call to ppc_store_sdr1() and so as the values are already equal then the code to setup env->htab_mask and env->htab_base is bypassed. The quick fix is to comment out the above if() statement which allows me to restore my OpenBIOS image successfully with -loadvm but sadly not my OS image (I guess there are probably a few more state bugs still lying around). Does this seem the right thing to do or is there a better way? ATB, Mark.