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: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v3] Add remove_boot_device_path() function for hot-unplug device
Date: Wed, 21 May 2014 10:13:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

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.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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