From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47F3FC4338F for ; Mon, 26 Jul 2021 18:10:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0DA5B604DB for ; Mon, 26 Jul 2021 18:10:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0DA5B604DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=CFwKsboxCEzYMwvwceJiCId48xbz1U4J4mW5rDIK9Vo=; b=0OEH8pvnMgdejS LwB5YxvexhoGLiYHaho56JS1i51tQPzlATUC3kedTY9qfA4d1BUpytyt3EiS0v/Mvl7BD6En4GDyX ITLJeQcbVxAthOpHRF4/CYHoxMHOg9WgXWSv6TcT3SqA7W1Sh3/lMpUyomxqwAE5meiZcbAe5roFa meUcYO8aZwhSPVxTd1mKShf8mqvbhA08gN518YMNjkG5erfX4zMghrrj8a3bo/RIubu5o2G/BKdkW auJoNvKC4/TSzKkPCqpbnI7FH7NqEnJrOAqqcpveTFJn51XG8kn7gupddNg6SOqZo9lJnQ/qQHKSH jMtmTrHYZT+q0hNuA5Hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m850u-00CBsg-Ui; Mon, 26 Jul 2021 18:07:41 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m850d-00CBn8-7G for linux-arm-kernel@lists.infradead.org; Mon, 26 Jul 2021 18:07:26 +0000 Received: by mail-il1-x134.google.com with SMTP id c3so9829617ilh.3 for ; Mon, 26 Jul 2021 11:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=K5lFoMgyXkemiYngT6HomI4alStah0h/A9+JLDPEl1A=; b=TmKs095aDXGT+gwqQrAmUCutNKy0QaDyqxdbmnS/5SCQxvwn/QKhqFsyAL9aoZiyY+ 5ImE6Jt5EPwKUUKcVDeNWEIUsNyDNzH+Pkyl6fqgTy2ml/ch+IXmgMvKxOOZC6l/8dGj gB9MiZkP2XATavcuGtm3tnpCn3INnDnxSvI8crsP6EQw6D9FgpGdu+OXEAfxzoDwfHn3 8dGba8WrzUnoZIw26ytZws2gBVDtnMqlXuy9imTzQocri0qasBdc05vc4/cJge8AlJem oeil6AQwI+X0FjTp4k0LMVaENFeZYtNpLxkRU91lfv8qsSoG7SkUWK7kQiqb0kNetwoG UkCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=K5lFoMgyXkemiYngT6HomI4alStah0h/A9+JLDPEl1A=; b=US2eRWAJMph6PhZy5fb0FvWYOx7ld+idyQ9NafZnzqZXPq2dj91ZuE8ZSIs+qbeNvV bAHpEx+tbm7M5vjx83U4fajfQVsFtnbByUfJb5lFeM/NKY43kIflcLJrnHZ4GtrDLgmw /fvmvcS5J8tc7V8c/GMmeBAQx/lZrFt7pUmTSYTgThM0dVTkuP98Vv6AbAK5cfF3H0aU /xspRoPo8KRpP2PW0HYqU8EirCEHQGEhp3VPidnJYk1SKtjAs260Ib9cHmK6fZp8emmd Rh34PGsI5A9zylLWGeHQfOHiGODBIQ7Ct3YvRxxjnkejCmOangmw5WNgqefJVvEDKb9/ zMSA== X-Gm-Message-State: AOAM532oDDzcTm3HkcQBDF/wimvY2I+RzsTL66CWD1Nu/uItMJKEvWh4 I4Al2MmEy8X5lpMfaFSUXQA= X-Google-Smtp-Source: ABdhPJzOerlWOLVjwwhv9n1/8RjuUNM7aAXhzZH25e1iZayaqLrXVJ53diW7Q58BP+trWts/FoXwrw== X-Received: by 2002:a92:d990:: with SMTP id r16mr14424299iln.204.1627322842266; Mon, 26 Jul 2021 11:07:22 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id a11sm220697ilf.79.2021.07.26.11.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 11:07:21 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id A727C27C0066; Mon, 26 Jul 2021 14:07:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 26 Jul 2021 14:07:20 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrgeehgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeeuohhquhhnucfh vghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrthhtvg hrnhepieeuveejleehudetfeevfeelgfejteefhedvkedukefggedugefhudfhteevjedu necuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpegsohhquhhnodhmvghsmhhtphgruhhthhhpvghr shhonhgrlhhithihqdeiledvgeehtdeigedqudejjeekheehhedvqdgsohhquhhnrdhfvg hngheppehgmhgrihhlrdgtohhmsehfihigmhgvrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 26 Jul 2021 14:07:19 -0400 (EDT) From: Boqun Feng To: Bjorn Helgaas , Arnd Bergmann , Marc Zyngier , Lorenzo Pieralisi Cc: Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Rob Herring , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Boqun Feng , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, Sunil Muthuswamy , Mike Rapoport Subject: [PATCH v6 0/8] PCI: hv: Support host bridge probing on ARM64 Date: Tue, 27 Jul 2021 02:06:49 +0800 Message-Id: <20210726180657.142727-1-boqun.feng@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210726_110723_321660_FB0F5A41 X-CRM114-Status: GOOD ( 11.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This is the v6 for the preparation of virtual PCI support on Hyper-V ARM64, Previous versions: v1: https://lore.kernel.org/lkml/20210319161956.2838291-1-boqun.feng@gmail.com/ v2: https://lore.kernel.org/lkml/20210503144635.2297386-1-boqun.feng@gmail.com/ v3: https://lore.kernel.org/lkml/20210609163211.3467449-1-boqun.feng@gmail.com/ v4: https://lore.kernel.org/lkml/20210714102737.198432-1-boqun.feng@gmail.com/ v5: https://lore.kernel.org/lkml/20210720134429.511541-1-boqun.feng@gmail.com/ Changes since last version: * Rebase to 5.14-rc3 * Comment fixes as suggested by Bjorn. The basic problem we need to resolve is that ARM64 is an arch with PCI_DOMAINS_GENERIC=y, so the bus sysdata is pci_config_window. However, Hyper-V PCI provides a paravirtualized PCI interface, so there is no actual pci_config_window for a PCI host bridge, so no information can be retrieve from the pci_config_window of a Hyper-V virtual PCI bus. Also there is no corresponding ACPI device for the Hyper-V PCI root bridge, which introduces a special case when trying to find the ACPI device from the sysdata (see patch #3). With this patchset, we could enable the virtual PCI on Hyper-V ARM64 guest with other code under development. Comments and suggestions are welcome. Regards, Boqun Arnd Bergmann (1): PCI: hv: Generify PCI probing Boqun Feng (7): PCI: Introduce domain_nr in pci_host_bridge PCI: Support populating MSI domains of root buses via bridges arm64: PCI: Restructure pcibios_root_bridge_prepare() arm64: PCI: Support root bridge preparation for Hyper-V PCI: hv: Set ->domain_nr of pci_host_bridge at probing time PCI: hv: Set up MSI domain at bridge probing time PCI: hv: Turn on the host bridge probing on ARM64 arch/arm64/kernel/pci.c | 29 +++++++--- drivers/pci/controller/pci-hyperv.c | 86 +++++++++++++++++------------ drivers/pci/probe.c | 12 +++- include/linux/pci.h | 11 ++++ 4 files changed, 93 insertions(+), 45 deletions(-) -- 2.32.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel