qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 4/7] bootindex: delete bootindex when device


From: Gonglei (Arei)
Subject: Re: [Qemu-devel] [PATCH v2 4/7] bootindex: delete bootindex when device is removed
Date: Wed, 30 Jul 2014 07:29:56 +0000

Hi,

> -----Original Message-----
> From: Gerd Hoffmann [mailto:address@hidden
> Sent: Friday, July 25, 2014 5:52 PM
> 
> > +    del_boot_device_path(dev);
> 
> You can call this from device_finalize() instead of placing it into each
> individual device.
> 
Maybe put this call in device_finalize is not a good idea. 
I have three reasons:

1. the device's some memory have been freed before call device_finalize,
 such as device->id. It is too later.
2. not every kinds of device can configure bootindex property, such as usb
 host adapters. It is a waste and useless for those devices. This is the
 main reason.
3. virtio-net device's parent is virtio-pci device, which configured id 
property,
 But the device saved in global fw_boot_order list is virtio-net device have not
 id property. If we put call del_boot_device_path(dev) in 
virtio_net_device_unrealize
 we can delete it from fw_boot_order directly.

Best regards,
-Gonglei


reply via email to

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