summaryrefslogtreecommitdiff
path: root/include/linux/hypervisor.h
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2025-06-24 14:29:27 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 16:28:11 +0200
commitd89d47abbad2748ed5d8ee8e168fcc4c0e54710c (patch)
tree3fe660e821cce458e3d65fec4b1b97d41aa24a90 /include/linux/hypervisor.h
parent987c20428f067c1c7f29ed0a2bd8c63fa74b1c2c (diff)
PCI: Extend isolated function probing to LoongArch
commit a02fd05661d73a8507dd70dd820e9b984490c545 upstream. 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 189c6c33ff42 ("PCI: Extend isolated function probing to s390"). Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250624062927.4037734-1-chenhuacai@loongson.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/hypervisor.h')
-rw-r--r--include/linux/hypervisor.h3
1 files changed, 3 insertions, 0 deletions
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();
}