Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp590499pxj; Thu, 10 Jun 2021 08:05:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyu5kivYj1AIUbIaF3eFDtTLYr1c1ni3Yb2U7Piz6XLmjM9/FXsWTfCkCD/wJ/uZxlaTmPx X-Received: by 2002:a05:6402:31ba:: with SMTP id dj26mr5206017edb.71.1623337527091; Thu, 10 Jun 2021 08:05:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623337527; cv=none; d=google.com; s=arc-20160816; b=ZOn/HmOli9CcUOXkGhP/PDnCm/ylmjxNXGJIUXys7igNBMbq2ugw5HpDcSQDMghhY+ wrh5j5GeEpNixjsbuklnl7UqEsleKzWVrKLR9AQTnJC70UsAHH3zWKNNqe57uZVPBzdi jKlaOpls7496YMUVJiegmTNPe9NBZ9tI+ar5WN6qot08MAqNC6E9f6i/cBhsWlvmy5EB OWzDgE7oyC9EDlnodQNxvNIppg6oGwKKXMfWwqQIKobDly6YiI881chjaGbGvJN1m41q 5Jm8tTpg7V9etBk817khZ6L1E/l/eVgRTi+G9xWqxS5pWIG/i0F+zmVD54FTbLyCLg8L Tt8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bK1M442MUfu2ySIpDXunf1yxH5+BvdY/x715GXH6/Mc=; b=rz0Ub3UO2iUc+cvfLWvypVDLfHBvL8Rr83YQ4LF5V3u1U0HlE395CqHXWrIRGO9TVs HZV9E0jd4DlyqNAFH3TYZJM8xwQj7zW93mBg5PjcjgKfRoZfynFmRTShNRT6MpTtdqMm yTQguEw6NiNeY5knhfaW7t6Y8gruDJ5DUVKI+8z1DxTbIN38qaH+51OIvC4v7P2mcKF9 UDyx+5b2OO++qNq1j1z3ADw7ltYtY9Vvqmc8SV+H2cTVawzpJ19UJzPoKVo8BAsJm1zi l/Aeh+NQUBnNHESqP0KRYsfyj7VQW4dFL8/P1fIATRx9hBbzeZ6+7ROTeSH6JBGSGiWf JHHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZOOKAHQi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si2884561ejj.281.2021.06.10.08.05.02; Thu, 10 Jun 2021 08:05:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZOOKAHQi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231476AbhFJPDS (ORCPT + 99 others); Thu, 10 Jun 2021 11:03:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:44508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230332AbhFJPDR (ORCPT ); Thu, 10 Jun 2021 11:03:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4D60C61406; Thu, 10 Jun 2021 15:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623337281; bh=B8YUrdGtvh1GlX9DXPYnLvrAiv1MGNWen6/6xy5xNj0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZOOKAHQiUBk7P4XwofeAx9bYWQKbqO2Y4+luqnSOASsoYUCFy7CkXg/H5OaGC1GyJ yzRam3hEWbUK2dAXhmukaB+YzI9AbDvXVYANRTARIvfLKa03eXFEjyYDCtqaQjt2hl 0IMAjOxWnoWmIhYvh6jl5/ZvEJaMK6SNbvqNWc02vhyjPCcy35jQNSFlUQcZ2dLPqD sHFPhNeBHPuo9MDNeYvAt1DziEiU8Vg199tHAZZYCDGOsP5360qwF224ioWL7UTibn igH3wAqxExu+RCXjqWJkxZaswAnquByLVHSHqZCLiJ78s+gQROtrgurLGNODv817MY MHXDpw4gnFctg== Received: by mail-oi1-f173.google.com with SMTP id r17so2422692oic.7; Thu, 10 Jun 2021 08:01:21 -0700 (PDT) X-Gm-Message-State: AOAM533RdzuBF9F50uzpSSvex/19/SyV5W3ycw3VTDjlusx5+wR7U6b3 JXvEElh6h1fyeki+536XpgGBd64wcI/uNuNw3jk= X-Received: by 2002:aca:eb55:: with SMTP id j82mr3640527oih.174.1623337280475; Thu, 10 Jun 2021 08:01:20 -0700 (PDT) MIME-Version: 1.0 References: <20210609163211.3467449-1-boqun.feng@gmail.com> In-Reply-To: <20210609163211.3467449-1-boqun.feng@gmail.com> From: Ard Biesheuvel Date: Thu, 10 Jun 2021 17:01:08 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC v3 0/7] PCI: hv: Support host bridge probing on ARM64 To: Boqun Feng , Arnd Bergmann Cc: Bjorn Helgaas , Linux ARM , Linux Kernel Mailing List , linux-hyperv@vger.kernel.org, PCI , Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Lorenzo Pieralisi , Rob Herring , Clint Sbisa , Sunil Muthuswamy Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Jun 2021 at 18:32, Boqun Feng wrote: > > Hi Bjorn, Arnd and Marc, > Instead of cc'ing Arnd, you cc'ed me (Ard) > This is the v3 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/ > > Changes since last version: > > * Use a sentinel value approach instead of calling > pci_bus_find_domain_nr() for every CONFIG_PCI_DOMAIN_GENERIC=y > arch as per suggestion from > > * Improve the commit log and comments for patch #6. > > * Rebase to the latest mainline. > > 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. > > 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 (6): > PCI: Introduce domain_nr in pci_host_bridge > PCI: Allow msi domain set-up at host probing time > PCI: hv: Use pci_host_bridge::domain_nr for PCI domain > PCI: hv: Set up msi domain at bridge probing time > arm64: PCI: Support root bridge preparation for Hyper-V PCI > PCI: hv: Turn on the host bridge probing on ARM64 > > arch/arm64/kernel/pci.c | 7 ++- > drivers/pci/controller/pci-hyperv.c | 87 +++++++++++++++++------------ > drivers/pci/probe.c | 9 ++- > include/linux/pci.h | 10 ++++ > 4 files changed, 73 insertions(+), 40 deletions(-) > > -- > 2.30.2 >