Skip to content

Commit a8435c1

Browse files
chenhuacaiKexyBiscuit
authored andcommitted
FROMGIT: 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 189c6c3 ("PCI: Extend isolated function probing to s390"). Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Cc: [email protected] Link: https://patch.msgid.link/[email protected] (cherry picked from commit a02fd05 https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next) Signed-off-by: Kexy Biscuit <[email protected]>
1 parent 2b0b4c6 commit a8435c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/linux/hypervisor.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ static inline bool hypervisor_isolated_pci_functions(void)
3737
if (IS_ENABLED(CONFIG_S390))
3838
return true;
3939

40+
if (IS_ENABLED(CONFIG_LOONGARCH))
41+
return true;
42+
4043
return jailhouse_paravirt();
4144
}
4245

0 commit comments

Comments
 (0)