From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37660 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PKTSe-0002cA-Q8 for qemu-devel@nongnu.org; Mon, 22 Nov 2010 05:17:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PKTSW-0002Rm-Dy for qemu-devel@nongnu.org; Mon, 22 Nov 2010 05:17:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PKTSW-0002RG-7C for qemu-devel@nongnu.org; Mon, 22 Nov 2010 05:17:16 -0500 Message-ID: <4CEA4326.2040009@redhat.com> Date: Mon, 22 Nov 2010 11:17:10 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for devices. References: <1290077118-11577-1-git-send-email-kraxel@redhat.com> <4CE732CB.2060708@codemonkey.ws> In-Reply-To: <4CE732CB.2060708@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: qemu-devel@nongnu.org > I understand why you're adding this but this is one of those horrible > abuses of qdev that we really need to avoid. > > There are two valid reasons why hotplug is not possible: > > 1) Hotplugging is not supported by the *slot*. This is something that > needs to be exposes through ACPI. This is not a qdev property, but a > property of a PCI slot. Well, yea, right. Sort of. The ACPI thing applies to some of the slots only. But, yes, strictly speaking this is a slot not a device property in the case of PCI. Problem is qemu doesn't really has an idea what a pci slot is ... > It's very important that we do this correctly > because Windows puts a little icon in the systray that advertises > quick-removal of devices in slots that support hotplug. Indeed. > 2) The PCI device is soldered to the MB or is otherwise not part of a > PCI slot. Again, this is part of the ACPI definition. (3) The qemu emulation can't handle hot-unplug. > Since the PIIX3 lives in slot 1, our ACPI tables should not advertise > slot 0 or slot 1 as supporting hotplug. They do currently. Should be easily fixable. > Hotplug information has no business being part of the core qdev > structures. Hotplug is a PCI concept and the information needs to live > at the PCI layer to be meaningfully. Wrong. PCI certainly isn't the only bus which supports hotplug. It *does* make sense to handle generic hotplug stuff at qdev level. > An ideal interface would explicitly allow a user to mark a series of PCI > slots as no supporting hotplug. It would be convenient in order to > ensure that your virtio-net wasn't accidentally ejected by a click-happy > Windows user. Indeed. That one is a bit harder I suspect. Can this be done without generating acpi tables dynamically? cheers, Gerd