qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PCTCH v4] qdev: set properties after device's parent i


From: Amos Kong
Subject: Re: [Qemu-devel] [PCTCH v4] qdev: set properties after device's parent is assigned
Date: Tue, 4 Mar 2014 00:15:39 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Mar 03, 2014 at 05:01:34PM +0100, Andreas Färber wrote:
> Hi,
> 
> Am 03.03.2014 16:55, schrieb Amos Kong:
> > Test steps:
> >  (qemu) device_add e1000,addr=adsf
> >   Property 'e1000.addr' doesn't take value 'adsf'
> >  (qemu) info qtree
> >   Then qemu crashed.
> > 
> > Currently we set a link to the new device for qdev parent bus, but the
> > device hasn't been added to QOM tree. When it fails to set properties,
> > object_unparent() can't cleanup the device.
> > 
> > Delay device property setting until device's parent is assigned. This
> > way when property setting fails, object_unparent() can cleanup failed
> > device properly.
> > 
> > Signed-off-by: Amos Kong <address@hidden>
> > Reviewed-By: Igor Mammedov <address@hidden>
> > ---
> > V2: fix bz by adjust the initialization order (Paolo)
> > V3: fix bug without making it differs with legacy devices
> >     creation (Andreas)
> > V4: update subject and commitlog
> 
> I already applied a variation of v3. In particular I used qdev-monitor
> for consistency and clarified that it is about device_add.
> 
> https://github.com/afaerber/qemu-cpu/commits/qom-next
 
Your change's fine. I saw your comment on V3 thread after sent out V4 :-)
Thanks.

> If you don't like something in there, can you please just suggest an
> alternative sentence/paragraph for me to update?
> 
> Thanks,
> Andreas
> 
> -- 
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

-- 
                        Amos.



reply via email to

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