From: Jun Li <junmuzi@gmail.com>
To: "Andreas Färber" <afaerber@suse.de>,
"Michael S. Tsirkin" <mst@redhat.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: Thu, 22 May 2014 22:58:23 +0800 [thread overview]
Message-ID: <537E108F.3010901@gmail.com> (raw)
In-Reply-To: <537C601F.6020509@suse.de>
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 <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.
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
next prev parent reply other threads:[~2014-05-22 14:59 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
2014-05-22 14:58 ` Jun Li [this message]
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=537E108F.3010901@gmail.com \
--to=junmuzi@gmail.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=famz@redhat.com \
--cc=juli@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).