Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19854498rwd; Wed, 28 Jun 2023 15:35:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7nGz7A9qWgSbVqwqaH8iK1hJQm+aR9Uw6Ypj6UaBE3m/agsDJn3I1Z7rwb+VNHScykDFa8 X-Received: by 2002:a2e:94c7:0:b0:2b6:bc30:7254 with SMTP id r7-20020a2e94c7000000b002b6bc307254mr2295000ljh.13.1687991751567; Wed, 28 Jun 2023 15:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687991751; cv=none; d=google.com; s=arc-20160816; b=Cu5E8oA9fhShy9hXDFR9lIG5HTaXAq74FudLGJJ7o59bNUvo5cn9daoxHEOd42M2DH Jys5Np2V2xvZD3CVVhc/803Mr+GWSWYtCU2Tyb40GzeVKxRlGN0a9f7dyPeaCh4M5obk uZXjrlBnVJRNqfi1hcpVpItdR0nBGGpJ8lSjdDXjtgA6XX1reX+5HGNObmbxbPbUh0T0 OMXBbaqNN6PoTNKS0wmRSj2UaYJaEjK3lPTtdhYclIv4uV71BVXMSc1Wh0v+hW/EiAAb RvC+UEZQeICDek3G147qBMlT35GqH3eqG+9dQKKThJBJn5OCJqkX44sLgxkXwLP6wC9I g2aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=dWsQ+Zk7IjWGrlut4U5SpkgMPsmLAFUMniA+6zN69Ac=; fh=bfZDu+/7DZiRH+OAguIWP0XsQc2iecZA1Lkhw0I919s=; b=DBIKyYBK/5BIue9qtBFK1RReQ4cdYc50SeWs+YgVZAQ2zr+HXnRo/Y+dVptXSK5Pmh cyxpnGTj1hySe04Bg0VCxjFVaSmxHkXrVCQwLiDp6tS1iilItGAphpH0HbQw5L72qfvQ kbSzT8VxSnjzG9nj8gFVDDfNEz7JN1tFrRZn65dAOjlBRypuyzk+MHE7mtSw9KHQJA6n rKK6acOMhlim9d1dAvg9YoXGnGQnodKZ5/9JH3H9avTbT9nc8JMxjL32CUNv0BO+WfOJ d4ccPNR4k/wznAd1ofKrG/vgNMzT6sxE6gniPYLMI6z5Zh9TyhrLFtgYVyeXbpmq3omt I4Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=uTE1vo4M; 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 g9-20020a056402114900b0051a2c8c1e4esi5512741edw.418.2023.06.28.15.35.25; Wed, 28 Jun 2023 15:35:51 -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=20221208 header.b=uTE1vo4M; 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 S231839AbjF1WIq (ORCPT + 99 others); Wed, 28 Jun 2023 18:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbjF1WIo (ORCPT ); Wed, 28 Jun 2023 18:08:44 -0400 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 840692110 for ; Wed, 28 Jun 2023 15:08:43 -0700 (PDT) Received: by mail-pg1-x549.google.com with SMTP id 41be03b00d2f7-5428d1915acso17445a12.0 for ; Wed, 28 Jun 2023 15:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687990123; x=1690582123; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=dWsQ+Zk7IjWGrlut4U5SpkgMPsmLAFUMniA+6zN69Ac=; b=uTE1vo4MY53qGUepRvI/eb4jxvbxYUEOkPTTvvoD4kGkMDRhRLsKzlGL+vQLMjhKRi rdeWPPHm+L2E8twFBAHl+ZoEMemoTY5PNpYWB+f1xGrPZGZ2la2YZiTaJab5HHqd1wGu e8TDq18vFJWMtrUvtcJUxqp4yTMOBToJdy/ugfjzlaSzjWeyDaxn9ot07hn/Pbz02y9X nLv8szoIVmDzsQGyNi1/NfgnmXBsbr3QltbMozbVHuKXTSLvqZ+0gEau2/8RUWMqkcYj zbwadNSttgKKZPrqDNVQfevrq9jnrko7CL5qNbCNLrVhTgwrR3NdAPk4RY/cPRIrFlwf sAjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687990123; x=1690582123; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dWsQ+Zk7IjWGrlut4U5SpkgMPsmLAFUMniA+6zN69Ac=; b=D3hd5meVLeVkj4Qwu9abIkzO+m582CurRw/HtRyh3pIRM3gPTDGTaAgzeVRwyBc0dI 2agK1AODnItbTsiqVOzsq/b+JgwYIUxSxkCtTKt0c+H3iNMq0bnTrDDl3im+7Y/cAq86 +X/8KMUPDavQpb1pPhughBFcsa0fHsLjan+q7PYNKh4Ow4cDt3pCxQKhTa0zHaFMvvFG Nb2zjAibcndpbUDYGm2mgcohNWnCY+be1Sw1FtWHguYQl5qv27p+6leYiGXqEm395P6r BoumxboZiWe5LvgqIYq4Ul0xQWywT5zxnXgE6HrQEAxhFyidlJbw09sE/SXlBDXRG3rD XtCA== X-Gm-Message-State: AC+VfDxFXNCWcggR6bek0JsA19cj6Y6rRJXxB4/bdWZZu2r69u0igA80 X9/cABkPpKC5hyG/bjv6Xu0KUIWg69M= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a63:cd09:0:b0:553:8437:3db3 with SMTP id i9-20020a63cd09000000b0055384373db3mr490412pgg.3.1687990122897; Wed, 28 Jun 2023 15:08:42 -0700 (PDT) Date: Wed, 28 Jun 2023 15:08:41 -0700 In-Reply-To: <20230616023614.7261-1-yan.y.zhao@intel.com> Mime-Version: 1.0 References: <20230616023101.7019-1-yan.y.zhao@intel.com> <20230616023614.7261-1-yan.y.zhao@intel.com> Message-ID: Subject: Re: [PATCH v3 04/11] KVM: x86/mmu: Use KVM honors guest MTRRs helper when update mtrr From: Sean Christopherson To: Yan Zhao Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, chao.gao@intel.com, kai.huang@intel.com, robert.hoo.linux@gmail.com Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 Fri, Jun 16, 2023, Yan Zhao wrote: > Call helper to check if guest MTRRs are honored by KVM MMU before > calculation and zapping. Same comment here about stating the effect, not the literal code change. > Guest MTRRs only affect TDP memtypes when TDP honors guest MTRRs, there's > no meaning to do the calculation and zapping otherwise.