From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49463 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOD25-0001jy-0t for qemu-devel@nongnu.org; Mon, 14 Jun 2010 13:01:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOD1x-0008CX-6h for qemu-devel@nongnu.org; Mon, 14 Jun 2010 13:01:02 -0400 Received: from mail-yw0-f190.google.com ([209.85.211.190]:51272) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOD1x-0008CP-4V for qemu-devel@nongnu.org; Mon, 14 Jun 2010 13:01:01 -0400 Received: by ywh28 with SMTP id 28so3318756ywh.28 for ; Mon, 14 Jun 2010 10:00:57 -0700 (PDT) Message-ID: <4C16600A.4030208@codemonkey.ws> Date: Mon, 14 Jun 2010 11:59:54 -0500 From: Anthony Liguori 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> In-Reply-To: <4C0FA4B9.7090906@redhat.com> 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: Gerd Hoffmann Cc: Marcos Oviedo , qemu-devel@nongnu.org On 06/09/2010 09:27 AM, Gerd Hoffmann wrote: > Hi, > >> This make sense when you mistakenly add a pci device on a -s -S >> scenario, like the scenario described on the following bug: >> https://bugs.launchpad.net/qemu/+bug/544367. > > It doesn't IMHO. > >> When ACPI-based hotplug support is present on the guest and we run >> pci_del with the force option, the hotplug events will still be >> generated to the guest and the guest still will trigger the EJx event, >> which will end by calling pciej_write() on qemu side. This function will >> do nothing on a -f and pci hotplug support scenario, as the pci device >> was previously removed by pci_del. > > And in case the guest wants to do anything (like flushing dirty > buffers) before triggering the EJx event it will horribly fail. > > 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. pci_del returning with no error and yet not having the operation complete is certainly a usability issue. Regards, Anthony Liguori > cheers, > Gerd > > >