Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2069633pxb; Fri, 17 Sep 2021 01:09:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvv5d7DxNGe93kOt2XKvmAsAci1El+zxfRFsQMWcmnpaKn4rbFTAo+tMxZURLNh8jxaf/R X-Received: by 2002:a05:6638:408f:: with SMTP id m15mr7758926jam.94.1631866187411; Fri, 17 Sep 2021 01:09:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631866187; cv=none; d=google.com; s=arc-20160816; b=RCU9r8nElj4P7/Y+7mFgJIiiyRYrFSm4aRlUFNdgj6T6PKKhOZCXQyYzkIMf6yyfjc 2dbXc2ZJXvhNk9Ri31CLbO70kBDCxMyqKOQe5/8Fln/O8A4CtFh6LbdkJsynv+QQIj/X 0rTlH7vt5olUA/0N2GX1eSyWoxBugl4fH3aMOZXkzXh2lEN0tmBQ6qd512iS29dsFaf3 TxuPMAQUl/3ECcaCTaSMed9ZVro5e1j06SGplS/Ere7285ZJZEySmhQfo93JSQXyHVg0 BZGEsAfzp1pqsb2C+mZXbubB8UHCiiGa/Bv+PwDnF+A4HQ7gXoPidwhhXnGhfWgw146o 2yaA== 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=Fch+BCg3HR41ekUQjpG3GOdcfqruvNbMqhruqZCG9TM=; b=UNAZlRIAB/sk74ZTATdjFlzwKXf3pAGnNzt3Z0e2Bm66/jFVdaRf6F0ZAeDpg4+zO5 YBuIGeEEi57R5btF+Ibq00jcWEUg/PEvf8LzDy4E9Nnum1wJr+Fb60OlB/eu0c63aQmk QGV2PxpKXvi3ibCzRytCaiNpE91HvIAbLLjAUeADHBqD+/OMxPmi6tbjXLoXVvM1DwSO uDMXL8XFMFMq8P6UpDtVyM2mFbc2BIauCP9SNCLMfvY5uAX2UYymbZIYBj6VAKZw2GOh U546CoDQs0fWNbHBKLkaC1l9/voQBO0IPhSsNx3CQwGIvqCMUdusBdlhgz0i2KqM3QQK 9lFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VU0JKe77; 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 z9si5732893ile.172.2021.09.17.01.09.34; Fri, 17 Sep 2021 01:09:47 -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=VU0JKe77; 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 S241419AbhIPS44 (ORCPT + 99 others); Thu, 16 Sep 2021 14:56:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243864AbhIPS4u (ORCPT ); Thu, 16 Sep 2021 14:56:50 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AE9CC0470DF for ; Thu, 16 Sep 2021 11:08:33 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id e16so6677499pfc.6 for ; Thu, 16 Sep 2021 11:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fch+BCg3HR41ekUQjpG3GOdcfqruvNbMqhruqZCG9TM=; b=VU0JKe77kfS2lcfPh1Xksu/gXWYm5U2CRSHOjk5wD2KeQu276EK+jc2VnrC+wYEeAQ 7vVV2DIqLaw6SSw7xvewUzVEXCYwUkOr7AW92q8SIXbhxYIvWTTDNohDSOt9JOjn49WO gm8tB1EP1n/uKUy6loqkqzZdzigOSa9I7wtKuRkve1V23pZ+1QYW4lJt8qrGllATObLl X4R1niqoSsq4NJujBzn2M19ZdG9tp2ls2rnqXmPpALn+mxXDCqxVbDwdjofWjJ/w7nQD owDwXSkc+7m/21ui1P/aysnEZptJ+ZTBKjaoTEhFnIkPt59+QZKwjjwsW7cvL0fpu8Fd ZvBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fch+BCg3HR41ekUQjpG3GOdcfqruvNbMqhruqZCG9TM=; b=nvKMETIvizuZLBpG/hecTo5cx5ogAO0U+w2+C8V2iVZONfUuq4crV094IYCqywJ3+l vDWwP8kEgB5Ueu1Jcy9WCbUzooM7gDhiVnym3As1Ud/91gc0kq0NxRa/J/LE3HqzVlwR CVgtTw360r0vDBsLf+byXxR4M3WQ7bobZOyuqkzPT6O3SUZbkvR53SlWUJFEH8V+0Atp B2sEuP1BsdUAD6xf5T7QDRPVj6VTdV6GLVrMTyFL7dbm+I/6WOOx97gB1ewEifBOxqCq UdUu54wUsbm9+GXsAQFMQeiRLuxN/6jPqBuw2+LkZhb4U1Nvtw2H3Y7uFUn3tEzhDnsc Mtqg== X-Gm-Message-State: AOAM532xf0+TK4x4x59PEeEljMy1EkS8B9+MERcmeiIzfJH7i0swoYX1 mWB2YfGfcbsWqW4XGDQojHTiMhxIRtIh2p8pKCgiOQ== X-Received: by 2002:a63:af4a:: with SMTP id s10mr6024367pgo.469.1631815712207; Thu, 16 Sep 2021 11:08:32 -0700 (PDT) MIME-Version: 1.0 References: <20210914171551.3223715-1-pgonda@google.com> <8d58d4cb-bc0b-30a9-6218-323c9ffd1037@redhat.com> <9feed4e4-937e-2f11-bb56-0da5959c7dbd@redhat.com> In-Reply-To: <9feed4e4-937e-2f11-bb56-0da5959c7dbd@redhat.com> From: Nathan Tempelman Date: Thu, 16 Sep 2021 11:08:21 -0700 Message-ID: Subject: Re: [PATCH] KVM: SEV: Disable KVM_CAP_VM_COPY_ENC_CONTEXT_FROM for SEV-ES To: Paolo Bonzini Cc: Peter Gonda , Sean Christopherson , kvm list , Marc Orr , Brijesh Singh , 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 Wed, Sep 15, 2021 at 3:33 PM Paolo Bonzini wrote: > > On 15/09/21 18:10, Peter Gonda wrote: > > svm_vm_copy_asid_from() { > > > > asid = to_kvm_svm(source_kvm)->sev_info.asid; > > + handle = to_kvm_svm(source_kvm)->sev_info.handle; > > + fd = to_kvm_svm(source_kvm)->sev_info.fd; > > + es_active = to_kvm_svm(source_kvm)->sev_info.es_active; > > > > ... > > > > /* Set enc_context_owner and copy its encryption context over */ > > mirror_sev = &to_kvm_svm(kvm)->sev_info; > > mirror_sev->enc_context_owner = source_kvm; > > mirror_sev->asid = asid; > > mirror_sev->active = true; > > + mirror_sev->handle = handle; > > + mirror_sev->fd = fd; > > + mirror_sev->es_active = es_active; > > > > Paolo would you prefer a patch to enable ES mirroring or continue with > > this patch to disable it for now? > > If it's possible to enable it, it would be better. The above would be a > reasonable patch for 5.15-rc. > > Paolo > +1. We don't have any immediate plans for sev-es, but it would be nice to have while we're here. But if you want to make the trivial fix I can come along and do it later.