From patchwork Wed Jan 6 18:22:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 564007 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 675151402B4 for ; Thu, 7 Jan 2016 05:23:21 +1100 (AEDT) Received: from localhost ([::1]:55641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGsjv-0006aW-3m for incoming@patchwork.ozlabs.org; Wed, 06 Jan 2016 13:23:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGsjT-0005hE-Rq for qemu-devel@nongnu.org; Wed, 06 Jan 2016 13:22:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGsjP-0008Kc-8n for qemu-devel@nongnu.org; Wed, 06 Jan 2016 13:22:51 -0500 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:35079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGsjP-0008Jx-31; Wed, 06 Jan 2016 13:22:47 -0500 Received: from host86-147-229-66.range86-147.btcentralplus.com ([86.147.229.66] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1aGsjH-0000Yt-4h; Wed, 06 Jan 2016 18:22:40 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, agraf@suse.de, aik@ozlabs.ru, quintela@redhat.com, amit.shah@redhat.com Date: Wed, 6 Jan 2016 18:22:10 +0000 Message-Id: <1452104533-8516-2-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1452104533-8516-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1452104533-8516-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 86.147.229.66 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 1/4] target-ppc: add CPU IRQ state to PPC VMStateDescription X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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), + /* Sanity checking */ VMSTATE_UINTTL_EQUAL(env.msr_mask, PowerPCCPU), VMSTATE_UINT64_EQUAL(env.insns_flags, PowerPCCPU),