From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afnOq-0004N9-CR for qemu-devel@nongnu.org; Tue, 15 Mar 2016 07:44:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afnOm-0007Yz-Bx for qemu-devel@nongnu.org; Tue, 15 Mar 2016 07:44:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afnOm-0007Ym-7V for qemu-devel@nongnu.org; Tue, 15 Mar 2016 07:44:28 -0400 References: <1457014732-19428-1-git-send-email-marcel@redhat.com> <56E7C13B.6010601@cn.fujitsu.com> From: Marcel Apfelbaum Message-ID: <56E7F597.9060506@redhat.com> Date: Tue, 15 Mar 2016 13:44:23 +0200 MIME-Version: 1.0 In-Reply-To: <56E7C13B.6010601@cn.fujitsu.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V4] hw/pxb: add chassis_nr property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cao jin , qemu-devel@nongnu.org Cc: marcel@redhat.com, ehabkost@redhat.com, laine@redhat.com, mst@redhat.com On 03/15/2016 10:00 AM, Cao jin wrote: > Hi, > > On 03/03/2016 10:18 PM, Marcel Apfelbaum wrote: >> Add a chassis_nr property instead of using PXB bus number >> as internal bridge's chassis nr. >> >> Suggested-by: Michael S. Tsirkin >> Signed-off-by: Marcel Apfelbaum >> --- >> v3->v4: >> - re-coded to fit current codebase >> v2->v3: >> - use bus nr if chassis nr is 0 (Micahel S. Tsirkin) >> v1->v2: >> - Rebased on master >> >> docs/pci_expander_bridge.txt | 7 +++---- >> hw/pci-bridge/pci_expander_bridge.c | 21 +++++++++++++++++++-- >> 2 files changed, 22 insertions(+), 6 deletions(-) >> > >> >> @@ -286,6 +294,8 @@ static Property pxb_dev_properties[] = { >> /* Note: 0 is not a legal a PXB bus number. */ > > better remove the latter "a", or I guess it will conflict with my previous pxb cleanup patch. sure, thanks for bringing it up. > >> DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0), >> DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNED), >> + /* Note: 0 is not a legal chassis number. */ >> + DEFINE_PROP_UINT8("chassis_nr", PXBDev, chassis_nr, 0), >> DEFINE_PROP_END_OF_LIST(), >> }; >> >> @@ -322,6 +332,13 @@ static int pxb_pcie_dev_initfn(PCIDevice *dev) >> return pxb_dev_init_common(dev, true); >> } >> >> +static Property pxb_pcie_dev_properties[] = { >> + /* Note: 0 is not a legal a PXB bus number. */ > > likewise ok > >> + DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0), >> + DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNED), >> + DEFINE_PROP_END_OF_LIST(), >> +}; > > And I have another personal question: In qemu design, it seems every pci bridge reside in a separate chassis, what`s benefit? why don`t put them all in the main chassis? Please have a look on pci-to-pci bridge specification, chapter 13, slot numbering. Thanks for the review, Marcel >