* [PATCH] PCI: Extend isolated function probing to LoongArch
@ 2025-06-24 6:29 Huacai Chen
2025-06-24 15:46 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Huacai Chen @ 2025-06-24 6:29 UTC (permalink / raw)
To: Bjorn Helgaas, Lorenzo Pieralisi, Krzysztof Wilczyński,
Rob Herring
Cc: linux-pci, Juergen Gross, virtualization, Jianmin Lv, Huacai Chen,
Huacai Chen, stable
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: Extend isolated function probing to LoongArch
2025-06-24 6:29 [PATCH] PCI: Extend isolated function probing to LoongArch Huacai Chen
@ 2025-06-24 15:46 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2025-06-24 15:46 UTC (permalink / raw)
To: Huacai Chen
Cc: Bjorn Helgaas, Lorenzo Pieralisi, Krzysztof Wilczyński,
Rob Herring, linux-pci, Juergen Gross, virtualization, Jianmin Lv,
Huacai Chen, stable
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-24 15:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24 6:29 [PATCH] PCI: Extend isolated function probing to LoongArch Huacai Chen
2025-06-24 15:46 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).