Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp883286ybk; Fri, 15 May 2020 16:38:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbGhWqTegmWWYLZAnv8c6+rCZdxEr9EJxhgB9aQuHod7K93w0deDCbCdIOhC850+TsKfF7 X-Received: by 2002:a17:906:34c4:: with SMTP id h4mr5351140ejb.167.1589585936797; Fri, 15 May 2020 16:38:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589585936; cv=none; d=google.com; s=arc-20160816; b=jb1PPeWB2VaW+x1aMVtTwDzBl4xtIsPiB0R0zVM+T41UTEOW2nnV7zLdUHCDn38JF0 bSPIENknL1XTrs0jf/rS2/KVITqqZMMIUVldWtJlNZRu9P7/1gRoFGiXeWOfhSv9J+Bh 3AnsoERUGn+djyp2I8SzXH3WqOd5dzf+11bvr13oQhy0vU+pj6wcI6YQiX8xl3Tut6TP DID9RFQSrMs9cmqwYzeVbfSZb3aT1gow05TyiHDubelzBPE6gmFyRxWilkCUBOW6d431 1rBTC5PKfQJyH4K9E40C7nM35XleG5gYd1gZ33SuiP59g17uQRt4yBHL6Yw05s2pckoM O8EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:references:cc:to:from:subject:dkim-signature; bh=xPvxfIHV4v9IjiFC+Zye4ht0XV9HXsO63Cq7dSpWmMk=; b=jrNBhTLak5ftqveqW5nfGGJLtqNafWaFjuLvJ6qyo5DFnGk8y7T3BnKhiI2HajH0mv u4anIKUV5ZlKhIhkdTFIz0G9036342uJMwkG2XBo30welKHCvRfEXNLbwe6wxD2CqeCx C16mm+Nw4rJNH+HnokSHSTBP2WCxedycZY+tCX1t0HyKp+owKWF5Ztm4C0RTRZRKNoL2 q+BmLAEvrhRf79VSaL6a37P+Qa5UO4ZrRFy9BLwgjNvj09g8sNI4WXRsFWzQBsMhZFWl j7C0zs4d2sWHf+sXrAmlTX00HMAfAEpS0DD4+0LqYfDxPIu09i9QD4jf25Gf9JiCqbM7 FDMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kZ+p2vv4; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si2059280edw.590.2020.05.15.16.38.32; Fri, 15 May 2020 16:38:56 -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=fail header.i=@gmail.com header.s=20161025 header.b=kZ+p2vv4; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726615AbgEOXhA (ORCPT + 99 others); Fri, 15 May 2020 19:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726198AbgEOXg7 (ORCPT ); Fri, 15 May 2020 19:36:59 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B99EC061A0C; Fri, 15 May 2020 16:36:59 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id y3so5357021wrt.1; Fri, 15 May 2020 16:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xPvxfIHV4v9IjiFC+Zye4ht0XV9HXsO63Cq7dSpWmMk=; b=kZ+p2vv4eoPP83iBpMXz9hUVn7kv1vMm2lmbsIt83omaQ6QCjXkqtNOpcCSMUjgP4i H69uZc732gFUTHso8/y479VYLXosV18cGA6tVUa8G+vFv4c/Uzop9aXFN4mzBrR6z8k5 6LEmbdDtF0p/PzyHF3AvwF+Lm0kTkCvQ/iloaZi/ZDxezTR4hmTI2DDd2FlM/ThhJQK9 nZ3M+a3+0K+meMgASh1dl39K2pcrPrLrvS4ty0ESEf2vVqpNO3sodtKVsuFVRvts/U3w tqu6jy1LfYwXWpcfdZ/eKON5GHv2OQo/xeAvz8feGKftiaRkj0qhdu+SP2mw6TZ7wYWm wKUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=xPvxfIHV4v9IjiFC+Zye4ht0XV9HXsO63Cq7dSpWmMk=; b=Pm5CkcR2/ABq3pxRUzLJgUOm+AJaqX9Bod+qMs7kDfvU9A3hXT3L2qiZmI3Tmbpjfg sBh6y89Rd0WQMwLqsmejqssgyyxWeJA2cDXV+LsdQsYZmtOcXhAnt5mugsEkU/B8UK1e ue+KO3juHVIh0vI2B/HnNkrr6wqRYfQnoIIH/EBs9iwBJV3649hXzW0WBHwziW71gXr1 oWSedzcdKkFUH6noyYgaDPoPfI5wJATpfIFi2IfQKq1aB9OZf/ogSTsem2g/b9yUiP1v reX9M/Ru/8fUpPe9X/B3DJ5VZytSMi8CmoN47hZuAj2FX/HxwUF4N4H+uwsznO8uRFEx 4Zug== X-Gm-Message-State: AOAM533537XoejmvVCv5M0jM6vHLGasViiTv2diHuNpNv31mCGI49tXN CUYHQxz5veKDihlNJ19bUAo= X-Received: by 2002:adf:fe89:: with SMTP id l9mr6679825wrr.400.1589585816995; Fri, 15 May 2020 16:36:56 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:7012:d690:7f40:fd4e? ([2001:b07:6468:f312:7012:d690:7f40:fd4e]) by smtp.googlemail.com with ESMTPSA id w13sm5571603wrm.28.2020.05.15.16.36.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 May 2020 16:36:56 -0700 (PDT) Subject: Re: [PATCH 3/7] KVM: SVM: extract preparation of VMCB for nested run From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Cathy Avery , Liran Alon , Jim Mattson References: <20200515174144.1727-1-pbonzini@redhat.com> <20200515174144.1727-4-pbonzini@redhat.com> Autocrypt: addr=pbonzini@redhat.com; keydata= mQHhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2 CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04 hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd wEv1/Aj1DgUHZAHzG1QN9S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TecLptsXaes uUHgL9dKIfvpm+rNXRn9wAwGjk0X/A== Message-ID: <891b464a-60a6-3706-da5d-f0ef206d7301@redhat.com> Date: Sat, 16 May 2020 01:36:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200515174144.1727-4-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/05/20 19:41, Paolo Bonzini wrote: > Split out filling svm->vmcb.save and svm->vmcb.control before VMRUN. > Only the latter will be useful when restoring nested SVM state. More precisely: when restoring nested SVM state, svm->vmcb.save will only have to be filled if the nested_run_pending flag is true. Paolo > Signed-off-by: Paolo Bonzini > --- > arch/x86/kvm/svm/nested.c | 42 +++++++++++++++++++++++---------------- > 1 file changed, 25 insertions(+), 17 deletions(-)