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=-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 16686C433ED for ; Tue, 6 Apr 2021 13:48:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D04A2610A5 for ; Tue, 6 Apr 2021 13:48:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344712AbhDFNsN (ORCPT ); Tue, 6 Apr 2021 09:48:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43789 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233407AbhDFNsM (ORCPT ); Tue, 6 Apr 2021 09:48:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617716884; 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=FhcIbSTem0++Uo9Wv8Vmhg9c/hOyhArpG7XvuFEipNM=; b=c0o2dte2iZcDjJ7CwlwKLVklXJdtaJO2z9/4/hW95gY+g31By2K7ytDmh0y/GoNM0FaVrh 3qdmhXxfc/TkXmPgPiBH7Eph/ZYbv+kryfAO2Y79PcEoW/VOXFnMovgfVU/tbhs250svsp ekgb6NSBb8dISwjA2kapnNtLEYRmPcI= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-246-fW0k-wHXN9GvgGzll01W7w-1; Tue, 06 Apr 2021 09:48:03 -0400 X-MC-Unique: fW0k-wHXN9GvgGzll01W7w-1 Received: by mail-ej1-f71.google.com with SMTP id gv58so5465597ejc.6 for ; Tue, 06 Apr 2021 06:48:02 -0700 (PDT) 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=FhcIbSTem0++Uo9Wv8Vmhg9c/hOyhArpG7XvuFEipNM=; b=h6L7czcwPWdZGbg2MjXaHIk6jOvy9jI8IUV125hqu/+5MI5nmDBEI4pb1RavvFpwkU sir8/EtzPw45TtIvme0A4ZipeXvpoi0Zvz8IhK30KkcGjPcAfl8gPoXZ9co+Om7XNI20 BZFHRjGIDBFyUaEqLTSUPagNfj5UmvSKd8EWD/1Uo9Sg8/I3SRG9cXdMkjpVO+rQFmI5 Gu1qdLQ/errV6EBU/E752ghDJ8JQZHA+wzG5o3XJ/VfEnlOcYCgB5SDOT6z5lag09QuJ v9qgJkQxpTjLlZHEOPv5hsuksDQ6vfer1dY3Ugxw6813kHvOE2ZYJoKWJmHSKLU+TGE+ CXjA== X-Gm-Message-State: AOAM533fVlPais53pFIJA1K0jjP3evt6Vucys6WRyah12dVs5dHRr0D3 wv8wu4TRPjkYnrW8oSKvHrxIMScu5hLldC2jHNJGWAyKwD6G06kC/31dmM+7z7FQmLRj64ufz0z 357/hBFaMkPCe X-Received: by 2002:a05:6402:6ca:: with SMTP id n10mr38302722edy.312.1617716881860; Tue, 06 Apr 2021 06:48:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzV+i+kYPSIhkfD4H44Hsb+wtCbRL65VQeboMCwdBXk+AxQCumzW0N8zz6JMQCX4WELpUaSaQ== X-Received: by 2002:a05:6402:6ca:: with SMTP id n10mr38302707edy.312.1617716881666; Tue, 06 Apr 2021 06:48:01 -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 e15sm4780089ejh.56.2021.04.06.06.48.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Apr 2021 06:48:01 -0700 (PDT) Subject: Re: [PATCH v11 10/13] KVM: x86: Introduce new KVM_FEATURE_SEV_LIVE_MIGRATION feature & Custom MSR. To: Ashish Kalra , Steve Rutherford Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Joerg Roedel , Borislav Petkov , Tom Lendacky , X86 ML , KVM list , LKML , Sean Christopherson , Venu Busireddy , Brijesh Singh References: <69dd6d5c4f467e6c8a0f4f1065f7f2a3d25f37f8.1617302792.git.ashish.kalra@amd.com> <20210406132658.GA23267@ashkalra_ubuntu_server> From: Paolo Bonzini Message-ID: Date: Tue, 6 Apr 2021 15:47:59 +0200 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: <20210406132658.GA23267@ashkalra_ubuntu_server> 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 06/04/21 15:26, Ashish Kalra wrote: >> It's a little unintuitive to see KVM_MSR_RET_FILTERED here, since >> userspace can make this happen on its own without having an entry in >> this switch statement (by setting it in the msr filter bitmaps). When >> using MSR filters, I would only expect to get MSR filter exits for >> MSRs I specifically asked for. >> >> Not a huge deal, just a little unintuitive. I'm not sure other options >> are much better (you could put KVM_MSR_RET_INVALID, or you could just >> not have these entries in svm_{get,set}_msr). >> > Actually KVM_MSR_RET_FILTERED seems more logical to use, especially in > comparison with KVM_MSR_RET_INVALID. > > Also, hooking this msr in svm_{get,set}_msr allows some in-kernel error > pre-processsing before doing the pass-through to userspace. I agree that it should be up to userspace to set up the filter since we now have that functionality. Let me read the whole threads for the past versions to see what the objections were... Paolo