Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5688014iog; Thu, 23 Jun 2022 03:26:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tAhUf4j9Js/HX+Z2TQiMpUDP7mnTt7dKwPxL/AfWMB4IpJk+V/89YmHMXojVWgkc8+0w3y X-Received: by 2002:a17:907:160c:b0:711:3b56:dc7 with SMTP id hb12-20020a170907160c00b007113b560dc7mr7400545ejc.587.1655979973217; Thu, 23 Jun 2022 03:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655979973; cv=none; d=google.com; s=arc-20160816; b=vYxlawqMgwyXSbPgOOCnAhkDBOYA3M1X52bvp9qlTrcdWaBrtF4jRIH4hkzI2qlUme mjL/2XnRj5VwUQp+IpKOH0nq3CbfoxIXqNffXuCWwHDqP9eWAcA3GGXiJl88rdga4yPt L3dAihY9jnVwiZC7ffX2Sm6gzpefK3Sc2XNF4kZrMZEZav4Lx01IQL6Ere+iluie6fTF N8KOVN3lu3XwBLu69c4N8XUr5C6Q3n+Njerixkd3AhDLaYGusiBw0Bf/KSTfEGbYzvEv ZDKFGVD+nhXfzmNQJ2p8asQ3kNgf2OJ6v9BddapGgDiJgumeygEuZ8Vbi4Wlcv04KMuu QucQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-filter; bh=ReoHMI5JhpilguE9X6PU0nYis/u6+UJ/Af/HK8AAjZ8=; b=weY4ZIpPU0SpGNt4w9qX/sV+z/bKy2hkrVwo1DCELtNFaTEOFzosl6C+ZXVcFtLPH0 qKfs7V5fA5UBQxvAO8GZg+hE6sgQR+YrqfEepJFGGhKvHwGHMliMqVlM++/+MJmCJGEU EFR+i61LoAMZbk5Z87oQMzl9Wc8+q5lnlFN8liW18zw5KUacstEe4etoUVd+ISQWopNu /vqyEsQas7AaX3Es7giMLZm1UvgwIs+yWzPUu0HCJyGbj+ovAOm8BChVVxvf8Opw4tbc aXILUNZQscFUtPC4VX/uGxRzIhDtWTzdzgRUly5eq458n4dzNbUpKt6/m0XRs1UWBvEc kRKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="sHf/2Tlb"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j14-20020a05640211ce00b0042dbdc55828si2107850edw.403.2022.06.23.03.25.48; Thu, 23 Jun 2022 03:26:13 -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=@linux.microsoft.com header.s=default header.b="sHf/2Tlb"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbiFWKRe (ORCPT + 99 others); Thu, 23 Jun 2022 06:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbiFWKRd (ORCPT ); Thu, 23 Jun 2022 06:17:33 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CB93C49F9F; Thu, 23 Jun 2022 03:17:29 -0700 (PDT) Received: from anrayabh-desk (unknown [167.220.238.193]) by linux.microsoft.com (Postfix) with ESMTPSA id E114E20C63C9; Thu, 23 Jun 2022 03:17:23 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E114E20C63C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1655979449; bh=ReoHMI5JhpilguE9X6PU0nYis/u6+UJ/Af/HK8AAjZ8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sHf/2Tlb4InhVSYT03UGIfr/kqdGxn++tPTa0f4Sc4REdV0O8T77inimwEka9HLEA W7aQ1A52rdYUEn9UeDxxQL4XKMzI+IyFcFyyBxJfDLF1+pD+n+JJUIkZ8gvxPBKKBY t6m6IF2Uj4t1fIF3vLOGGKLvSWINXVEUlnDCDCC4= Date: Thu, 23 Jun 2022 15:47:18 +0530 From: Anirudh Rayabharam To: Vitaly Kuznetsov Cc: Paolo Bonzini , Sean Christopherson , 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 Subject: Re: [PATCH] KVM: nVMX: Don't expose TSC scaling to L1 when on Hyper-V Message-ID: References: <20220613161611.3567556-1-anrayabh@linux.microsoft.com> <592ab920-51f3-4794-331f-8737e1f5b20a@redhat.com> <87zgi5xh42.fsf@redhat.com> <87r13gyde8.fsf@redhat.com> <87k098y77x.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k098y77x.fsf@redhat.com> X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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 Wed, Jun 22, 2022 at 06:48:50PM +0200, Vitaly Kuznetsov wrote: > Anirudh Rayabharam writes: > > > On Wed, Jun 22, 2022 at 04:35:27PM +0200, Vitaly Kuznetsov wrote: > > ... > > >> > >> I've tried to pick it up but it's actually much harder than I think. The > >> patch has some minor issues ('&vmcs_config.nested' needs to be switched > >> to '&vmcs_conf->nested' in nested_vmx_setup_ctls_msrs()), but the main > >> problem is that the set of controls nested_vmx_setup_ctls_msrs() needs > >> is NOT a subset of vmcs_config (setup_vmcs_config()). I was able to > >> identify at least: > > ... > > I've jsut sent "[PATCH RFC v1 00/10] KVM: nVMX: Use vmcs_config for > setting up nested VMX MSRs" which implements Sean's suggestion. Hope > this is the way to go for mainline. > > > > > How about we do something simple like the patch below to start with? > > This will easily apply to stable and we can continue improving upon > > it with follow up patches on mainline. > > > > Personally, I'm not against this for @stable. Alternatively, in case the I think it's a good intermediate fix for mainline too. It is easier to land it in stable if it already exists in mainline. It can stay in mainline until your series lands and replaces it with the vmcs_config approach. What do you think? > only observed issue is with TSC scaling, we can add support for it for > KVM-on-Hyper-V but not for Hyper-V-on-KVM (a small subset of "[PATCH > 00/11] KVM: VMX: Support TscScaling and EnclsExitingBitmap whith > eVMCS"). I can prepare patches if needed. Will it fit in stable's 100 line rule? Thanks! - Anirudh.