From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn1eU-0001Oj-Py for qemu-devel@nongnu.org; Wed, 21 May 2014 04:13:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wn1eL-0003Gk-J6 for qemu-devel@nongnu.org; Wed, 21 May 2014 04:13:30 -0400 Received: from cantor2.suse.de ([195.135.220.15]:51320 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn1eL-0003Ge-DY for qemu-devel@nongnu.org; Wed, 21 May 2014 04:13:21 -0400 Message-ID: <537C601F.6020509@suse.de> Date: Wed, 21 May 2014 10:13:19 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1400511808-16929-1-git-send-email-junmuzi@gmail.com> <537A23DF.30807@suse.de> <20140519155703.GC31595@redhat.com> In-Reply-To: <20140519155703.GC31595@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3] Add remove_boot_device_path() function for hot-unplug device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , Jun Li Cc: kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com, marcel.a@redhat.com, juli@redhat.com, qemu-devel@nongnu.org, Gerd Hoffmann , aliguori@amazon.com, pbonzini@redhat.com Am 19.05.2014 17:57, schrieb Michael S. Tsirkin: > On Mon, May 19, 2014 at 05:31:43PM +0200, Andreas F=E4rber wrote: >> Hi, >> >> Am 19.05.2014 17:03, schrieb Jun Li: >>> Add remove_boot_device_path() function to remove bootindex when hot-u= nplug >>> a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-gener= ic device. >>> >>> Signed-off-by: Jun Li >>> --- >>> This patch also fixed bug1086603, ref: >>> https://bugzilla.redhat.com/show_bug.cgi?id=3D1086603 >>> >>> This version of patch delete dev and suffix parameter from function r= emove_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 n= ew >> 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 a= nd >> USB devices are. >=20 > 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg