aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNiklas Schnelle <[email protected]>2022-06-28 16:30:59 +0200
committerBjorn Helgaas <[email protected]>2022-07-22 16:06:03 -0500
commit189c6c33ff421def040b904fb14ef76c5bf5af4c (patch)
tree864dd92ce7aec34c0cf4929b14c70214ee29f3a8 /include/linux
parentdb360b1ea7faef290471bc1b2a7463b96fd20a07 (diff)
PCI: Extend isolated function probing to s390
Like the jailhouse hypervisor, s390's PCI architecture allows passing isolated PCI functions to a guest OS instance. As of now this is was not utilized even with multi-function support as the s390 PCI code makes sure that only virtual PCI busses including a function with devfn 0 are presented to the PCI subsystem. A subsequent change will remove this restriction. Allow probing such functions by replacing the existing check for jailhouse_paravirt() with a new hypervisor_isolated_pci_functions() helper. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Pierre Morel <[email protected]> Cc: Jan Kiszka <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hypervisor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/hypervisor.h b/include/linux/hypervisor.h
index fc08b433c856..9efbc54e35e5 100644
--- a/include/linux/hypervisor.h
+++ b/include/linux/hypervisor.h
@@ -32,4 +32,12 @@ static inline bool jailhouse_paravirt(void)
#endif /* !CONFIG_X86 */
+static inline bool hypervisor_isolated_pci_functions(void)
+{
+ if (IS_ENABLED(CONFIG_S390))
+ return true;
+
+ return jailhouse_paravirt();
+}
+
#endif /* __LINUX_HYPEVISOR_H */