From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxw8m-0003K3-RX for qemu-devel@nongnu.org; Fri, 20 Jun 2014 06:33:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxw8i-0003yJ-Os for qemu-devel@nongnu.org; Fri, 20 Jun 2014 06:33:52 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:40080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxw8i-0003xu-JN for qemu-devel@nongnu.org; Fri, 20 Jun 2014 06:33:48 -0400 Message-ID: <53A40E09.2030700@imgtec.com> Date: Fri, 20 Jun 2014 11:33:45 +0100 From: James Hogan MIME-Version: 1.0 References: <1403259947-32233-1-git-send-email-james.hogan@imgtec.com> In-Reply-To: <1403259947-32233-1-git-send-email-james.hogan@imgtec.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3] hw/mips: gt64xxx_pci: Add VMStateDescription List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Sanjay Lal , Aurelien Jarno On 20/06/14 11:25, James Hogan wrote: > From: Sanjay Lal > > Add VMStateDescription for GT64120 PCI emulation used by the Malta > platform, to allow it to work with savevm/loadvm and live migration. > > The entire register array is saved/restored using VMSTATE_UINT32_ARRAY > (fixed length GT_REGS = 1024). > > Signed-off-by: Sanjay Lal > [james.hogan@imgtec.com: Convert to VMState] > Signed-off-by: James Hogan > Cc: Aurelien Jarno > --- > This is based on "[Patch 03/12] KVM/MIPS: Add save/restore state APIs > for saving/restoring KVM guests."[1]. > > Changes in v3: > - Save entire register array using VMSTATE_UINT32_ARRAY (which is fixed > length of GT_REGS = 1024) rather than individual registers. This is > safer in case an important register is missed or new emulated > functionality is added. (Aurelien Jarno) For the record, Aurelien's question about saving all registers or only specific ones is still open (I also don't have enough experience to be sure, although I prefer the approach in v3). On 19/06/14 16:51, Aurelien Jarno wrote: > That said there might be some drawbacks in doing that, and I don't > really have enough experience to judge about that. It would be nice if > some more people can give their opinion there. Note, new emulated functionality may still require VMState versioning to handle unexpected zero register values in restored state. Cheers James