Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Huacai Chen <chenhuacai@loongson.cn>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	linux-pci@vger.kernel.org, "Juergen Gross" <jgross@suse.com>,
	virtualization@lists.linux.dev,
	"Jianmin Lv" <lvjianmin@loongson.cn>,
	"Huacai Chen" <chenhuacai@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] PCI: Extend isolated function probing to LoongArch
Date: Tue, 24 Jun 2025 10:46:29 -0500	[thread overview]
Message-ID: <20250624154629.GA1479401@bhelgaas> (raw)
In-Reply-To: <20250624062927.4037734-1-chenhuacai@loongson.cn>

On Tue, Jun 24, 2025 at 02:29:27PM +0800, Huacai Chen wrote:
> Like s390 and the jailhouse hypervisor, LoongArch's PCI architecture
> allows passing isolated PCI functions to a guest OS instance. So it is
> possible that there is a multi-function device without function 0 for
> the host or guest.
> 
> Allow probing such functions by adding a IS_ENABLED(CONFIG_LOONGARCH)
> case in the hypervisor_isolated_pci_functions() helper.
> 
> This is similar to commit 189c6c33ff421def040b9 ("PCI: Extend isolated
> function probing to s390").
> 
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>

Applied to pci/enumeration for v6.17, thanks!

> ---
>  include/linux/hypervisor.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/linux/hypervisor.h b/include/linux/hypervisor.h
> index 9efbc54e35e5..be5417303ecf 100644
> --- a/include/linux/hypervisor.h
> +++ b/include/linux/hypervisor.h
> @@ -37,6 +37,9 @@ static inline bool hypervisor_isolated_pci_functions(void)
>  	if (IS_ENABLED(CONFIG_S390))
>  		return true;
>  
> +	if (IS_ENABLED(CONFIG_LOONGARCH))
> +		return true;
> +
>  	return jailhouse_paravirt();
>  }
>  
> -- 
> 2.47.1
> 

      reply	other threads:[~2025-06-24 15:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24  6:29 [PATCH] PCI: Extend isolated function probing to LoongArch Huacai Chen
2025-06-24 15:46 ` Bjorn Helgaas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250624154629.GA1479401@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=chenhuacai@gmail.com \
    --cc=chenhuacai@loongson.cn \
    --cc=jgross@suse.com \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=lvjianmin@loongson.cn \
    --cc=robh@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox