qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3] Add remove_boot_device_path() function for h


From: Jun Li
Subject: Re: [Qemu-devel] [PATCH v3] Add remove_boot_device_path() function for hot-unplug device
Date: Thu, 22 May 2014 22:58:23 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/21/2014 04:13 PM, Andreas Färber wrote:
Am 19.05.2014 17:57, schrieb Michael S. Tsirkin:
On Mon, May 19, 2014 at 05:31:43PM +0200, Andreas Färber wrote:
Hi,

Am 19.05.2014 17:03, schrieb Jun Li:
Add remove_boot_device_path() function to remove bootindex when hot-unplug
a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device.

Signed-off-by: Jun Li <address@hidden>
---
This patch also fixed bug1086603, ref:
https://bugzilla.redhat.com/show_bug.cgi?id=1086603

This version of patch delete dev and suffix parameter from function 
remove_boot_device_path().
---
  hw/block/virtio-blk.c   |  1 +
  hw/net/virtio-net.c     |  1 +
  hw/scsi/scsi-disk.c     |  1 +
  hw/scsi/scsi-generic.c  |  1 +
On v1 I believe I reminded you of spapr_llan. Your patch is adding a new
remove_*() function, but is using it only for roughly half of the
devices that currently call add_boot_device_path(). Why? I can
understand that ISA devices will not be hot-unpluggable, but all PCI and
USB devices are.
Can we remove the device from boot path automatically
when it's going away?
I'm not familiar with that code myself; assuming that only one path gets
registered per device, I guess we could add a field to DeviceState and
if non-NULL call the unregistration from device_set_unrealize().

Jun, if that works it would save you some work.


Hi Andreas,

Add a field to DeviceState is another method to fix this issue. But when using this method, should delete add_boot_device_path() and add boot path in register per device. I can not estimate the potential issues. Could any guy give your opinion? I will do some researches this weekend. Thx.

Add remove_boot_device_path(), we can call this function where it needs. It's easy to realize. :-)


Best Regards,
Jun Li



reply via email to

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