From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLPA9-0007w5-40 for qemu-devel@nongnu.org; Tue, 01 Nov 2011 20:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLPA7-0002Xg-IO for qemu-devel@nongnu.org; Tue, 01 Nov 2011 20:58:41 -0400 Received: from [222.73.24.84] (port=53546 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLPA6-0002Wz-GC for qemu-devel@nongnu.org; Tue, 01 Nov 2011 20:58:39 -0400 Message-ID: <4EB09623.9090009@cn.fujitsu.com> Date: Wed, 02 Nov 2011 09:00:19 +0800 From: Wen Congyang MIME-Version: 1.0 References: <20110704094358.GA10960@redhat.com> <4E801927.8020708@cn.fujitsu.com> <20110926070824.GB5860@redhat.com> <4EAF4AFD.6040102@cn.fujitsu.com> <20111101084439.GA11958@redhat.com> <4EAFB284.1010601@cn.fujitsu.com> <20111101114817.GB13434@redhat.com> In-Reply-To: <20111101114817.GB13434@redhat.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [PATCH] pci: add standard bridge device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel At 11/01/2011 07:48 PM, Michael S. Tsirkin Write: > On Tue, Nov 01, 2011 at 04:49:08PM +0800, Wen Congyang wrote: >> At 11/01/2011 04:44 PM, Michael S. Tsirkin Write: >>> On Tue, Nov 01, 2011 at 09:27:25AM +0800, Wen Congyang wrote: >>>> Hi, Michael S. Tsirkin >>>> >>>> At 09/26/2011 03:08 PM, Michael S. Tsirkin Write: >>>>> On Mon, Sep 26, 2011 at 02:18:15PM +0800, Wen Congyang wrote: >>>>>> Hi, Michael S. Tsirkin >>>>>> >>>>>> At 07/04/2011 05:43 PM, Michael S. Tsirkin Write: >>>>>>> This adds support for a standard pci to pci bridge, >>>>>>> enabling support for more than 32 PCI devices in the system. >>>>>>> To use, specify the device id as a 'bus' option. >>>>>>> Example: >>>>>>> -device pci-bridge,id=bridge1 \ >>>>>>> -netdev user,id=u \ >>>>>>> -device ne2k_pci,id=net2,bus=bridge1,netdev=u >>>>>>> >>>>>>> TODO: device hotplug support. >>>>>> >>>>>> Do you have any plan to implement this? >>>>> >>>>> I think this will be needed before merging the bridge code. >>>> >>>> What will you plan to support? >>>> >>>> 1. all PCI-to-PCI bridge is not hotpluggable. >>>> host bridge >>>> | >>>> --------------------- >>>> | | >>>> bridge bridge <= *not* hotpluggable >>>> | | >>>> ----------- ------------ >>>> | | | | >>>> slot slot slot slot <= hotplug here >>>> >>>> >>>> 2. PCI-to-PCI bridge is hotpluggable. >>>> bridge >>>> | >>>> ------------------- >>>> | | >>>> bridge on slot bridge on slot <= hot-plug here >>>> | | >>>> ------- ------- >>>> | | | | >>>> slot slot slot slot <= hot-plug here > > It seems easier to start with a non hotpluggable bridge. > I'm still trying to understand how is bridge hotplug > supposed to work under ACPI, which wants all devices > described in a static page. We can load ACPI SSDT dynamically. But I do not know whether guest OS supports it. > >>>>> >>>>>> I read the qemu's code, and find that qemu uses PIIX4_PM to support >>>>>> pci device hot plugging on PCI bus 0. How to support it on the other >>>>>> bus? Add PIIX4_PM to each PCI bus or implement a new power management? >>>>>> >>>>>> Thanks >>>>>> Wen Congyang >>>>> >>>>> There are many valid options. One is shpc interface. >>>>> I started looking into this but got preempted by other >>>>> tasks. Hope to get back to this at some point. >>>> >>>> Some old OS does not support shpc. So I think it's better to use ACPI to do it. > > Yes, but ACPI can drive SHPC. Yes. But if we implement SHPC, we should also to implement ACPI. > >>>> Currently, we get which device is removed or inserted by reading the I/O port >>>> 0xae00(length: 8 bytes), and _EJ0 method uses I/O port 0xae08(length: 4 bytes). >>>> How do we determine this I/O address? Is there any spec to describe it? > > I don't think so. If we support hotplug behind PCI-to-PCI bridge, there are more than 32 slots that can be hotpluggable. How do we know which device is remove or inserted? The I/O region 0xae00 (length: 8bytes) only supports 32 slots. Thanks Wen Congyang > >>>> Thanks >>>> Wen Congyang >>> >>> Can we discuss these questions on the mailing list? >> >> No problem. >> I have cced qemu mailing list. >> >> Thanks >> Wen Congyang >