From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y20mD-0000Je-Ng for qemu-devel@nongnu.org; Fri, 19 Dec 2014 11:51:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y20m7-0000Uf-Aj for qemu-devel@nongnu.org; Fri, 19 Dec 2014 11:51:41 -0500 Message-ID: <54945779.9090103@ilande.co.uk> Date: Fri, 19 Dec 2014 16:51:05 +0000 From: Mark Cave-Ayland MIME-Version: 1.0 References: <54915835.6030508@ilande.co.uk> <549159B6.6000006@suse.de> <54915F28.1090001@ilande.co.uk> <549164F5.5080902@suse.de> <5492DCAB.4050907@ilande.co.uk> <5492E8D6.3040503@suse.de> <549348E7.3020401@ilande.co.uk> <54935CE5.4090201@suse.de> <549403C2.8030902@ilande.co.uk> <54943249.2060902@ilande.co.uk> <54944F1E.7000604@ilande.co.uk> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] Unable to loadvm on qemu-system-ppc -M g3beige (keyboard freeze) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "qemu-ppc@nongnu.org" , Alexander Graf , qemu-devel On 19/12/14 16:35, Peter Maydell wrote: > On 19 December 2014 at 16:15, Mark Cave-Ayland > 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.