Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1632233rwo; Wed, 2 Aug 2023 18:26:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlFmImdW03svQqpTQ0E4Z0VGOauVIzrm3ZghuqniilqXgnz5gcOrAlqSCG2awso2PzSG9bwi X-Received: by 2002:a05:6a21:33a1:b0:126:a5e3:3927 with SMTP id yy33-20020a056a2133a100b00126a5e33927mr19547295pzb.8.1691026008541; Wed, 02 Aug 2023 18:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691026008; cv=none; d=google.com; s=arc-20160816; b=J7WhH6yaeEJPAVRIw96XIhuMz7W1xvXlpTaZ2OSwLBi4Fp7Ciz7ucIKsHt69PAv9Vu wcvOkNpFiWkfvtSXNlQtDLxi/W5kFh44xNuHF5g6LALV2pUgWTo0DXSU7Pr4r7apQvak A9Bys2eHlgC+D20dLfbR6YsY4mnXCI16ov4WC7jgFXwwiYHxAxF8Q68geguuhnrdHuQh ueoJrQQ8A6dH2QM1tkXTTfs5S+9aAED/48U2KkhQ9SiZu7lvPGRGsjwoci3SLejiFphQ UjqbKca828gWDUdLfQie+Kg0aFrhhYQhXWHNsZoLva/xzVDE/OndMe4Ml+7BPfnj/Qs0 I5NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=gVrG8SmJV4YoZPJumklaBBg3JMAiIwsiaH9SPEZme84=; fh=QWOmUejUbv1Es3Be9li8CiaUwvUO4XsQBQF0Qs4zcKo=; b=uLiyIgee+WceIi6uPrBVhXm0kynWH8XOzQPk8Jj/5sfl0apfLjaHGXA/CXHyMi/ugY QosFGBlju614UEkLpNhlLxDwGC0pMo4YximHI4TWj7RA86p5V1Wu+Wp5Ryq2EbHzkB1I yGI8gHN8L1SzVquAAq4vUpyvR2krwvCVFue3IRUznSS+eZck4YOebgmPl0BnfyT0ikC9 D+BMLv3TgaWRQUzEpEXiUKJr86KJTmznwTWvNBfzr4JpS6oXPElElxbhv21Z2YkZABa/ Q6NC1L0Hb+PYIyFJ/qs5MYZjfW2HIYKrt5dS076ZLtmcc7NYvVUT3GJyQYlOpjocEIsH PUHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a056a0022c300b006871fa2ee53si7954878pfj.65.2023.08.02.18.26.35; Wed, 02 Aug 2023 18:26:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230024AbjHCAQr (ORCPT + 99 others); Wed, 2 Aug 2023 20:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbjHCAQq (ORCPT ); Wed, 2 Aug 2023 20:16:46 -0400 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50FF3E4C; Wed, 2 Aug 2023 17:16:45 -0700 (PDT) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1b8b2b60731so3302215ad.2; Wed, 02 Aug 2023 17:16:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691021805; x=1691626605; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gVrG8SmJV4YoZPJumklaBBg3JMAiIwsiaH9SPEZme84=; b=aNc2p/RVAqEKrojNIR9QUs3puW/8nOXNkI26IciuR4v7XQFG00NH9O14NQsIpGyxe7 fajrYbcPkEyGGaY4MlS7WABFV9RM3rVzkAEMov9UZvsQ6XRWycGoRqRxoAd+xNrh3gh7 NDpTfO6p1Ko5kkhK4CN9JP7vrML+VE8Zr5aatBYoKPVB7AQBRfH8WephZZO3TW7Zy8sK k61l+sBWkpweNoKf/GVwmzR6hoOR1fHIgLZ/aX8k/H3R7s0vVXlI+qqDbSY1uwiwQ7kq Ig24rv7YWwmnmiSRfRMKfGLZcYM7RLcfdD4oncfjuFsWnpdX/xpM+9VQutHZtZPHh54t 1+pA== X-Gm-Message-State: ABy/qLb4YU8PKWUyUky7fcXTjW+ZYRSQMBHVvhuZGYCgiIs+d298gMvD vq1xs45dbvbqlkOR2bJF/XI= X-Received: by 2002:a17:902:7b85:b0:1ac:3605:97ec with SMTP id w5-20020a1709027b8500b001ac360597ecmr14604489pll.62.1691021804751; Wed, 02 Aug 2023 17:16:44 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([20.69.120.36]) by smtp.gmail.com with ESMTPSA id w8-20020a170902e88800b001b9be2e2b3esm12932603plg.277.2023.08.02.17.16.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 17:16:44 -0700 (PDT) Date: Thu, 3 Aug 2023 00:16:38 +0000 From: Wei Liu To: Nuno Das Neves Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, mikelley@microsoft.com, kys@microsoft.com, wei.liu@kernel.org, haiyangz@microsoft.com, decui@microsoft.com, ssengar@linux.microsoft.com, mukeshrathor@microsoft.com, stanislav.kinsburskiy@gmail.com, jinankjain@linux.microsoft.com, apais@linux.microsoft.com, Tianyu.Lan@microsoft.com, vkuznets@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, will@kernel.org, catalin.marinas@arm.com Subject: Re: [PATCH 09/15] Drivers: hv: Introduce hv_output_arg_exists in hv_common Message-ID: References: <1690487690-2428-1-git-send-email-nunodasneves@linux.microsoft.com> <1690487690-2428-10-git-send-email-nunodasneves@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1690487690-2428-10-git-send-email-nunodasneves@linux.microsoft.com> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 27, 2023 at 12:54:44PM -0700, Nuno Das Neves wrote: > This is a more flexible approach for determining whether to allocate the > output page. > This will be used in both mshv_vtl and root partition. > > Signed-off-by: Nuno Das Neves > --- > drivers/hv/hv_common.c | 30 +++++++++++++++++++++++++----- > 1 file changed, 25 insertions(+), 5 deletions(-) > > diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c > index 99d9b262b8a7..16f069beda78 100644 > --- a/drivers/hv/hv_common.c > +++ b/drivers/hv/hv_common.c > @@ -57,6 +57,18 @@ EXPORT_SYMBOL_GPL(hyperv_pcpu_input_arg); > void * __percpu *hyperv_pcpu_output_arg; > EXPORT_SYMBOL_GPL(hyperv_pcpu_output_arg); > > +/* > + * Determine whether output arg is in use, for allocation/deallocation > + */ > +static bool hv_output_arg_exists(void) > +{ > + bool ret = hv_root_partition ? true : false; > +#ifdef CONFIG_MSHV_VTL > + ret = true; > +#endif This should not be here. As far as I can tell, CONFIG_MSHV_VTL is introduced in a later patch. The rest looks okay. Thanks, Wei.