qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qdev: Reset hotplugged devices


From: Isaku Yamahata
Subject: Re: [Qemu-devel] [PATCH] qdev: Reset hotplugged devices
Date: Thu, 26 Aug 2010 00:17:13 +0900
User-agent: Mutt/1.5.19 (2009-01-05)

On Wed, Aug 25, 2010 at 07:55:27AM -0500, Anthony Liguori wrote:
>> Maybe we can merge the patches.
>> As for your patch, I have some comment.
>> - bus itself may want its own handler. At lease pci bus needs it.
>>    And propagating reset signal to children is up to the bus controller.
>>    
>
> I disagree.  Reset should be equivalent to power off + init and it's not  
> something that can be selectively propagated.
>
> There are different types of bus level resets and it may make sense to  
> model that in the PCI layer but the qdev reset is a power cycle  
> semantically.
>
> I think using a walker pattern is a stronger design than having each  
> reset function do it's own transversal because the later has the  
> potential to introduce bugs.

Warm reset is different from cold reset, so reset isn't equivalent to
a power cycle. Typically registers which report errors must retain the
contents across warm reset, but doesn't across a power cycle.
I can see the reset call back is called when both power on and warm reset,
but I don't see why qdev_reset() is a power cycle semantically.

Although your current patch might work for me at the moment,
the claim that qdev_reset() == a power cycle worries me.

How about adding a argument to distinguish reset type?
Something like QEMU_RESET_COLD, QEMU_RESET_WARM.
-- 
yamahata



reply via email to

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