[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
- Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function, (continued)
- Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function, Gonglei (Arei), 2014/07/28
- Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function, Gerd Hoffmann, 2014/07/28
- Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function, Gonglei (Arei), 2014/07/28
- Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function, Gonglei (Arei), 2014/07/28
- Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function, Gonglei (Arei), 2014/07/29
[Qemu-devel] [PATCH v2 5/7] qmp: add set-bootindex command, arei.gonglei, 2014/07/25
[Qemu-devel] [PATCH v2 3/7] fw_cfg: add fw_cfg_machine_reset function, arei.gonglei, 2014/07/25
[Qemu-devel] [PATCH v2 4/7] bootindex: delete bootindex when device is removed, arei.gonglei, 2014/07/25
[Qemu-devel] [PATCH v2 6/7] qemu-monitor: HMP set-bootindex wrapper, arei.gonglei, 2014/07/25