From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxU7R-00045z-R2 for qemu-devel@nongnu.org; Thu, 19 Jun 2014 00:38:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxU7N-0007K6-BM for qemu-devel@nongnu.org; Thu, 19 Jun 2014 00:38:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxU7N-0007HH-2q for qemu-devel@nongnu.org; Thu, 19 Jun 2014 00:38:33 -0400 Date: Thu, 19 Jun 2014 12:38:20 +0800 From: Amos Kong Message-ID: <20140619043820.GA3558@z.redhat.com> References: <1403108653-26765-1-git-send-email-akong@redhat.com> <1403108653-26765-5-git-send-email-akong@redhat.com> <20140619034908.GC21236@stefanha-thinkpad.redhat.com> <20140619035744.GD32534@z.redhat.com> <33183CC9F5247A488A2544077AF1902086C0AD88@SZXEMA503-MBS.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33183CC9F5247A488A2544077AF1902086C0AD88@SZXEMA503-MBS.china.huawei.com> Subject: Re: [Qemu-devel] [PATCH v5 4/4] virtio-blk-test.c: add hotplug subtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gonglei (Arei)" Cc: "kwolf@redhat.com" , Stefan Hajnoczi , "qemu-devel@nongnu.org" , "afaerber@suse.de" , "pbonzini@redhat.com" On Thu, Jun 19, 2014 at 04:03:28AM +0000, Gonglei (Arei) wrote: > Hi, > > > -----Original Message----- > > From: Amos Kong [mailto:akong@redhat.com] > > Sent: Thursday, June 19, 2014 11:58 AM > > To: Stefan Hajnoczi > > Cc: qemu-devel@nongnu.org; Gonglei (Arei); afaerber@suse.de; > > pbonzini@redhat.com; kwolf@redhat.com > > Subject: Re: [PATCH v5 4/4] virtio-blk-test.c: add hotplug subtest > > > > On Thu, Jun 19, 2014 at 11:49:08AM +0800, Stefan Hajnoczi wrote: > > > On Thu, Jun 19, 2014 at 12:24:13AM +0800, Amos Kong wrote: > > > > + for (i = MIN_PCI_SLOT; i <= MAX_PCI_SLOT; i++) { > > > > + for (j = MAX_PCI_FUNC; j >= 0; j--) { > > > > + if (j == MAX_PCI_FUNC) { > > > > + qmp_exec_hmp_cmd("", "drive_del drv-%x.%x", i, 0); > > > > + } > > > > > > Why is only drv-%x.0 deleted? Previous revisions of this patch series > > > deleted all drives. > > > > Hot-unplug any single function, all functions in the slot will be > > removed. So once is enough. > > > IMHO, the below devices as the same as the drive about multifunction hot-unplug, right? I'm wrong. drive should be hot-unplugged one by one, device will be removed by slot. PCI device has multifunction feature, not drive. > Best regards, > -Gonglei -- Amos.