From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21C16C2D0A8 for ; Wed, 23 Sep 2020 17:22:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CDC9521D43 for ; Wed, 23 Sep 2020 17:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726667AbgIWRWk (ORCPT ); Wed, 23 Sep 2020 13:22:40 -0400 Received: from mga18.intel.com ([134.134.136.126]:41755 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726413AbgIWRWk (ORCPT ); Wed, 23 Sep 2020 13:22:40 -0400 IronPort-SDR: clazLmNpC80XBkV+L1OG/LTBc3tMUcTBN0jFp+RFy7QCBse2I3ObVoWnwALZZXYfGQOxQ5xER+ 9lcWbT2NSAug== X-IronPort-AV: E=McAfee;i="6000,8403,9753"; a="148705771" X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="148705771" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 10:22:39 -0700 IronPort-SDR: 9/Qgj7wxNMkAbQSYB26lYLmfcjioX6/YkrHYu8bAzf7aATYsLXTW1xb7kuFeEuw1tZNCwcmMkU hR1XYi3Y/V1Q== X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="511731904" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.160]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 10:22:38 -0700 Date: Wed, 23 Sep 2020 10:22:37 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] KVM: VMX: Add a helper and macros to reduce boilerplate for sec exec ctls Message-ID: <20200923172237.GA32044@linux.intel.com> References: <20200923165048.20486-1-sean.j.christopherson@intel.com> <20200923165048.20486-5-sean.j.christopherson@intel.com> <784480fd-3aeb-6c08-30f9-ac474bb23b6c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <784480fd-3aeb-6c08-30f9-ac474bb23b6c@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 07:20:17PM +0200, Paolo Bonzini wrote: > On 23/09/20 18:50, Sean Christopherson wrote: > > Add a helper function and several wrapping macros to consolidate the > > copy-paste code in vmx_compute_secondary_exec_control() for adjusting > > controls that are dependent on guest CPUID bits. > > > > No functional change intended. > > > > Signed-off-by: Sean Christopherson > > --- > > arch/x86/kvm/vmx/vmx.c | 128 +++++++++++++---------------------------- > > 1 file changed, 41 insertions(+), 87 deletions(-) > > The diffstat is enticing but the code a little less so... Can you just > add documentation above vmx_adjust_secondary_exec_control that explains > the how/why? Ya, I'd be more than happy to add a big comment.