From patchwork Tue Apr 14 14:39:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Elisei X-Patchwork-Id: 11487937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0C9792C for ; Tue, 14 Apr 2020 14:40:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A216C2075E for ; Tue, 14 Apr 2020 14:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391074AbgDNOkc (ORCPT ); Tue, 14 Apr 2020 10:40:32 -0400 Received: from foss.arm.com ([217.140.110.172]:57142 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391045AbgDNOkE (ORCPT ); Tue, 14 Apr 2020 10:40:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6566DC14; Tue, 14 Apr 2020 07:40:04 -0700 (PDT) Received: from e123195-lin.cambridge.arm.com (e123195-lin.cambridge.arm.com [10.1.196.63]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 76D363F73D; Tue, 14 Apr 2020 07:40:03 -0700 (PDT) From: Alexandru Elisei To: kvm@vger.kernel.org Cc: will@kernel.org, julien.thierry.kdev@gmail.com, andre.przywara@arm.com, sami.mujawar@arm.com, lorenzo.pieralisi@arm.com Subject: [PATCH kvmtool 06/18] arm/pci: Advertise only PCI bus 0 in the DT Date: Tue, 14 Apr 2020 15:39:34 +0100 Message-Id: <20200414143946.1521-7-alexandru.elisei@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414143946.1521-1-alexandru.elisei@arm.com> References: <20200414143946.1521-1-alexandru.elisei@arm.com> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The "bus-range" property encodes the PCI bus number of the PCI controller and the largest bus number of any PCI buses that are subordinate to this node [1]. kvmtool emulates only PCI bus 0. Advertise this in the PCI DT node by setting "bus-range" to <0,0>. [1] IEEE Std 1275-1994, Section 3 "Bus Nodes Properties and Methods" Reviewed-by: Andre Przywara Signed-off-by: Alexandru Elisei --- arm/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/pci.c b/arm/pci.c index 557cfa98938d..ed325fa4a811 100644 --- a/arm/pci.c +++ b/arm/pci.c @@ -30,7 +30,7 @@ void pci__generate_fdt_nodes(void *fdt) struct of_interrupt_map_entry irq_map[OF_PCI_IRQ_MAP_MAX]; unsigned nentries = 0; /* Bus range */ - u32 bus_range[] = { cpu_to_fdt32(0), cpu_to_fdt32(1), }; + u32 bus_range[] = { cpu_to_fdt32(0), cpu_to_fdt32(0), }; /* Configuration Space */ u64 cfg_reg_prop[] = { cpu_to_fdt64(KVM_PCI_CFG_AREA), cpu_to_fdt64(ARM_PCI_CFG_SIZE), };