From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39802 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pvuum-0003o9-4U for qemu-devel@nongnu.org; Sat, 05 Mar 2011 12:05:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pvuuc-0002Ct-BX for qemu-devel@nongnu.org; Sat, 05 Mar 2011 12:05:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pvuub-0002Cl-UQ for qemu-devel@nongnu.org; Sat, 05 Mar 2011 12:05:02 -0500 Message-ID: <4D726D38.8030902@redhat.com> Date: Sat, 05 Mar 2011 18:04:56 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1299270860-8927-1-git-send-email-peter.maydell@linaro.org> <1299270860-8927-2-git-send-email-peter.maydell@linaro.org> <4D722880.6090103@redhat.com> <4D724FB5.1040601@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2 1/2] hw/arm_sysctl.c: Add the Versatile Express system registers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Juan Quintela , patches@linaro.org, =?UTF-8?B?RGF3aWQgQ2nEmcW8YXJraWV3aWN6?= , Amit Mahajan , qemu-devel@nongnu.org, Bahadir Balban On 03/05/2011 05:50 PM, Peter Maydell wrote: > (1) Is there supposed to be any kind of guard on trying to > do a vmsave on a system with devices that don't implement > save/load? IME it just produces a snapshot which doesn't > work when you reload it... I think you're right, devices currently have to call register_device_unmigratable manually. I guess you could add support to qdev, so that qdev-ified devices could specify a special "forbid migration" value for the vmsd field. Alternatively, you could have NULL mean "forbid migration" and a special value for "do not save anything, it will just work". > (2) How do you track incompatible changes at the machine > level? For instance, suppose we accidentally forgot to > model a NOT gate in an IRQ line, so we add a qemu_irq_invert() > to the machine init function. None of the devices have > changed, but you can't load the state of an old version > of the machine into a new version, because then the > devices on either end of the inverter would be inconsistent > about the state of the line. But there's no version number > for a machine as far as I can see. You can change the machine model and keep the incompatible machine as a separate model. A machine can specify compatibility properties that are meant exactly for this kind of bug-compatible behavior. Reloading the VM must be done with the correct -M switch for the old model. Examples of how to do this are in hw/pc_piix.c (which will provide good ideas for further grepping, too :)). Paolo