Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3841992iog; Tue, 28 Jun 2022 04:03:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sva6LXMgPXN992HuqdtxVTzsnzDDCoZFD/pDGBv5N8sZWcVU2e4ckwQ4KquPC5VL0lxRwf X-Received: by 2002:a05:6402:330d:b0:435:95ae:9b1e with SMTP id e13-20020a056402330d00b0043595ae9b1emr21805058eda.402.1656414212325; Tue, 28 Jun 2022 04:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656414212; cv=none; d=google.com; s=arc-20160816; b=0f149U6+MlDpxS7HW5VqOd9V/a/SxyuyoIY09hoyn19a9B3AgEg456fVI0pWmV+oxg O5w4E33+uL199MXmMs4oCdOBd1LEaGdswRYZ92GeBcNZTIzK0tAC+ma16A8TOxu2CKIv 9nRQch8FdXAQoK9ZWBzivJy80Jnss7nnFbM2a+/xj7lEzvInVR8ooU/js6mS5uC52BF4 RoBlnljpHcmEQSOEx38IUHBX3aJF8LJqnTYmBLUQIvOE+pMwM8MYgPknJrPhZDoZplJz Ujth7k6Vfsy1msb9MmkJbA4DlEDQGYboGAS0sB7tll0Wm7pXD3EAaP47c2TP6W42iUvK vsbg== 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=JQm/F3y5KpRHHQKfnCN47o1gbSsO/+OUxUcmzwEpM+w=; b=VIHK558N0iT5jLfCOcKn1NwdSD2h5pEZ8wA1M9454/dJ17GYH/UKjLly4zn39xyOqJ 6XqY4JuF9KZ03tjY5Ly4eXOQmxQcdZ8uaxnVBzbwJuT4RsyZSWFz6+lDqKHz6IB/MnVp Ca6svuj/8HIW1Ugs76lLtNg6uVI40/BfVDOovCeqrrY97uTYiC5Z/kGMdRkcMJk+yEzS 1K785dHtucYTQz8wobFyWqyU8boo8VnbPtX9O9cQIdPCoo4oQ6UhHsBWiSGXL9TJO9sy FUzplJwxrGj4YzOYB9oZ3sqSBbFWPdqfBRz5bXMhfJbmqPSJJSxhLbK0/VYwws6+Q30d Rziw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=U5cscUJS; 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 g11-20020a056402090b00b00437b2fb6d8esi1996345edz.328.2022.06.28.04.03.05; Tue, 28 Jun 2022 04:03:32 -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=U5cscUJS; 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 S1344803AbiF1KaU (ORCPT + 99 others); Tue, 28 Jun 2022 06:30:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244644AbiF1KaU (ORCPT ); Tue, 28 Jun 2022 06:30:20 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5577B2E6BE; Tue, 28 Jun 2022 03:30:19 -0700 (PDT) Received: from anrayabh-desk (unknown [167.220.238.193]) by linux.microsoft.com (Postfix) with ESMTPSA id EB4C120CD15E; Tue, 28 Jun 2022 03:30:13 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EB4C120CD15E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1656412218; bh=JQm/F3y5KpRHHQKfnCN47o1gbSsO/+OUxUcmzwEpM+w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=U5cscUJSP6D+FZWBOAujwe5QW9HXONS5YfZQv+keY574JNdWOdz9WTKXOc2IroxHi 1pA4kqI+mV0Wm8JO9OCPD+LfnoA3Oe/QQ0Lyzs7jw1vYbTC++NTzuq/DgFSA+SXiXv HuYytuoFMQtCdcZaAYs43D8be1sZJv0PLEyAQeE8= Date: Tue, 28 Jun 2022 16:00:08 +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: <87zgi5xh42.fsf@redhat.com> <87r13gyde8.fsf@redhat.com> <87k098y77x.fsf@redhat.com> <87bkujy4z9.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bkujy4z9.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 Thu, Jun 23, 2022 at 01:49:30PM +0200, Vitaly Kuznetsov wrote: > Anirudh Rayabharam writes: > > > 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? > > > > Paolo's call but personally I think both series can make 5.20 so there's > no need for an intermediate solution. Only reason I see for this intermediate solution is to automatically land the fix in stable without bothering to write a special backport. I will send it as a proper patch and see if there is any interest in taking it. - Anirudh.