Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1401418iog; Tue, 14 Jun 2022 05:31:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uDrhsujhVnKOWQUiLKVBQis6t+pIW27Mtm2jKcTYW9YbcdE/FH+vSq5ypPrGd44W49DlB1 X-Received: by 2002:a17:907:3d8d:b0:70f:257b:a34f with SMTP id he13-20020a1709073d8d00b0070f257ba34fmr4279812ejc.352.1655209893595; Tue, 14 Jun 2022 05:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655209893; cv=none; d=google.com; s=arc-20160816; b=d4b/mPxC7mGJNiD8wrpbRPkKsy4PyS0bC3ZpImKNgEED6zMSVrhbJXnvWrcHU2ZIcI fLgajQFQ+SqA9esd2Y5lwRH0tjzMA2IgBtUKK1SkFNks3+CMjxsQaNwqf3tdMtC527n8 hafL01IvICk055z+xVNOryuIDMGRFJmZn+kaGi5cK18ivcWF8b1ZNwa66dXSek3sxLfd ScPHeBfeRRG8nVhh4vNCxN0tRA0ijZBYULOfHlqALUqNaP7GRsPb0Vuf+9ICtJPdL4+T pSNsTmAoBehUWXPUmm+K1DLk4zyb1DI+YjSsDuom+JO8eO93D9nc/ktMZFaXv29lGsa0 XBWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=xWqP97KiAJDxiZtnK2LJEZYJu6FuzCpbf5J8wQ1l+A8=; b=cHGbqB3UoNIRlLgunhSAYbpmlF3+TxxMfjSMV4mp2qGvWdXFfmeVbWWCsMo2gZ+Xkt vhW+nr4XfoXK2nR1Yl/nqAqrwOsk2FsDhoB+EZvPbwzMXt6XIbIw5yf3drzF3q1Ca+ET MU2gNWWKoqUaTZgH3J1kf2581DezCwXti+vw/qFyQucIn6G+sOt7JO1pmS6rjKXqUL/t Uv/6JS9J1PpWT0lFaGDfUy2VmxNf3c4N1uuQAQIREdzd2ykInZHTuOftXbNPFDXz78FK LkEmmxXqAxcI8FOKQqmYZKV/fWE9oQUBZqasFmNSjr7hQS/PNhM+t3LQSBrHlJwhaR1h CSKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LtgPRQh2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd6-20020a170907628600b006fef110c5a4si11956252ejc.968.2022.06.14.05.30.59; Tue, 14 Jun 2022 05:31:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LtgPRQh2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234943AbiFNMRU (ORCPT + 99 others); Tue, 14 Jun 2022 08:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240713AbiFNMQE (ORCPT ); Tue, 14 Jun 2022 08:16:04 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8195926D1; Tue, 14 Jun 2022 05:16:03 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id x17so11023079wrg.6; Tue, 14 Jun 2022 05:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=xWqP97KiAJDxiZtnK2LJEZYJu6FuzCpbf5J8wQ1l+A8=; b=LtgPRQh2VSOKYrwUorW93/iyjS2VmL687On0wH0Vzz5Lp1tJCeEC8nJYA0hVSu+CKd Ic4LgHppcJ8kB3NPc+iefq3EABGG3grvmIM1Se8RK2ac9IOLTXKg0WcRo87boB3fL7Ns wbie2Hn2e2hhuJ+J4Y+0AdpNSxsQPa6b97u8rn313apb348/opGB+SK3odI+oxp70p9+ 65gitqZwukfiiSIPJFWZ5EeInwg8EsXh+Blbv5EuupqNqLpjVT7ydilYgDKulwxTk/6o 01jxOAHdPPwl0yhp+rvsE9kRMXtRXoD8qMrb3qodj+SngGWb10u32g5gYk8WV+lemUWI jJYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=xWqP97KiAJDxiZtnK2LJEZYJu6FuzCpbf5J8wQ1l+A8=; b=U9di2qA2N3m46ehgaU+T7Wzr2dKzIRlaXpnFmCA3uLFyH/V3dDfX27m5dPdk02itzz abTMTNAL+/LMzgixEn/rJBw3vWRiQQgv+eJ9Dljc9MkZeLjG6KS0cf5V0phLiiOaOgHx dAwhwuFWEbJSUzor5ZPgIX02ram+Vtwz9lZeDnJ9iMZCK7Pqjcz6eaTWHGQ15m1kmmPO 640/KGNwB4m5YxsWlqAo4OBMwBozmn+38AA8qik4SBQS9vD+D3+YriTpil0AANGwJDc+ RpIvoNZFzchC9VVGumZmWx5IkuIXMoN2o7zXFSfamKcQM/ZxeTnc/A0rg62k2GVAe1aQ uG5A== X-Gm-Message-State: AJIora94/4KyG4iRVzeYNX1LuBlyDIXsdEjS1c7xJjksxMGkzGINFCub lhOUJo8Szk1ZQT4OPwxAPpg= X-Received: by 2002:a5d:6da3:0:b0:211:3597:62b1 with SMTP id u3-20020a5d6da3000000b00211359762b1mr4732785wrs.660.1655208961985; Tue, 14 Jun 2022 05:16:01 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:9af8:e5f5:7516:fa89? ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.googlemail.com with ESMTPSA id u7-20020a05600c19c700b003973b9d0447sm21416366wmq.36.2022.06.14.05.16.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jun 2022 05:16:01 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <75bdc7ee-bac5-ae05-dffb-cb749c9005e1@redhat.com> Date: Tue, 14 Jun 2022 14:16:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] KVM: nVMX: Don't expose TSC scaling to L1 when on Hyper-V Content-Language: en-US To: Anirudh Rayabharam Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Ilias Stamatis , Maxim Levitsky , mail@anirudhrb.com, kumarpraveen@linux.microsoft.com, wei.liu@kernel.org, robert.bradford@intel.com, liuwe@microsoft.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220613161611.3567556-1-anrayabh@linux.microsoft.com> <592ab920-51f3-4794-331f-8737e1f5b20a@redhat.com> From: Paolo Bonzini In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/14/22 06:55, Anirudh Rayabharam wrote: >> That said, I think a better implementation of this patch is to just add >> a version of evmcs_sanitize_exec_ctrls that takes a struct >> nested_vmx_msrs *, and call it at the end of nested_vmx_setup_ctl_msrs like >> >> evmcs_sanitize_nested_vmx_vsrs(msrs); > Sanitize at the end might not work because I see some cases in > nested_vmx_setup_ctls_msrs() where we want to expose some things to L1 > even though the hardware doesn't support it. > Yes, but these will never include eVMCS-unsupported features. Paolo