Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp364363pxb; Wed, 3 Feb 2021 07:20:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBJ45X6DBbJQarBaKrf/HN8KiVvhYSL2YJckm28/10JqJ+0whXNkR/jLbKuVNYwaq+lyX2 X-Received: by 2002:a17:906:c09:: with SMTP id s9mr3661237ejf.539.1612365616277; Wed, 03 Feb 2021 07:20:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612365616; cv=none; d=google.com; s=arc-20160816; b=mUGLr40hDZys80wgCwfBgGIYpoSyVed386a4FfcQTGSg/j2QOD5OJJYMQ6xHXJ6TMz lqmCM3SZLjtpj8UaZ/8TeFU6/TR4NBCGprfLk3qzK9gzuOGV5m6v+Tw0Fw5HkhAOqKec NsY2WHBn0090RDjic1OMIcQqqfP75P01b0teOtMtrDBHoBOrT9jBJAwFgPsLcR9EFxJ3 ucIxaLEQrfj4W+VyriwZzpyBizgmQ3m87D0Or42rd6K40wUzUo5Yved4pHME9rOfVKEE zqYL1tfjLYB44nVUDL/NSBj22w0UZmHNVdwl5Edju0AEbPkXbEBaIMZWexH2ZVAVpvNp 04aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=thPdbk2I39y9v4lVq2AgBtvWNkjS3q9CO+dodrvqUbY=; b=gxzlbOdN0fPFAo61WrrAZs4s11dpAxu1INdxQ6UPDxpr3ZOa/InSdi4jh908NjHqnW Evn3VIHhyAHAQNiVktVNIpPotzc0jWWf0az+9xa01rn0BLZ8AtIc/b9mOqLLXo7V55N0 l4Hmq7QLN3ZDgVc8gflCdagNDqCaH8WD8tBWIGgPbWLL49foVUl/4XwWVFt6WtdWptvS 3sAnJoh7b+Vp83hSxQUumWqo9lZh9YSTJGV+i2aO1ADgFncEdacZSvNgDnTEYZFG22tf 3lSUfinNIjNkJQ/+jVk7v76kfBXpNvGPTR6fwAY+XJ/NFCIOrUTtJrE/nBQepcDJ/H1N DCzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si1729311edc.228.2021.02.03.07.19.40; Wed, 03 Feb 2021 07:20:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233865AbhBCPPz (ORCPT + 99 others); Wed, 3 Feb 2021 10:15:55 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:39319 "EHLO mail-wm1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233751AbhBCPFX (ORCPT ); Wed, 3 Feb 2021 10:05:23 -0500 Received: by mail-wm1-f44.google.com with SMTP id u14so5550040wmq.4; Wed, 03 Feb 2021 07:05:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=thPdbk2I39y9v4lVq2AgBtvWNkjS3q9CO+dodrvqUbY=; b=tgdHBF+hERQjlvrBAJUnPUlVeP4qy7i3fW1Eu2gqKd3+fxKtauirGqL+mGv63xjZdj L5BHXlP1bg94F/il8Kdj11YqO2/VBvJEM58L5cvmFmEo3MBaZjnRsfUTTs6gB8ZydFwC WPlWpKiwAqWI8pcmlCa/z1/aHZHwww6RRmWzI60BBGq3mqT5ocPAF0H8ld9mMkPKJrX6 Y2fEyrFVZJMXHgD35pCE2bO8hzo0IRgZKMOchpRBVmzTZSXlHpFqMMrkCbYcVLy33bMc SRvRijsvSl1N7RDD1hTFYx2Jt5UKquiMsYUvkxQrTaUW5HzQDgIcyhas7lYL2bz7xQbG RnNg== X-Gm-Message-State: AOAM533DWaT3AD6Yrl0sNyV5jGfrkLhc1bmwtS1Dtba9yfb+ExwAD2n7 3r5M1PEm7+jwm29Qd8AeT3oipiSSG0A= X-Received: by 2002:a1c:65d5:: with SMTP id z204mr3250757wmb.184.1612364680682; Wed, 03 Feb 2021 07:04:40 -0800 (PST) Received: from liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id r17sm4051704wro.46.2021.02.03.07.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 07:04:40 -0800 (PST) From: Wei Liu To: Linux on Hyper-V List Cc: virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , pasha.tatashin@soleen.com, Wei Liu , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger Subject: [PATCH v6 03/16] Drivers: hv: vmbus: skip VMBus initialization if Linux is root Date: Wed, 3 Feb 2021 15:04:22 +0000 Message-Id: <20210203150435.27941-4-wei.liu@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210203150435.27941-1-wei.liu@kernel.org> References: <20210203150435.27941-1-wei.liu@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Pavel Tatashin Reviewed-by: Michael Kelley --- v3: Return 0 instead of -ENODEV. --- drivers/hv/vmbus_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 502f8cd95f6d..ee27b3670a51 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -2620,6 +2620,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); /* -- 2.20.1