From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHMfT-0000Bb-UW for qemu-devel@nongnu.org; Thu, 07 Jan 2016 21:20:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHMfP-0004Il-Rd for qemu-devel@nongnu.org; Thu, 07 Jan 2016 21:20:43 -0500 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:33343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHMfP-0004I7-Ir for qemu-devel@nongnu.org; Thu, 07 Jan 2016 21:20:39 -0500 Received: by mail-pa0-x230.google.com with SMTP id cy9so273398949pac.0 for ; Thu, 07 Jan 2016 18:20:39 -0800 (PST) References: <1452104533-8516-1-git-send-email-mark.cave-ayland@ilande.co.uk> <1452104533-8516-2-git-send-email-mark.cave-ayland@ilande.co.uk> From: Alexey Kardashevskiy Message-ID: <568F1CF1.60808@ozlabs.ru> Date: Fri, 8 Jan 2016 13:20:33 +1100 MIME-Version: 1.0 In-Reply-To: <1452104533-8516-2-git-send-email-mark.cave-ayland@ilande.co.uk> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] target-ppc: add CPU IRQ state to PPC VMStateDescription List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, agraf@suse.de, quintela@redhat.com, amit.shah@redhat.com On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote: > Commit a90db15 "target-ppc: Convert ppc cpu savevm to VMStateDescription" > appears to drop the internal CPU IRQ state from the migration stream. Whilst > testing migration on g3beige/mac99 machines, test images would randomly fail to > resume unless a key was pressed on the VGA console. > > Further investigation suggests that internal CPU IRQ state isn't being > preserved and so interrupts asserted at the time of migration are lost. Adding > the pending_interrupts and irq_input_state fields back into the migration > stream appears to fix the problem here during local tests. > > Signed-off-by: Mark Cave-Ayland > --- > target-ppc/machine.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/target-ppc/machine.c b/target-ppc/machine.c > index f4ac761..98fc63a 100644 > --- a/target-ppc/machine.c > +++ b/target-ppc/machine.c > @@ -532,6 +532,10 @@ const VMStateDescription vmstate_ppc_cpu = { > VMSTATE_UINTTL(env.hflags_nmsr, PowerPCCPU), > /* FIXME: access_type? */ > > + /* Interrupt state */ > + VMSTATE_UINT32(env.pending_interrupts, PowerPCCPU), > + VMSTATE_UINT32(env.irq_input_state, PowerPCCPU), > + You change the binary stream here so you have to bump a vmstate_ppc_cpu version and use VMSTATE_UINT32_V() with this new version number. > /* Sanity checking */ > VMSTATE_UINTTL_EQUAL(env.msr_mask, PowerPCCPU), > VMSTATE_UINT64_EQUAL(env.insns_flags, PowerPCCPU), > -- Alexey