Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp668602pxy; Wed, 21 Apr 2021 11:56:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+ib3ZIDif1HVuEhq3fgtFlkbzZNqSfrZjmHXxsFLoOxAwVWQTgKGLyDq88WQZn3ANZM1a X-Received: by 2002:a17:906:b754:: with SMTP id fx20mr34362913ejb.69.1619031360642; Wed, 21 Apr 2021 11:56:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619031360; cv=none; d=google.com; s=arc-20160816; b=YIT9BFHKTZYJcvOfwXd7sp70GZSycfudjqQcCarFBDpZjZ/PyrmoyP/ZSI7E6ADie9 SHiKRuHv8l7+Qb2yEd95eY6pzKjQxdO8bS2FnYFKUnZmBpXvuGS/vAJyvZdhF4ZjDJ+9 61Nnl4nUIYLTgjdcIskZ/pxYp4lgnOHkkCJFkFzU7La2nximKa0EtTAVNCVyU9qSfi7n QbwO20GTcEjkO3uUvxy/ZyPemaqTXXQbTjxR4MFJePafPxzE5SXQeYDK+PI/69+ycJd3 Td6DrtYWTHYuNd3NUIoiBByK/ZcFtHCzfwW7GnXq22cpTUpCpVky2gjXrUgfaquqAmO8 g0+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=KD/DUiMPEiLQj+0ajVc+9N7DwqSG/RI78g2xsXCrEoU=; b=p7jpYdXGg5wV8E5+/pjvZm4DMo9kKO7XVkxCoNdnbkPiZqog33m386E9sa1GfRLfP2 iqHdqR4AZn2fpmJIr9ZkugEXLTptxx8H0IUWJajr2PgKu8eq7FUEcmZB4GZCy59EPPBf oN4QR36+8zXvEj9HrZOSw2kha4UONNPjJ/xSAgwSNn7IynTh+6z6B63Lp5sbGhqTKlba MJzDkywclZA1thJh3j1v6RqyFO4RP+tScTfddT3whjqg4hqht/B26x8gTq/IKrjdz83U PeWV96KXX54SId3M1kIscMNdBzPFUYOv4GSemu41zLIdc/STQvuUk1AWxuJMZSevQ7ya 0OWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=P9THrmyX; 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=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s20si110547edr.564.2021.04.21.11.55.36; Wed, 21 Apr 2021 11:56:00 -0700 (PDT) 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=@linux.microsoft.com header.s=default header.b=P9THrmyX; 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=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243197AbhDUODv (ORCPT + 99 others); Wed, 21 Apr 2021 10:03:51 -0400 Received: from linux.microsoft.com ([13.77.154.182]:36468 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243185AbhDUODp (ORCPT ); Wed, 21 Apr 2021 10:03:45 -0400 Received: from [192.168.86.30] (c-73-38-52-84.hsd1.vt.comcast.net [73.38.52.84]) by linux.microsoft.com (Postfix) with ESMTPSA id 5904820B8001; Wed, 21 Apr 2021 07:03:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5904820B8001 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1619013792; bh=KD/DUiMPEiLQj+0ajVc+9N7DwqSG/RI78g2xsXCrEoU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=P9THrmyXwBQGjg5NjlXt/p+rL5Xfnl3W0WI9fTmUeKvNOA+H2lMWhruR4hdRgjjn3 /iHidBD/t/54/PjtxiK75Bq3aF3V0RBIeDhoSUWq0oeuk/sQsbe8RKN94CQItbPbbX vV9hZEXsichv5WootFQ555l6gIrTOZeWX7F7gq9M= Subject: Re: [PATCH v2 5/7] KVM: SVM: hyper-v: Remote TLB flush for SVM To: Vitaly Kuznetsov Cc: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "K. Y. Srinivasan" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, Lan Tianyu , Michael Kelley , Paolo Bonzini , Sean Christopherson , Wanpeng Li , Jim Mattson , Joerg Roedel , Wei Liu , Stephen Hemminger , Haiyang Zhang , viremana@linux.microsoft.com References: <959f6cc899a17c709a2f5a71f6b2dc8c072ae600.1618492553.git.viremana@linux.microsoft.com> <87sg3q7g7b.fsf@vitty.brq.redhat.com> From: Vineeth Pillai Message-ID: <3f410c6a-ed30-216e-af54-33855a2963b1@linux.microsoft.com> Date: Wed, 21 Apr 2021 10:03:12 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/16/2021 1:26 PM, Vineeth Pillai wrote: > >> >>   +#if IS_ENABLED(CONFIG_HYPERV) >> +static void hv_init_vmcb(struct vmcb *vmcb) >> +{ >> +    struct hv_enlightenments *hve = &vmcb->hv_enlightenments; >> + >> +    if (npt_enabled && >> +        ms_hyperv.nested_features & HV_X64_NESTED_ENLIGHTENED_TLB) >> Nitpick: we can probably have a 'static inline' for >> >>   "npt_enabled && ms_hyperv.nested_features & >> HV_X64_NESTED_ENLIGHTENED_TLB" >> >> e.g. 'hv_svm_enlightened_tlbflush()' > Makes sense, will do. On a second thought, this function itself is small and just does this one check. So, might not make sense to add one more function. I shall rather change this function to be an inline. Thanks, Vineeth