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: Michael S. Tsirkin
Subject: Re: [Qemu-devel] Re: [PATCH 0/4] Machine config files
Date: Mon, 6 Jul 2009 19:44:29 +0300
User-agent: Mutt/1.5.19 (2009-01-05)

On Mon, Jul 06, 2009 at 07:37:32PM +0300, Avi Kivity wrote:
> On 07/06/2009 07:27 PM, Gerd Hoffmann wrote:
>> 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. 
>
> Yes, that's how I see it too.  It's just another device method.
>
>> That will add the missing link section name -> driver. 
>
> There's no reason to have a section name.
>
>> 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 think we need to break the format.  It's semi-broken anyway wrt  
> hotplug and the use of ram addresses.  It may be possible to add  
> transition code but I don't think it's worth it.
>
>>>> 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 ...
>
> Slight change: instead of serializing into a tree, have a qdev callback  
> which generates an add event that can be sent over the wire.  While  
> migrating, additional hotplug simply call the same callback and the  
> hotplug is migrated in real time.

IOW, each device just needs to record where it is in the tree.
The tree can be then reconstructed by each driver
finding the parent bus and attaching the device to it.

-- 
MST




reply via email to

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