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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 114CDC433FE for ; Tue, 14 Sep 2021 17:33:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E92D760F70 for ; Tue, 14 Sep 2021 17:33:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231428AbhINReR (ORCPT ); Tue, 14 Sep 2021 13:34:17 -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-Google-Smtp-Source: ABdhPJwxQ3GBt33aFswDWpHqFURv5eOW64rFsjKvyrEXPnm6hekDo0Fq8+7h7eHpKO/GRZgYwQ+EhA== 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