Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1717391pxj; Wed, 19 May 2021 12:13:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwe2/36PWm7PLEAQjxuv0fFiILZUVaYZcbn5n87GqJh3LIqMPurqHbgdpNkob+wVXAnBuJp X-Received: by 2002:a17:906:1496:: with SMTP id x22mr654411ejc.419.1621451611195; Wed, 19 May 2021 12:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621451611; cv=none; d=google.com; s=arc-20160816; b=Q8eaDBAao38UQLA4/VO0v3P6r7fE1SKj8EkSsUJ6v3SSrab8cMW5MH9K8lxnzJrdlj aeP/jprrrdj6ZpdKig+qjHK6cudP+d2QZc59szcDMb1fqp/LrkDC+sbXmr+WUGJueeQu C+ruppt4brTcQgesRWDdOup+E6D1dh/28eK7SpDsiLDuzfsdxvNQTjJMvhzm3/ZF3nIH dziiovi9NojeXXLMNJGp3mVCa0J41wu34MKFjEpyaTKIcpWRqE/uqGCGRVJFigZkXPmv wyna1vNGuUi7rro2C6LPRgAGZL2xcmTN9TDEBwa2M6COsRlBoa5qBdR3VW2Hx3OyVv3Z u7FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ArOATr+a0hXgg0J/jDFFZIaPxMAnGoAVL6O4IK6IU5Q=; b=guXENsXhGZ0yOev2Rr9Nh3aDABNijFCzDxmwcl5oWA5IXIyRlzW/wD5iD8JjHExYIe SUbwIEq+D0J4yXbaRxvSd7NwajEv/Bcnv6dDt7IC2SRMCNp4cAVIYsJojCVm31jiw/lg a3qOi/u/OuJWfXkA4MVORizlIPERdvgJNwncE5BwX13ISEb6GyVGJFLmaIA8cZyQXsis +AE2D6P3soCZqHMtelu6b/BGf143M55RqbDdhzirFEoOqb10sE3OGXktcMdp9D1IARCU L35zUiHmjIrUT9HKPw/aoX9Ve4l4gw9w78pm9TK+V7sgFHl0SgFAHf27vsa1LVQ9nuqE +hFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=PA5YOTA7; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz15si456566ejc.316.2021.05.19.12.13.05; Wed, 19 May 2021 12:13:31 -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=@google.com header.s=20161025 header.b=PA5YOTA7; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241677AbhESFft (ORCPT + 99 others); Wed, 19 May 2021 01:35:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239274AbhESFew (ORCPT ); Wed, 19 May 2021 01:34:52 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B82FC061348 for ; Tue, 18 May 2021 22:33:10 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id 69so6369686plc.5 for ; Tue, 18 May 2021 22:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ArOATr+a0hXgg0J/jDFFZIaPxMAnGoAVL6O4IK6IU5Q=; b=PA5YOTA74ZqK4ihTbqvYrO6pwXRBFTcGA+K8i1355p/H2iLpC5IVs6RWKWmEK9hNr4 MMoc7u6cNDNhMU90PHJtcMwv0OXFRITfQt2V/tARKcNKdN+SVhTce09sc/HC6YWJEvzW IMsZC/cKydRDZ+G23T3Ht7TkYV7vB8h0OHjQuaUuEsg5jpbMtEJPo0phnwLg8C8m+5hu BFDWqPxcF8bysY5K5aCCPUkYnNHB9gbqr/l2YUruyQ/udBaBNJGuVORCP7m9UW14uFSB SNmD2kkEejOExEFCj8qCoHFVMbmRwxCmtZWqv4GMRA/dUZqFnTfuMRHvqe6YMqq12qbO Zwow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ArOATr+a0hXgg0J/jDFFZIaPxMAnGoAVL6O4IK6IU5Q=; b=BUAmWnz3WRtBT6miaG3/1BmL9X7ZGdGh9rbivDT9k3r3VDqffmMgmz0cpNty8X4XRn 9w452E74HHShKXfZXKn7NmugW7Ac0e1x76n7W67v8KkRgaw6nFJUAKoCmAY4KQj9eSPV IcEvLlzQnDRyK5JWn1X8awpKJhIis45eUvLPi0YcdxCod9FDDuRJhnsBYdrKTAO3w21U M34fAayco7YRWr58T1MwhVli3aNgwe6Ro0z+n3MJ1gl5u/YXxIjV1cfBGnFGc0JF0VhK zsRfBTEmSKS6a3tSa542eRg0a1LwzmlyCIga5K3kTBlapoJSXzgZl0hUieAxQtwzJPCY Abug== X-Gm-Message-State: AOAM531r4fonmb+bkOfBVW3/pkC22g6Ud+3crcQ83j7n4v/iMwBaI+pC 9FtMu/iTqjO6x+xGv+bi4btRIHnrUl+lnT95liZvtg== X-Received: by 2002:a17:90a:6f06:: with SMTP id d6mr9671757pjk.216.1621402389903; Tue, 18 May 2021 22:33:09 -0700 (PDT) MIME-Version: 1.0 References: <20210424004645.3950558-1-seanjc@google.com> <20210424004645.3950558-10-seanjc@google.com> In-Reply-To: <20210424004645.3950558-10-seanjc@google.com> From: Reiji Watanabe Date: Tue, 18 May 2021 22:32:54 -0700 Message-ID: Subject: Re: [PATCH 09/43] KVM: SVM: Drop a redundant init_vmcb() from svm_create_vcpu() To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 23, 2021 at 5:48 PM Sean Christopherson wrote: > > Drop an extra init_vmcb() from svm_create_vcpu(), svm_vcpu_reset() is > guaranteed to call init_vmcb() and there are no consumers of the VMCB > data between ->vcpu_create() and ->vcpu_reset(). Keep the call to > svm_switch_vmcb() as sev_es_create_vcpu() touches the current VMCB, but > hoist it up a few lines to associate the switch with the allocation of > vmcb01. > > Signed-off-by: Sean Christopherson Reviewed-by: Reiji Watanabe