Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp437557pxb; Thu, 12 Nov 2020 07:28:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUkRoCQV+oVaE6JMCjTPF3gRFZ9W7dbQX99sifxMfxNHLfXZeAQXjn+6FwdGrA/BZQ0Qj1 X-Received: by 2002:aa7:c597:: with SMTP id g23mr300845edq.184.1605194922460; Thu, 12 Nov 2020 07:28:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605194922; cv=none; d=google.com; s=arc-20160816; b=0FQyB6VFgNy97tW5nnt04SA95LN6VAHkgV6KwoYwJQdoOnoLgqmaB6EM843TBRVvOF TIFhVrOWyksCeWi92b2nn8nBX7+BXrBAHpeHaolopI3rnosyvtRCPidWLxQ/xgHqlJjT zVITQeIQCjv/b8Aj0k7euffdPcnrDfZm3ltFKYWOgw2DG8KuhEzUx3vBB5JVK9ytb7Be 6ZJ0PIAxr5jT2q136ZNvnBihJe+e5wru4fVgNzrBVJKdbsZ3yMZWRisozY1kzZegJDOt jJhdkWaSoB605IkrAa7XmX4VStb1ig564rcQBCtZF+HGN7pzuVK+6Qn4MzfbKicZ3WuX gsFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=C4WuEqCsb5/AFeS4zkEh2onYBE7lmXmnSMoxFYjN3ig=; b=cgAzGtnwNbMqgU2Imr097r7zf113B7C2LaOCOup8xR+96SUdQ0x4ats84Ur8T3KE6U MVJ2dqud+R/co1LFqPqRq9+qwFTu1jtGp2qMlJL82EF6JEDB1VVHBS3/Sc+eyD+v+Y3d s5MQfZgq3lrCn/XVX/xIx6l3jKTHzz11JhVJC9Hlh8WkQmCm/w2nKXm526vZtqq7Or8w VatJaYxVkzoQlAabc1AXp6lSEV3C8Z6gNUeterstYSTNEiDCOB5eA9wBVeOh72xLxaic GnCi/vtSlvfA2NhIisFC119tZB9DsVw4NOfPDmC5Lm3ZrE+4FhLXb4KcjLU6NBNuGrgj if0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hMIJI9ay; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n11si4155145edo.208.2020.11.12.07.28.18; Thu, 12 Nov 2020 07:28:42 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hMIJI9ay; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728542AbgKLPYp (ORCPT + 99 others); Thu, 12 Nov 2020 10:24:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27698 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727796AbgKLPYo (ORCPT ); Thu, 12 Nov 2020 10:24:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605194683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=C4WuEqCsb5/AFeS4zkEh2onYBE7lmXmnSMoxFYjN3ig=; b=hMIJI9aym5yni2izh+hbLXqhyhtVnz7r/Mh6NGGYzcfRQRC7+9mXraJ6ov5xSCxTepqLCl Bbq9sIcPC66jgnwK1HqmHl5P/HB1bYf+ldZ6XlAh/agGDteS2vjd9P1eER/mShHJyWhOgX j2+mJHd3xyX8USyyIP2lJ7oVCeeS8ZM= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-v87lIjcNMLiES-DWYpZrdA-1; Thu, 12 Nov 2020 10:24:41 -0500 X-MC-Unique: v87lIjcNMLiES-DWYpZrdA-1 Received: by mail-wr1-f69.google.com with SMTP id z13so2077583wrm.19 for ; Thu, 12 Nov 2020 07:24:41 -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:in-reply-to:references:date :message-id:mime-version; bh=C4WuEqCsb5/AFeS4zkEh2onYBE7lmXmnSMoxFYjN3ig=; b=WdLA95+MiFbz4bmY51WYcdbs0YX7Fm9A9zl1OXCet/7ioEDaMwONEZ+BnsCDYmoHoV RIxFhXZfaNiXHVMtvjL88W8bhX0ICyVvFIyXKUH8UGHJk+MaaRr0NQwelVtjwcsUiK6w oggC4GX6iiJy9TzAtxibrZ2rGPMGsDOtf91XRtnO2Vm34PE3FLdfqwpj+zQGyeoBxeoJ szd/YLMBWFHwaVS3iS4fu9VqsM7FBg/SCmZDGMMqMY/ChfZMjH/otUIuOeDzxK1pYP3Y EVg3hBIieLOw5F/Ewu0/1QQ6E5PJ1tcUXknEnakSjMUf0QfGArbYV8wDLAbZ+e2xxX8d 0+bA== X-Gm-Message-State: AOAM532bu2IwDklDAlSeerRmBZ08Ot4dz7yZLb+JSQzsmq8dKfUE96SI yyPJJz1ciX8gqpFAgL753RBbu47Ppr83+NePJGL+gEdFlWwBf1n505+f6Mff1hbNc8HORMHs4fd 2KZ+HttEaKD7OQ1gM4ZvOMaqJ X-Received: by 2002:a1c:c302:: with SMTP id t2mr117235wmf.189.1605194680191; Thu, 12 Nov 2020 07:24:40 -0800 (PST) X-Received: by 2002:a1c:c302:: with SMTP id t2mr117208wmf.189.1605194680020; Thu, 12 Nov 2020 07:24:40 -0800 (PST) Received: from vitty.brq.redhat.com (g-server-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id h62sm7096528wrh.82.2020.11.12.07.24.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 07:24:39 -0800 (PST) From: Vitaly Kuznetsov To: Wei Liu , Linux on Hyper-V List Cc: virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , Wei Liu , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger Subject: Re: [PATCH v2 03/17] Drivers: hv: vmbus: skip VMBus initialization if Linux is root In-Reply-To: <20201105165814.29233-4-wei.liu@kernel.org> References: <20201105165814.29233-1-wei.liu@kernel.org> <20201105165814.29233-4-wei.liu@kernel.org> Date: Thu, 12 Nov 2020 16:24:38 +0100 Message-ID: <87imaay4w9.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wei Liu writes: > 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 > --- > 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 4fad3e6745e5..37c4d3a28309 100644 > --- a/drivers/hv/vmbus_drv.c > +++ b/drivers/hv/vmbus_drv.c > @@ -2612,6 +2612,9 @@ static int __init hv_acpi_init(void) > if (!hv_is_hyperv_initialized()) > return -ENODEV; > > + if (hv_root_partition) > + return -ENODEV; > + Nit: any particular reason why we need to return an error from here? I'd suggest we 'return 0;' if it doesn't break anything (we're still running on Hyper-V, it's just a coincedence that there's nothing to do here, eventually we may get some devices/handlers I guess. Also, there's going to be server-side Vmbus eventually, we may as well initialize it here. > init_completion(&probe_event); > > /* -- Vitaly