qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH 0/4] Machine config files


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Re: [PATCH 0/4] Machine config files
Date: Mon, 06 Jul 2009 18:27:02 +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 18:12, Avi Kivity wrote:
On 07/06/2009 05:40 PM, Gerd Hoffmann wrote:
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.

That's my preference. The very first pass iterates the device tree and
serializes it.

Sure, needs to happen.

I meant something else though: Instead of having the drivers call register_savevm() in there init functions add section name and savevm/loadvm function pointers to qdevs DeviceInfo. That will add the missing link section name -> driver. That alone will *not* provide the position in the device tree though. And I suspect making the transition without breaking backward compatibility could be quite tricky too. So I'm not sure how useful that actually is, although it surely would be much cleaner from a design point of view.

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?".

Isn't that info provided by qdev?

Yep, it is.

Serialize qdev tree (into fdt or whatever else), send it over wire first, recreate qdev tree on the other side (including save/load callback registration), then parse everything else. That is how I wanna have it work some day ...

cheers,
  Gerd




reply via email to

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