Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2808271pxb; Tue, 21 Sep 2021 08:07:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxHQD2J8nXN10SHeR2b8jM1gY1+TstJ+LLSIxGtnKFyACUmlrLdjZ9hzURulEBnmKjSA8p X-Received: by 2002:a02:1049:: with SMTP id 70mr369986jay.123.1632236859714; Tue, 21 Sep 2021 08:07:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632236859; cv=none; d=google.com; s=arc-20160816; b=rcCrAD1cI7PLBT0qQKM3RUWQnPSt+oe6mfFaCJYN9dtIU+iF7VlsjyFfj31DVzzm5i cAA+0LslaRfpD8wgYOlAj/rfcluSFF0FK+JVzqcE2nT31VejFJgHc9oKi/Kd7tbmQtWp f/XZGLqFSVDERW5ybtnYOGVTobxu5sQWhLzSjnmRdGibYarY8RCGbk93iOocBqZnr+D/ zm+QzKaAbRV6gmDtpvGySE0RcVmg7HajlpVXLQGgbD435JUGjy2XEEyMurhWZ/r7JXmh z3ubGb1BJMUjOonJDSMe/PPQdpRjGlIVI4RrsRs/s+3WnFG6/zd9lny9WpZCrz5WXPFS L6Qg== 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=aRK25cZbHHtlQKavhU/T9/6jGV0iBTcTONyhOsAYBmY=; b=ENmrkWh61L0+NP7yFaO97RbGWyrJ9Px+fHExV/usAw6Ur6tV9BWU96oxuS7t43tKXL uyw2eD7IvVw8SUeD0TAVMhLZM2QGJXjixxW+qWDPGDkT2wmYLAw2XLEWiQxLC0nkAcaJ EphHpJzs9D5gbDY7YOjBxvmETAT9b55hhaVkF75fSzL6kgL0uqhvDblEDo/5HwzrmatI XWSLi3NyX8gn42p7HvTxcO6bb3n9W4S+6UhonefAsbb9NIeFv9wUpml8e9Uxa5EhDi/y iwl/tcDyGBr/KY492lm/pVbyQAqxwlFqQLXmtw06eZxEAjPDEMt4tfzRojhKGbkGv70P ZfJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=am7IEocc; 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 c16si3586802ili.126.2021.09.21.08.07.15; Tue, 21 Sep 2021 08:07:39 -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=am7IEocc; 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 S233853AbhIUPHO (ORCPT + 99 others); Tue, 21 Sep 2021 11:07:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233809AbhIUPHN (ORCPT ); Tue, 21 Sep 2021 11:07:13 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DEC6C061574 for ; Tue, 21 Sep 2021 08:05:44 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id t10so76239108lfd.8 for ; Tue, 21 Sep 2021 08:05:44 -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=aRK25cZbHHtlQKavhU/T9/6jGV0iBTcTONyhOsAYBmY=; b=am7IEocc9YZgVOfwglWFP7qU3HRHIDFdEY7/6iVrw3nBX4AN0QxJcPORozT0JcXZd3 X3DouWAu6xRb4Y/CKD62V/RwVGwqBvqbWnUz7FEcko+fyqpZSbwHvD4vLPuFdIpv3ONm wjRohBQR48FUAQorBiB4gTtYNZz19Qamw+lcNrw9us4NBvU4zi8MbkIAFDY1nQDeZBDT NJpv7eGl1T1p5HLTfawuBfmif8afkEsGEiMwtb+8VHEbLV4JR4IPzajP2UYBaLPScr2m JQ59dIG7nOprPeCxyQ8xuizIleLUbGiDwEovP/jvKQBgFPjO1HC2YQ4XCwVnNDN3wklf +kXQ== 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=aRK25cZbHHtlQKavhU/T9/6jGV0iBTcTONyhOsAYBmY=; b=vr/4QKFDi+37bjYaqb/sVSuUZ2nwPcH8ojeqLsrukF7JMw4qGF3c8/FxJRyGFhP6Nb /tWOawUF2VqU+dy16fNgKU3ZI3dEwfhLEveZynsLTtMx76igZKedRrN7jpscomovVaPK W0iCeAsWaOt4DSJ0roLjaMc5gBYm0TYAMkPHVwv9OMm9xnz26QlUmbjQw1AoJMCNrWB6 SdKefNYMplJmTbLyAcXH93+LEGuiAO0p4n5AXYFADzE9+tqUsnSxHRskDV6/ldkDUbWP JoKmCC+FCakxaLrsLuRMPNzAS85AeIWAdKR4v9wACxjTI+0wVMVgs0uKJpSmks0l4oEG pcbA== X-Gm-Message-State: AOAM533Ls9EdRSSa9VD9GilQLCIsANBO+nhqV960ZrDzR5ecl0OYIkw0 HOxvberW1kYr7YgaUerKIJNrzaa3XPp16iqpDcW2Yw== X-Received: by 2002:ac2:43b1:: with SMTP id t17mr22629712lfl.373.1632236672432; Tue, 21 Sep 2021 08:04: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: From: Peter Gonda Date: Tue, 21 Sep 2021 09:04:20 -0600 Message-ID: Subject: Re: [PATCH] KVM: SEV: Disable KVM_CAP_VM_COPY_ENC_CONTEXT_FROM for SEV-ES To: Nathan Tempelman Cc: Paolo Bonzini , Sean Christopherson , kvm list , Marc Orr , Brijesh Singh , LKML , Steve Rutherford Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 1:00 PM Nathan Tempelman wrote: > > On Thu, Sep 16, 2021 at 11:08 AM Nathan Tempelman wrote: > > > > 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 Sounds good, sent a 2 patch series this morning. > > > > > > > +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. > > +Steve Rutherford