|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] Re: [PATCH 0/4] Machine config files |
Date: | Mon, 06 Jul 2009 16:40:06 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 |
On 07/06/09 16:01, Michael S. Tsirkin wrote:
Current savevm doesn't do that, thats why you have to start the virtual machine with the complete set of command line arguments even when resuming / migrating.It seems that it'd be trivial to solve this just by adding a fixed size header telling you which load function to call. No?
No. Go read the code.User adds -somedev params,more=options to the command line. Qemu asks the corresponding driver to creates a device instance. Every device instance registers loadvm/savevm callbacks to load/save state (tagged with name + instance id).
When loading vm state qemu will see name + instance id. There is no way to figure the actual driver from that.
Additionall issue: There is no standardized way to create a device instance. This one will be fixed by qdev though.
It might make sense to integrate savevm callbacks into qdev, then you'd have actually a chance to figure which driver belongs to your piece of savevm state. I suspect it isn't enougth to make it work though, you still need to know the position of the device in the device tree. To answer questions like "is your pci device behind a bridge and if so which one?".
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |