[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH v2 1/2] hw/arm_sysctl.c: Add the Versatile Expre

From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH v2 1/2] hw/arm_sysctl.c: Add the Versatile Express system registers
Date: Sat, 05 Mar 2011 18:04:56 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

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 :)).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]