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=-7.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=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 DD260C4332D for ; Tue, 2 Mar 2021 16:23:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA48164EE4 for ; Tue, 2 Mar 2021 16:23:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1839327AbhCBQRO (ORCPT ); Tue, 2 Mar 2021 11:17:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49734 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346519AbhCBOWV (ORCPT ); Tue, 2 Mar 2021 09:22:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614694816; 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=T6cKM/MlBUnmWehEbJOwaDKiIZgZyKVdolHs1AjckNQ=; b=DzBcaAjvg0zWRLI6D6cIJzG+t/RyiFdUKZeZfUdwATj0U64+5ojyGtTbphEnGFnmKPWpFn vK60Rz8k+LfGqMDcwsquVmnRnHRoeD6KjXcj7OLhwKFzphI+1NAngl4K87EzuZEKKAS/I2 GZy9ahp5oxUm3yWkSY1Yqt+XKW4PBV8= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-YQIcMaxlOcyS1EUFeRSLrg-1; Tue, 02 Mar 2021 09:20:14 -0500 X-MC-Unique: YQIcMaxlOcyS1EUFeRSLrg-1 Received: by mail-wm1-f70.google.com with SMTP id v5so1244176wml.9 for ; Tue, 02 Mar 2021 06:20:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=T6cKM/MlBUnmWehEbJOwaDKiIZgZyKVdolHs1AjckNQ=; b=q98eDPTEyDFXc9eX4GcIjmIst7geja0Ezeh51sDmaa40A6wArtxiSYJ9JqemG2lMg7 OvezAsywZINGsBCf50koovVWCuBCa4FOXxk7zZ7NlQM7r87OTDLBVHZSslAfOGCbSq2v 1erp2AcymVvI0en8LuQTnc9kj6lum1wIdBMlENgu2OOURnYvR4ptrQ3YXRNKzqVtKdjm cFWOLoLha9mY/D6sUVrLy/MYPIwNNd7vZ0NvfwaxcE168kvcqZ4dIoG2fbC8btWeq03m ryHXUsNFej3c2i2eWxlnVoRDtGyvdj3SvoWy5B8Ss+dSHqIhZOUjVTuBuNI4/VH2kR8r TNEA== X-Gm-Message-State: AOAM530srI3AAH8J9HrMAXWYmrzxaab6xerGB/QkOUjm1gc8+IBst6DP RLsNwGpKHmjB0P/kmI/ERonQQGajCB1te3ZQV7qGNogygL/SZwwV6XKQ4z6RrS9rCPGiXdW3McH fvf269/VnUEQK X-Received: by 2002:a1c:1f94:: with SMTP id f142mr4335324wmf.180.1614694812906; Tue, 02 Mar 2021 06:20:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4EeI8+gO2ZeiqMHfTMS9oaplJEMF/NY0ct6Bm2rwTKqquoQc6Lv/D+f35ZjrzwiJfJLyE4w== X-Received: by 2002:a1c:1f94:: with SMTP id f142mr4335309wmf.180.1614694812777; Tue, 02 Mar 2021 06:20:12 -0800 (PST) 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 j20sm2505487wmp.30.2021.03.02.06.20.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Mar 2021 06:20:12 -0800 (PST) Subject: Re: [PATCH] KVM: nSVM: Optimize L12 to L2 vmcb.save copies To: Sean Christopherson , Cathy Avery Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, vkuznets@redhat.com, wei.huang2@amd.com References: <20210301200844.2000-1-cavery@redhat.com> From: Paolo Bonzini Message-ID: <35b73239-56bd-8979-d9aa-1571eb73e94d@redhat.com> Date: Tue, 2 Mar 2021 15:20:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.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: kvm@vger.kernel.org On 02/03/21 01:59, Sean Christopherson wrote: >> + svm->vmcb->save.cr2 = svm->vcpu.arch.cr2 = vmcb12->save.cr2; > Same question for VMCB_CR2. Besides the question of how much AMD processors actually use the clean bits (a quick test suggests "not much"), in this specific case I suspect that the check would be more expensive than the savings from a memory load. Paolo