Drivers: hv: vmbus: skip VMBus initialization if Linux is root
authorWei Liu <wei.liu@kernel.org>
Wed, 3 Feb 2021 15:04:22 +0000 (15:04 +0000)
committerWei Liu <wei.liu@kernel.org>
Thu, 11 Feb 2021 08:47:06 +0000 (08:47 +0000)
There is no VMBus and the other infrastructures initialized in
hv_acpi_init when Linux is running as the root partition.

Signed-off-by: Wei Liu <wei.liu@kernel.org>
Reviewed-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20210203150435.27941-4-wei.liu@kernel.org
drivers/hv/vmbus_drv.c

index 65535c32662d4351634f8b10825345ab35fbe23c..10dce9f9121689eb32e4c941c6ee8d88927bc5fc 100644 (file)
@@ -2645,6 +2645,9 @@ static int __init hv_acpi_init(void)
        if (!hv_is_hyperv_initialized())
                return -ENODEV;
 
+       if (hv_root_partition)
+               return 0;
+
        init_completion(&probe_event);
 
        /*