Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp915758pxp; Wed, 16 Mar 2022 21:11:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzRIi2LYL3zmf++4X4Awfm+ETbuzzJZI7RCOvpnpB2jDG8PED0GIVKXgmUvFJdr8Sg0sLu X-Received: by 2002:a63:fe4a:0:b0:382:b4f:8353 with SMTP id x10-20020a63fe4a000000b003820b4f8353mr182096pgj.177.1647490270042; Wed, 16 Mar 2022 21:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647490270; cv=none; d=google.com; s=arc-20160816; b=q0PmUmFAuHNig/5YxisiEfd8N/K06VKpAetNNUSpwBgotyzY2ywy437sMOfF20Urdj l630z/3avpjBEZsWAuUoxH5ykxrAo7w2DFHmIe7qHbWgoHO/3zkK/VS76iaYLtHRK7Lb 7RC01fUYRIKPCpkmMIPc96KfWkJ+Q/HiDvczk2DPlItQIM14w21kUG2WQLJMpeA9ITH4 lwlGYvOCqCm+R9zBGCU+vz14a4Z5iZGEbaARxxBYMUL/k8SXWXv69dsqCLaFyXd5rjgj SIJvgdo/V0OB1wnV99N8Pt7Y6p04XdUa4ZuM5NSIWjWlDf3JSGLrBufeQ3NZOBSkQdtI zmBQ== 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:dkim-signature; bh=wxWVBqAwSimMHPPoVsE8iiK5XG62lXlYEoF21TEz/VE=; b=GazY3TR4fDw5puXHaK/6mfuksIfus5AoG+7Tew0+XZo1x43O+eZjak12agK1syxV+M Z7+aepGUxZKOclZbkQ2A/7Fz4XMEnh65Yj1No2NDRGCNvojGsdmm32vmd67EzrSTLVOR gFA2/jQyDew0iutq4UCbbVgwLg5u4L+8PjTzUjKnkcRfORtCbSqXpjBKfQUQgXjkohLk 8X6Fz4ty/WIR639pMb38yBtkD+e18dGzoTbJIKF4s4yViN66/YY14UfZgY6PpPo9RucK 9Vsj1uertoqAg8PdxufFdiDyndXBqYv1rLrUaa/gT9cR/OWvB9DSDjzA3SDkO049U7bE aqtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UxB1dwnC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x189-20020a6363c6000000b003816043eecasi908708pgb.191.2022.03.16.21.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:11:10 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UxB1dwnC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3FC4576648; Wed, 16 Mar 2022 20:50:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237799AbiCNTYB (ORCPT + 99 others); Mon, 14 Mar 2022 15:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236868AbiCNTX7 (ORCPT ); Mon, 14 Mar 2022 15:23:59 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA9532ED; Mon, 14 Mar 2022 12:22:47 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id e13so14415410plh.3; Mon, 14 Mar 2022 12:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wxWVBqAwSimMHPPoVsE8iiK5XG62lXlYEoF21TEz/VE=; b=UxB1dwnCfbPwOnkcGR0t/WlWGvrbGYrGxHVs4cIfn69g2LpczFgLotebMjPDmQybqu vTv0MJoqDvYO+OdSHLEXJF46IAWBnhhIdoJDLQ1RCLh7SrHIa2n2AfZQu0kBjzaVvEwW sTmcK+KPHufk7i7abgyfSpEdq+Og7or9Eba69+U8lJ6rMV6NjjBsOkNkzETq+s2Sqjq0 VzG+qtdTa++dpsoXk7Y4tpMbjjmfurFIJv8NWvF9rBjbeuPntMq1LoBvOttSNEUxLTdz AgSrA93hOfluPmypcSeRpmMT+fZzvlw+5wwY1/kIwOO0n/DS+RG9F8LYrwnrjr24C6ou H/Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wxWVBqAwSimMHPPoVsE8iiK5XG62lXlYEoF21TEz/VE=; b=X+9K/wdbMqFFkr9lq4mqumPvnrwnv+VH4XXnYOu5L3nkIIsCWVUbbGwnlyVED+ZtdX KovYRzZ0lqxFQZR1YqPhRRDArD8h+K9/RLbTabBjCjwJ04NO0Ly0f3nq4uJ1rTEpDWki hkS0jqOsc0EOAea4TYD98s5yz6Zsj/KwY2M/GhRTHQFohq5lHldgFyR6nkuJA35mihBJ bm2SGlv/V0BbkR3/A5E+WXbInOlHmPQsyjum1yZIGIQkVUez+G/eUjeduIdybmuIkZxR lriZyZjnE4HcrJ5x++SIFLoi3cdG39qlZNtuWmlK2NUKGD+UNlj74VHc7t46KHiKu0v9 0zjA== X-Gm-Message-State: AOAM533eIzhiT39htT8xnKo5j6DhYkApqjGAMgBVRnitO57yzdmlpkJs +H1OKda5nXHKe57Wu8In8DM= X-Received: by 2002:a17:903:120c:b0:14f:3f4a:f832 with SMTP id l12-20020a170903120c00b0014f3f4af832mr25271153plh.157.1647285767276; Mon, 14 Mar 2022 12:22:47 -0700 (PDT) Received: from localhost ([192.55.54.52]) by smtp.gmail.com with ESMTPSA id d11-20020a056a0024cb00b004f725ecf900sm22004254pfv.97.2022.03.14.12.22.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Mar 2022 12:22:46 -0700 (PDT) Date: Mon, 14 Mar 2022 12:22:45 -0700 From: Isaku Yamahata To: Paolo Bonzini Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Jim Mattson , erdemaktas@google.com, Connor Kuehl , Sean Christopherson Subject: Re: [RFC PATCH v5 005/104] KVM: x86: Refactor KVM VMX module init/exit functions Message-ID: <20220314192245.GC1964605@ls.amr.corp.intel.com> References: <8a8ec76f1700114d739623b2860630eacd277ab6.1646422845.git.isaku.yamahata@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,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 Thanks for review. On Sun, Mar 13, 2022 at 02:54:15PM +0100, Paolo Bonzini wrote: > On 3/4/22 20:48, isaku.yamahata@intel.com wrote: > > -static int __init vmx_init(void) > > -{ > > - int r, cpu; > > + if (sizeof(struct vcpu_vmx) > *vcpu_size) > > + *vcpu_size = sizeof(struct vcpu_vmx); > > + if (__alignof__(struct vcpu_vmx) > *vcpu_align) > > + *vcpu_align = __alignof__(struct vcpu_vmx); > > Please keep these four lines in vt_init, and rename the rest of > vmx_pre_kvm_init to hv_vp_assist_page_init. Likewise, rename > vmx_post_kvm_exit to hv_vp_assist_page_exit. > > Adjusting the vcpu_size and vcpu_align for TDX (I guess) can be added later > when TDX ops are introduced. sure. I'll make it like vcpu_size = max(sizeof(struct vcpu_vmx), sizeof(vcpu_tdx)); ... Thanks, -- Isaku Yamahata