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=-9.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 B4035C433FE for ; Wed, 15 Sep 2021 08:44:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99912611AF for ; Wed, 15 Sep 2021 08:44:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233002AbhIOIpm (ORCPT ); Wed, 15 Sep 2021 04:45:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27669 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbhIOIpk (ORCPT ); Wed, 15 Sep 2021 04:45:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631695461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ADrqp1/QUIGA/T7aV/2lJTe0h/xjpqwDvAEv0yJIxIE=; b=Wue1J18LTE3Hie5Wu9ZummcLQPD9zm6wShMTEFSgnbye3s5is1tjs69eaJO2JlBa+liI7Z s8kvirKSqKtINW75cjyLC0zWt0OsRyhJ2imd/0S8REg9vnF9+RYVmldnUzzV8b+2bjwJ7x vEOTN2iugv3Fqw2uhmPiez+UeE2aG1w= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-578-4uZp-i4iObOPW_mhSRGVQg-1; Wed, 15 Sep 2021 04:44:20 -0400 X-MC-Unique: 4uZp-i4iObOPW_mhSRGVQg-1 Received: by mail-ej1-f72.google.com with SMTP id s11-20020a170906060b00b005be824f15daso1142874ejb.2 for ; Wed, 15 Sep 2021 01:44:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ADrqp1/QUIGA/T7aV/2lJTe0h/xjpqwDvAEv0yJIxIE=; b=qHN7PIjyHYjyfm43xj/kiHqnMZkqDb+IjwiLDSOf1yAYY8cKhlyDX5+PqEYbYUNXRU v737DIQIMpI2il+n0bCe0y61ssaV+IthDE0W728jeuAIaffpWjN4GU+mjTCNGehicP2x 9LaFQDJWW7n/Du+Rw7k/zeLbZwm6QzwYFdH17NL3gBpmJXS/SqhHJTHw5VPPeRoPWi7s VVubRafFI2bIObpcxLoDOqbN9JeY1btVhhZqafAEuhzcmZgw/ad4FHV8IF1CcBVZAw/q AT0vP68w0wfZVGHGxyZNScHIX5PGtaViF/xq2H9HsDETCGj28ogJeEP1KSFcTO5K7e9m 9k8Q== X-Gm-Message-State: AOAM530G+fLLZfioCOljQnV1qjfrlAYJXKs62W8sdrQzGQmO/LdYNKaJ FR36yUhoAvwQ0mgZb4BA1GrXsGgr7M5+q1YG4kSwY5keyS84cJrgZ7+Tk467xhMRtMXNVFB4xMh i2v1/+VFyvnsWE4Ev8/UX2vBrqlK4za4jYO3UQAn+gtDdlhAT8nyyw11DrVjXW0iZri33E6R7bL M0 X-Received: by 2002:a17:906:720e:: with SMTP id m14mr23382034ejk.500.1631695458893; Wed, 15 Sep 2021 01:44:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYJf8R+muJrg6i1DgERLQ+Qjby5sOQnwwLs5CQhAF0+bn8gEhcl2FLgZ/RVYOHNg30uMCZAA== X-Received: by 2002:a17:906:720e:: with SMTP id m14mr23382008ejk.500.1631695458655; Wed, 15 Sep 2021 01:44:18 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id mq25sm5416905ejc.71.2021.09.15.01.44.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Sep 2021 01:44:18 -0700 (PDT) Subject: Re: [PATCH] KVM: SEV: Disable KVM_CAP_VM_COPY_ENC_CONTEXT_FROM for SEV-ES To: Sean Christopherson , Peter Gonda Cc: kvm list , Marc Orr , Nathan Tempelman , Brijesh Singh , linux-kernel@vger.kernel.org References: <20210914171551.3223715-1-pgonda@google.com> From: Paolo Bonzini Message-ID: <8d58d4cb-bc0b-30a9-6218-323c9ffd1037@redhat.com> Date: Wed, 15 Sep 2021 10:44:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/09/21 20:49, Sean Christopherson wrote: > On Tue, Sep 14, 2021, Peter Gonda wrote: >> I do not think so. You cannot call KVM_SEV_LAUNCH_UPDATE_VMSA on the mirror >> because svm_mem_enc_op() blocks calls from the mirror. So either you have to >> update vmsa from the mirror or have the original VM read through its mirror's >> vCPUs when calling KVM_SEV_LAUNCH_UPDATE_VMSA. Not sure which way is better >> but I don't see a way to do this without updating KVM. > > Ah, right, I forgot all of the SEV ioctls are blocked on the mirror. Put something > to that effect into the changelog to squash any argument about whether or not this > is the correct KVM behavior. Indeed, at least KVM_SEV_LAUNCH_UPDATE_VMSA would have to be allowed in the mirror VM. Do you think anything else would be necessary? Paolo