From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39589 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OORmw-00021R-7f for qemu-devel@nongnu.org; Tue, 15 Jun 2010 04:46:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OORmv-0006LI-7r for qemu-devel@nongnu.org; Tue, 15 Jun 2010 04:46:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15098) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OORmv-0006L8-0L for qemu-devel@nongnu.org; Tue, 15 Jun 2010 04:46:29 -0400 Message-ID: <4C173DD7.9050805@redhat.com> Date: Tue, 15 Jun 2010 10:46:15 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] monitor: Add force option support to pci_del command References: <4C0F450B.5000802@redhat.com> <4C0FA4B9.7090906@redhat.com> <4C16600A.4030208@codemonkey.ws> In-Reply-To: <4C16600A.4030208@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Marcos Oviedo , qemu-devel@nongnu.org Hi, >> If the guest is stopped while unplugging the device the unplug should >> happen as soon as the guest is unpaused. > > This is a case where the fundamental problem is that the pci_del command > should block until the guest has actually responded to the request. You can't block. Unplug might never ever happen for various reasons. IMHO the only sane way to handle it is sending a event when the unplug is done. > pci_del returning with no error and yet not having the operation > complete is certainly a usability issue. There simply is no clear error condition. If the guest didn't respond (yet) you don't know whenever it just needs a bit more time to shutdown the device or if unplugging the device failed. cheers, Gerd