Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp877203pxb; Tue, 14 Sep 2021 10:35:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX02A3p4dNMwWaeE3DNm/S7Cge5d7Dh5h8Az/DpRXQUSqrS8cdk5fe5mnHu8ZVgqROzc1C X-Received: by 2002:a6b:e410:: with SMTP id u16mr14035178iog.38.1631640902404; Tue, 14 Sep 2021 10:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631640902; cv=none; d=google.com; s=arc-20160816; b=TiAP8pyndtUafscu/00nvoal4rn2vLw8Hu3sX6QT32ykSwPq7psU6UmE1Xyn6/MqqZ VmxLzmsXHgo3eGqMVNDvEgeWjA6RBeU3AyzW6ZNWcwH9JGKmS0Jqk5qWv8tGzBe2k366 Yd6QsYm/oZjbT8yR7eS+7Ec/rKXsUUrn1qCVlz4pAEaerbBRAACbmDjV2OZC1mWnBi4S dOiYqbE4BY3e9B6sVypbKpF/xFG0nYB3bdt6u4iS+ibASNfzgH+tfwUw4/RNOjP+RbAr IfAVvan9EeMOKbC3HbWcHLT0F95t8QnrmeMUQY1m5KMOfKff4QX5+GPdabH4BcRP5tFg WZsQ== 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=uuB6WFLIwWapJPUQWcB2Kv5KA49vQ2VGYpyDhpmsn5s=; b=yP7UCZSW5GzVNEJUoyWNuTT+2N5780iImzgdRykUonocbxk1L0DXBUlD+MnvLWhMp+ lGwft1SFnw8WLBR/WLVQ+hk7e3bl3FHaH8ZY/cdHCU76jnO7UrcdbpdmvEbu2XtaGUUg RVaPsrZKm7ZWuk5GkxKWe8yq5FIrpk744ccKerxnxI7h0dZBl0liAg6ZlX0AcnUQUjK1 WHZ/MfkICwR4NMgF6WrI7nKH+Np6GlFQRQpNu1pV+DJpCSkNgsbTQHefnD2gI8I/GE9u J+o9S+3JCqYcbvpbQeez0+cHhYpTLR021fAvzhZ9NmVhvXiLG9JAfbmYeAADPDXwHT1y bfzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=FbhetDrE; 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 192si10072906ioc.91.2021.09.14.10.34.44; Tue, 14 Sep 2021 10:35:02 -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=20210112 header.b=FbhetDrE; 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 S231877AbhINReQ (ORCPT + 99 others); Tue, 14 Sep 2021 13:34:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231565AbhINReH (ORCPT ); Tue, 14 Sep 2021 13:34:07 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3849BC061574 for ; Tue, 14 Sep 2021 10:32:50 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id bb10so8727518plb.2 for ; Tue, 14 Sep 2021 10:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uuB6WFLIwWapJPUQWcB2Kv5KA49vQ2VGYpyDhpmsn5s=; b=FbhetDrEjnwyCwxxkyOS62IWKG83CV+Pyc6FmO8RiYnUWRm0dtGq+M20733MOX0nty 9mQ8LWhIjb5ymv1z1AerabI3Fw6A++M1KrW0+/nQlRTN//phjBhsC0CnYokjPun+6R9R EqcBM5D3im4CYFRqjN6L1J18ReNKMx3Osys+vg8g5JneWFAGpB1GuBTuov8t+6oqhDfs dEu3LXKZef++ifkNdfGZbonc4WlPtdfNJGPBbCzRriR0ci2n7UbS3BdDrO0HoW2OkzcY 7i7Aw3Ph2roKzJS7Vw+9abmJlfxdEwAqqdgNp0lA4lOuPhX9gMcXdgGxA0noFBDQANL3 Qq5Q== 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=uuB6WFLIwWapJPUQWcB2Kv5KA49vQ2VGYpyDhpmsn5s=; b=avaToQ8v4+LfzV3Q7RoL6E+x9D9hVlV0CJJVCZmLNWy7K93R5nl/Xzi5MSddzG4qI3 Vvjao0YFSl+dZqXralC++HXRI/ZuXW46bdPxPEDDPzdtFuzYOgSTfpAQWbQcX3Cne1JX c+8iykmItGl+WqpFO8QZ9WKsTVTt3RaJllOKpyamqIB+wtukGdck0Rxo5T1BG45H0eCz 7qyGB6zlTDRKLGKiqImqBX2pOT9U4qF8KoC33+iU3bXy8IW7e/QPXSnXqNaVrLZ1rvRb tVMftdDVp4cMcsliLmTf89soMLgNnIKVtAAnK211uGJnP2ATIzWpGuzcKUe46WnJp0AP mwjw== X-Gm-Message-State: AOAM533g2UwH4MBGffYfii1DwL8zYHgb1UnM4X5L7Z4abicmYaaQend9 wN8hfTa6UCVPjxABdZhpaVofZA== X-Received: by 2002:a17:90a:b105:: with SMTP id z5mr3315056pjq.64.1631640769453; Tue, 14 Sep 2021 10:32:49 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id u12sm11981643pgi.21.2021.09.14.10.32.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 10:32:48 -0700 (PDT) Date: Tue, 14 Sep 2021 17:32:45 +0000 From: Sean Christopherson To: Peter Gonda Cc: kvm@vger.kernel.org, Marc Orr , Paolo Bonzini , Nathan Tempelman , Brijesh Singh , linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: SEV: Disable KVM_CAP_VM_COPY_ENC_CONTEXT_FROM for SEV-ES Message-ID: References: <20210914171551.3223715-1-pgonda@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210914171551.3223715-1-pgonda@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021, Peter Gonda wrote: > Copying an ASID into new vCPUs will not work for SEV-ES since the vCPUs > VMSAs need to be setup and measured before SEV_LAUNCH_FINISH. Return an > error if a users tries to KVM_CAP_VM_COPY_ENC_CONTEXT_FROM from an > SEV-ES guest. What happens if userspace does KVM_CAP_VM_COPY_ENC_CONTEXT_FROM before the source has created vCPUs, i.e. before it has done SEV_LAUNCH_FINISH? Might be worth noting that the destination cannot be an SEV guest, and therefore can't be an SEV-ES guest either. > Fixes: 54526d1fd593 ("KVM: x86: Support KVM VMs sharing SEV context") Cc: stable@vger.kernel.org