[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 4/8] bootindex: delete bootindex when device
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH v4 4/8] bootindex: delete bootindex when device is removed |
Date: |
Mon, 4 Aug 2014 06:33:21 +0000 |
Best regards,
-Gonglei
> -----Original Message-----
> From: Eduardo Habkost [mailto:address@hidden
> Sent: Friday, August 01, 2014 10:46 PM
> To: Gonglei (Arei)
> Cc: address@hidden; chenliang (T); Huangweidong (C);
> address@hidden; address@hidden; address@hidden;
> address@hidden; address@hidden; address@hidden;
> address@hidden; address@hidden; address@hidden;
> Luonengjun; Huangpeng (Peter); address@hidden; address@hidden;
> address@hidden; address@hidden; address@hidden;
> address@hidden; address@hidden; address@hidden
> Subject: Re: [Qemu-devel] [PATCH v4 4/8] bootindex: delete bootindex when
> device is removed
>
> On Thu, Jul 31, 2014 at 05:47:29PM +0800, address@hidden wrote:
> > From: Gonglei <address@hidden>
> >
> > Device should be removed from global boot list when
> > it is hot-unplugged.
> >
> > Signed-off-by: Chenliang <address@hidden>
> > Signed-off-by: Gonglei <address@hidden>
> > ---
> > hw/block/virtio-blk.c | 1 +
> > hw/i386/kvm/pci-assign.c | 1 +
> > hw/misc/vfio.c | 1 +
> > hw/net/e1000.c | 1 +
> > hw/net/eepro100.c | 1 +
> > hw/net/ne2000.c | 1 +
> > hw/net/rtl8139.c | 1 +
> > hw/net/virtio-net.c | 1 +
> > hw/net/vmxnet3.c | 1 +
> > hw/scsi/scsi-generic.c | 1 +
> > hw/usb/dev-network.c | 1 +
> > hw/usb/host-libusb.c | 1 +
> > hw/usb/redirect.c | 1 +
> > 13 files changed, 13 insertions(+)
>
> Grepping for add_boot_device_path, I don't see corresponding
> del_boot_device_path() calls in this patch for the following:
>
> hw/ide/qdev.c: add_boot_device_path(dev->conf.bootindex,
> &dev->qdev,
> hw/block/fdc.c: add_boot_device_path(isa->bootindexA, dev,
> "/address@hidden");
> hw/block/fdc.c: add_boot_device_path(isa->bootindexB, dev,
> "/address@hidden");
> hw/net/pcnet.c: add_boot_device_path(s->conf.bootindex, dev,
> "/address@hidden");
> hw/net/spapr_llan.c: add_boot_device_path(dev->nicconf.bootindex,
> DEVICE(dev), "");
> hw/scsi/scsi-disk.c: add_boot_device_path(s->qdev.conf.bootindex,
> &dev->qdev, NULL);
>
> Why we don't need del_boot_device_path() calls for those?
>
I think those device don't support hot-plug/hot-unplug. So, needn't call
del_boot_device_path(). But maybe I make a mistake for pcnet and scsi-disk.
I will adopt Gerd's suggestion in v5:
call this from device_finalize() instead of placing it into each
individual device.
Thanks.
> These seem to be OK, and are handled by this patch:
>
> hw/i386/kvm/pci-assign.c: add_boot_device_path(dev->bootindex,
> &pci_dev->qdev, NULL);
> hw/block/virtio-blk.c: add_boot_device_path(s->conf->bootindex, dev,
> "/address@hidden,0");
> hw/misc/vfio.c: add_boot_device_path(vdev->bootindex, &pdev->qdev,
> NULL);
> hw/net/rtl8139.c: add_boot_device_path(s->conf.bootindex, d,
> "/address@hidden");
> hw/net/e1000.c: add_boot_device_path(d->conf.bootindex, dev,
> "/address@hidden");
> hw/net/eepro100.c: add_boot_device_path(s->conf.bootindex,
> &pci_dev->qdev, "/address@hidden");
> hw/net/ne2000.c: add_boot_device_path(s->c.bootindex,
> &pci_dev->qdev, "/address@hidden");
> hw/net/virtio-net.c: add_boot_device_path(n->nic_conf.bootindex, dev,
> "/address@hidden");
> hw/net/vmxnet3.c: add_boot_device_path(s->conf.bootindex, dev,
> "/address@hidden");
> hw/scsi/scsi-generic.c: add_boot_device_path(s->conf.bootindex,
> &s->qdev, NULL);
> hw/usb/dev-network.c: add_boot_device_path(s->conf.bootindex,
> &dev->qdev, "/address@hidden");
> hw/usb/host-libusb.c: add_boot_device_path(s->bootindex,
> &udev->qdev, NULL);
> hw/usb/redirect.c: add_boot_device_path(dev->bootindex,
> &udev->qdev, NULL);
>
> This one has dev==NULL, so it looks OK:
>
> hw/core/loader.c: add_boot_device_path(bootindex, NULL, devpath);
>
> This is modify_boot_device_path(), so it's OK:
>
> vl.c: add_boot_device_path(bootindex, dev, old_entry->suffix);
>
> --
> Eduardo