From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49989 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODyT2-0005ge-8V for qemu-devel@nongnu.org; Mon, 17 May 2010 07:26:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODyMS-0006bb-Ok for qemu-devel@nongnu.org; Mon, 17 May 2010 07:19:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29113) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODyMS-0006bJ-HQ for qemu-devel@nongnu.org; Mon, 17 May 2010 07:19:52 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4HBJp5k021204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 May 2010 07:19:51 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc References: <1273086712-29163-1-git-send-email-lcapitulino@redhat.com> <1273086712-29163-2-git-send-email-lcapitulino@redhat.com> <4BEC031D.6020506@redhat.com> <4BED6F85.50309@redhat.com> <4BED83BD.8000604@redhat.com> <4BF107E1.2020600@redhat.com> Date: Mon, 17 May 2010 13:19:49 +0200 In-Reply-To: <4BF107E1.2020600@redhat.com> (Avi Kivity's message of "Mon, 17 May 2010 12:09:53 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: bazulay@redhat.com, juzhang@redhat.com, Gerd Hoffmann , qemu-devel@nongnu.org, Luiz Capitulino Avi Kivity writes: > On 05/17/2010 11:27 AM, Markus Armbruster wrote: >> >> >>>>> A slot is the hotpluggable entity. Open your computer and you can >>>>> actually see them. >>>>> >>>>> >>>> QEMU doesn't really know that. >>>> >>>> >>> How can that be? Do we signal hotplug notifications to a function or >>> to a slot? >>> >>> Can we hotplug a single function in an already occupied slot? >>> >> What I meant to say: we have no concept of "slot" in the higher level >> interfaces, we have only bus and device. >> >> If a PCI device has multiple functions, we have a separate qdev device >> for each function. You can't unplug a "slot" (concept doesn't exist in >> qdev), only a qdev device. Naturally, when you unplug a qdev device, >> all functions in the same PCI slot need to go. This happens deep down >> in the bowels of ACPI, in piix4_device_hotplug(). qdev is not aware of >> this magic relation between the qdev devices for functions in the same >> slot. >> > > IMO, that's a serious bug. A slot is a user visible entity, both in > that devices can only be hotplugged only as slots, not functions, and > to determine the maximum number of devices you can add. If the user > knows about it, qemu should too. > > We can easily represent a slot/device as a qbus with each of the > functions as devices attached to it. Dunno. Gerd, what do you think?