From: Ian Jackson Subject: Re: [PATCH, RFC]: qemu: hang-free/error-tolerant PCI hot-plug protocol Date: Fri, 30 Jul 2010 14:40:13 +0100 Message-ID: <19538.54845.682500.241310@mariner.uk.xensource.com> References: <1280426058.1723.2266.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1280426058.1723.2266.camel@qabil.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gianni Tedesco Cc: Xen Devel List-Id: xen-devel@lists.xenproject.org Gianni Tedesco writes ("[Xen-devel] [PATCH, RFC]: qemu: hang-free/error-tolerant PCI hot-plug protocol"): > The interface for PCI hotplug is flexible enough to shoot ones-self in > the foot. It is possible to try to insert a PCI device in to a slot > already occupied by a qemu emulated device (NIC, PIIX, ISA-bridge, etc.) > In this case qemu (wisely) refuses to do the hotplug. Since there is no > way for a toolstack to query qemu's pci device layout there is no way to > check for this ahead of time. In this case the toolstack must wait for > device-model state to change to pci-inserted which never happens. Hrm. > I propose that when qemu decides not to hot-plug a device that it raise > the "pci-inserted" status anyway. The tools must then check the > "parameter" key in xenbus for a non-error string. In other words: Why do this rather than a new status "pci-insert-failed" ? How does this affect existing toolstacks ? > --- a/hw/piix4acpi.c > +++ b/hw/piix4acpi.c I haven't looked at the code near here. Does qemu log anything ? If so then the corresponding toolstack patches should say "consult qemu logfile". Otherwise perhaps qemu should. Ian.