Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: Extend isolated function probing to LoongArch

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

authored by

Huacai Chen and committed by
Bjorn Helgaas
a02fd056 19272b37

+3
+3
include/linux/hypervisor.h
··· 37 37 if (IS_ENABLED(CONFIG_S390)) 38 38 return true; 39 39 40 + if (IS_ENABLED(CONFIG_LOONGARCH)) 41 + return true; 42 + 40 43 return jailhouse_paravirt(); 41 44 } 42 45