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: Alex Williamson
Subject: Re: [Qemu-devel] [PATCH] qdev: Reset hotplugged devices
Date: Fri, 20 Aug 2010 16:05:09 -0600

On Fri, 2010-08-20 at 13:12 -0500, Anthony Liguori wrote:
> On 08/20/2010 11:14 AM, Markus Armbruster wrote:
> >> The real problem is how we do reset.  We shouldn't register a reset
> >> handler for every qdev device but rather register a single reset
> >> handler that walks the device tree and calls reset on every reachable
> >> device.
> >>
> >> Then we can always call reset in init() and there's no need to have a
> >> dev->hotplugged check.  The qdev device tree reset handler should not
> >> be registered until *after* we call qemu_system_reset() after creating
> >> the device model which will ensure that we don't do a double reset.
> >>      
> > Fine with me.
> >
> > But we need to merge something short term (pre 0.13) to fix hot plug of
> > e1000 et al.  Use Alex's patch as such a stop-gap?
> >    
> 
> No, we're accumulating crud in base qdev at an alarming rate.  It's 
> important to fix these things now before it gets prohibitively hard to 
> take care of.
> 
> Can you and Alex review/try the following patch?  It seems to work for 
> me although I'm not sure how to trigger the original bug.

Yep, that works.  The test is simply to hot add an e1000, much of the
register state is setup in the reset function so the guest won't be able
to make use of the device unless reset is called somewhere along the
way.

Acked-by: Alex Williamson <address@hidden>





reply via email to

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