All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: "Michael S. Tsirkin" <mst@redhat.com>, Jun Li <junmuzi@gmail.com>
Cc: kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com,
	marcel.a@redhat.com, juli@redhat.com, qemu-devel@nongnu.org,
	Gerd Hoffmann <kraxel@redhat.com>,
	aliguori@amazon.com, pbonzini@redhat.com
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	[thread overview]
Message-ID: <537C601F.6020509@suse.de> (raw)
In-Reply-To: <20140519155703.GC31595@redhat.com>

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 <junmuzi@gmail.com>
>>> ---
>>> 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	other threads:[~2014-05-21  8:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 15:03 [Qemu-devel] [PATCH v3] Add remove_boot_device_path() function for hot-unplug device Jun Li
2014-05-19 15:31 ` Andreas Färber
2014-05-19 15:57   ` Michael S. Tsirkin
2014-05-21  8:13     ` Andreas Färber [this message]
2014-05-22 14:58       ` Jun Li
2014-05-21  7:50   ` Jun Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=537C601F.6020509@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=famz@redhat.com \
    --cc=juli@redhat.com \
    --cc=junmuzi@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.