Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp537476iog; Thu, 30 Jun 2022 05:46:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sra7ZHaAQCqtsSMY50us5UH65CYWfCm9fOKjzQFS4rSc8XCW3f4d5/6XvTgaDF+SrafbqA X-Received: by 2002:a05:6402:430a:b0:435:8ec9:31ec with SMTP id m10-20020a056402430a00b004358ec931ecmr11484306edc.248.1656593209314; Thu, 30 Jun 2022 05:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656593209; cv=none; d=google.com; s=arc-20160816; b=xQqu6CLXtoTmjR40j3XuhuyDA7hUCkXqpbp3fzMndFWEZZmmLr3ReYYkKJwO8TrE4i rMzooGlljEzVvXI12IXuTQzJOB7+LQa1UnNUZO9vdJoGzkvbuxNLNgzJqPA0pj/AReuP z4TO0Tp1HM5tAqMLe+UPeNaX/0OrIsLF+hNAa72p7HGwrFCup/7T6yZHbPbvyGuIclUh 5kVSnpGLSyba9brfghCVdgsWl6WPD2JZDfmayoTZYQi5d/B+6144VyEC3AuHrlPcQeLm ky3927OcnhzvvqrLNrVd24MRNRgejjHLWzhufQOtYD4TPN/XhRNl+VOrmStyYnnafTyc hwxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Fars46ihWldzKhsiNp4tOcZid3mM1cwp7AwPJo3kkUU=; b=f/R+7gjMpiLqd65Zs35K7iOELq0+rDDOvYVh2OrHkbj2xjauXanbvS8gY+asXHyyiz hj0BYCdoRVb/H3h1MitWnJwvsav2rcdkR0K3nmIwE3tFI7NidTyMAoojdj8lPi8fyOJc tARtgtwyCpGMCyLBHTtpzT1igbJy7EjYock2IkTjzaUbVTH5NqmgS1UVZ0tUl2JafC8p aaC+LYaAFEWB3KMM1Yd+ws5L+CCB+HNrOEy1eMCG7ye2OSbdK/uAKiAdTrGsSt+PHdMT uwiIs2W/xE7MZufNkRGbKksc0AeOApnJTDeIqkWmJkdnMgAUZVzR99LRMABQuOqYH2Dp bxbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=bTOtzm38; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ck9-20020a170906c44900b00711dd35ed99si6520848ejb.652.2022.06.30.05.46.22; Thu, 30 Jun 2022 05:46:49 -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=@google.com header.s=20210112 header.b=bTOtzm38; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234026AbiF3M2N (ORCPT + 99 others); Thu, 30 Jun 2022 08:28:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234186AbiF3M2J (ORCPT ); Thu, 30 Jun 2022 08:28:09 -0400 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 286AA3389C for ; Thu, 30 Jun 2022 05:28:04 -0700 (PDT) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-101dc639636so25562698fac.6 for ; Thu, 30 Jun 2022 05:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fars46ihWldzKhsiNp4tOcZid3mM1cwp7AwPJo3kkUU=; b=bTOtzm38zOtR3lMJW1aUnOeqOXAUTvOMcGRyLA35X+GYu3K7EZz4uGRDNM2vzbbqjh L7JLqK8qBPUQeSkSuoTYml3Gh8QEP6uFYZduWKa9pLcI7C5poyh5Yh7yoA/PMkxN2Uj9 ioPX/n+0mjFoTzx7Q4v8Q2ApT8aBTBhAJ1mv8bNDH8O2G5H7aHRNvgJEiJqZb0XWexM2 /7BLF+h9ajFd85J0ib+Ji8Tf/NF4utGZzBfrXV/tViCcEI2YY980y0HJFYgJrgnYRIlj Y6gY7n/JhxOtE3rhYHqU/joag5k2eFjwUXYfz9R7d7LpOVjy3XUCSuqCue7/n5RjaSYc RRXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fars46ihWldzKhsiNp4tOcZid3mM1cwp7AwPJo3kkUU=; b=FIQ85y8kmmrunu/HoWyHJZ2sQVlh+4pYJ4F0/Py/5HAjbVMsRqNeVxm9zvm078XJ8e FQ/AmvGnLlXB95fXYL9VxinITAOc7/4kPFmLTAP+mh7YYaxBsbFCtIURI15YXgOJSS8V 2zonfm7+XP1qTcIWUjn+dFTYpyA28K0hh82jFbe0ZXTed6CUE1TVfwW/Zf1MeXR7u4+Y 4CRLv9M1WT5sffp+EcHhuEbSZu+aEuG7x67sjpXYQAhOb8O2LaGaQRPRoLPwDzMnoD/+ FW0x0HP0Zwkf38iLTbJKHTAb3jcaRHyNMuEeZVXCdi+XpPQxmrZb/8PrOeJYhHQUk6qP ZVrQ== X-Gm-Message-State: AJIora8RPYJSfJcOD45KFvBWBV9yKlftDa91DC+TxKepzyrwGyD9MZkv iJ+hmYtC09rwn30cSYO9iIm7vzZ3+iUoE5moEMVthoiWJ7k= X-Received: by 2002:a05:6870:c596:b0:101:6409:ae62 with SMTP id ba22-20020a056870c59600b001016409ae62mr6252583oab.112.1656592083389; Thu, 30 Jun 2022 05:28:03 -0700 (PDT) MIME-Version: 1.0 References: <20220629150625.238286-1-vkuznets@redhat.com> <20220629150625.238286-29-vkuznets@redhat.com> <87tu82siuw.fsf@redhat.com> In-Reply-To: <87tu82siuw.fsf@redhat.com> From: Jim Mattson Date: Thu, 30 Jun 2022 05:27:52 -0700 Message-ID: Subject: Re: [PATCH v2 28/28] KVM: nVMX: Use cached host MSR_IA32_VMX_MISC value for setting up nested MSR To: Vitaly Kuznetsov Cc: kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Anirudh Rayabharam , Wanpeng Li , Maxim Levitsky , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 30, 2022 at 12:36 AM Vitaly Kuznetsov wrote: > > Jim Mattson writes: > > > On Wed, Jun 29, 2022 at 8:07 AM Vitaly Kuznetsov wrote: > >> > >> vmcs_config has cased host MSR_IA32_VMX_MISC value, use it for setting > >> up nested MSR_IA32_VMX_MISC in nested_vmx_setup_ctls_msrs() and avoid the > >> redundant rdmsr(). > >> > >> No (real) functional change intended. > > > > Just imaginary functional change? :-) > > > > Well, yea) The assumption here is that MSR_IA32_VMX_MISC's value doesn't > change underneath KVM, caching doesn't change anything then. It is, of > course, possible that when KVM runs as a nested hypervisor on top of > something else, it will observe different values. I truly hope this is > purely imaginary :-) It is also theoretically possible that a late-loadable microcode patch could change the value of the MSR, but Intel wouldn't do that to us, would they?