qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] monitor: Add force option support to pci_del co


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] monitor: Add force option support to pci_del command
Date: Tue, 15 Jun 2010 11:03:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Anthony Liguori <address@hidden> writes:

> 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.

s/pci_del/device_del/g  :)

What should device_del do?  Wait until ACPI reports that the guest has
processed the unplug event?  What if the guest doesn't?  Hanging
indefinitely is not an option.  Can we reliably detect this case?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]