Skip to content

Commit f84b21d

Browse files
mrathor99liuw
authored andcommitted
PCI: hv: Don't load the driver for baremetal root partition
The root partition only uses VMBus when running nested. When running on baremetal the Hyper-V PCI driver is not needed, so do not initialize it. Signed-off-by: Mukesh Rathor <[email protected]> Signed-off-by: Nuno Das Neves <[email protected]> Reviewed-by: Roman Kisel <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Link: https://lore.kernel.org/r/1751582677-30930-2-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu <[email protected]> Message-ID: <1751582677-30930-2-git-send-email-nunodasneves@linux.microsoft.com>
1 parent 9669ddd commit f84b21d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/pci/controller/pci-hyperv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4144,6 +4144,9 @@ static int __init init_hv_pci_drv(void)
41444144
if (!hv_is_hyperv_initialized())
41454145
return -ENODEV;
41464146

4147+
if (hv_root_partition() && !hv_nested)
4148+
return -ENODEV;
4149+
41474150
ret = hv_pci_irqchip_init();
41484151
if (ret)
41494152
return ret;

0 commit comments

Comments
 (0)